Message ID | 20240524201112.bfc1a1eeddfa.I6ae09dfd2061693745358ecdac5f703f96b07e00@changeid (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
Series | [1/3] backports: add BITS_TO_BYTES() | expand |
diff --git a/backport/backport-include/linux/bitops.h b/backport/backport-include/linux/bitops.h index 17bd8138ecd6..20890e198ee5 100644 --- a/backport/backport-include/linux/bitops.h +++ b/backport/backport-include/linux/bitops.h @@ -24,4 +24,8 @@ #define BITS_PER_TYPE(type) (sizeof(type) * BITS_PER_BYTE) #endif +#ifndef BITS_TO_BYTES +#define BITS_TO_BYTES(nr) __KERNEL_DIV_ROUND_UP(nr, BITS_PER_TYPE(char)) +#endif + #endif /* __BACKPORT_BITOPS_H */