[prev in list] [next in list] [prev in thread] [next in thread]
List: linux-backports
Subject: [PATCH 02/12] header: Add BITS_PER_TYPE()
From: Hauke Mehrtens <hauke () hauke-m ! de>
Date: 2019-08-05 12:06:54
Message-ID: 20190805120704.13128-3-hauke () hauke-m ! de
[Download RAW message or body]
BITS_PER_TYPE was moved in the upstream kernel in commit 9144d75e22ca
("include/linux/bitops.h: introduce BITS_PER_TYPE") in kernel 4.19 and
is now used by the ath10k driver.
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
---
backport/backport-include/linux/bitops.h | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/backport/backport-include/linux/bitops.h b/backport/backport-include/linux/bitops.h
index 86360d04..17bd8138 100644
--- a/backport/backport-include/linux/bitops.h
+++ b/backport/backport-include/linux/bitops.h
@@ -20,4 +20,8 @@
#define BIT_ULL(nr) (1ULL << (nr))
#endif
+#ifndef BITS_PER_TYPE
+#define BITS_PER_TYPE(type) (sizeof(type) * BITS_PER_BYTE)
+#endif
+
#endif /* __BACKPORT_BITOPS_H */
--
2.20.1
--
To unsubscribe from this list: send the line "unsubscribe backports" in
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic