summaryrefslogtreecommitdiff
path: root/include/linux/bitops.h
diff options
context:
space:
mode:
authorAndy Shevchenko <andriy.shevchenko@linux.intel.com>2024-05-07 23:01:31 +0300
committerYury Norov <yury.norov@gmail.com>2024-05-20 02:12:38 +0300
commit9f2c2d6ba13da08643c65b948ce5e3d616864c47 (patch)
treeed722d46a1e9847db51651fff6aac385a9ba0e73 /include/linux/bitops.h
parentfe708f915541b0b7b9ba066f73007fde69a0d2ea (diff)
downloadlinux-9f2c2d6ba13da08643c65b948ce5e3d616864c47.tar.xz
bitops: Move aligned_byte_mask() to wordpart.h
The bitops.h is for bit related operations. The aligned_byte_mask() is about byte (or part of the machine word) operations, for which we have a separate header, move the mentioned macro to wordpart.h to consolidate similar operations. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Signed-off-by: Yury Norov <yury.norov@gmail.com>
Diffstat (limited to 'include/linux/bitops.h')
-rw-r--r--include/linux/bitops.h7
1 files changed, 0 insertions, 7 deletions
diff --git a/include/linux/bitops.h b/include/linux/bitops.h
index 57ecef354f47..3313d2c04e6d 100644
--- a/include/linux/bitops.h
+++ b/include/linux/bitops.h
@@ -8,13 +8,6 @@
#include <uapi/linux/kernel.h>
-/* Set bits in the first 'n' bytes when loaded from memory */
-#ifdef __LITTLE_ENDIAN
-# define aligned_byte_mask(n) ((1UL << 8*(n))-1)
-#else
-# define aligned_byte_mask(n) (~0xffUL << (BITS_PER_LONG - 8 - 8*(n)))
-#endif
-
#define BITS_PER_TYPE(type) (sizeof(type) * BITS_PER_BYTE)
#define BITS_TO_LONGS(nr) __KERNEL_DIV_ROUND_UP(nr, BITS_PER_TYPE(long))
#define BITS_TO_U64(nr) __KERNEL_DIV_ROUND_UP(nr, BITS_PER_TYPE(u64))