Skip to contentSkip to conversation

devlink: use _BITUL() macro instead of BIT() in the UAPI header

PATCH In review Tobias Klauser 2 participants 2 messages Dec 14, 2020 – Dec 15, 2020

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 devlink: use _BITUL() macro instead of BIT() in the UAPI header

The BIT() macro is not available for the UAPI headers. Moreover, it can be defined differently in user space headers. Thus, replace its usage with the _BITUL() macro which is already used in other macro definitions in <linux/devlink.h>.

Fixes dc64cc7c6310 ("devlink: Add devlink reload limit option")
---
 include/uapi/linux/devlink.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
include/uapi/linux/devlink.h +1 -1
index 5203f54a2be1..cf89c318f2ac 100644
@@ -322,7 +322,7 @@ enum devlink_reload_limit {
 	DEVLINK_RELOAD_LIMIT_MAX = __DEVLINK_RELOAD_LIMIT_MAX - 1
 };
 
-#define DEVLINK_RELOAD_LIMITS_VALID_MASK (BIT(__DEVLINK_RELOAD_LIMIT_MAX) - 1)
+#define DEVLINK_RELOAD_LIMITS_VALID_MASK (_BITUL(__DEVLINK_RELOAD_LIMIT_MAX) - 1)
 
 enum devlink_attr {
 	/* don't change the order or add anything between, this is ABI! */
Signature · 1 line
2.27.0
maintainer
#1 lore raw
Quoted 7 lines · On Mon, 14 Dec 2020 12:21:57 +0100 Tobias Klauser wrote:

The BIT() macro is not available for the UAPI headers. Moreover, it can be defined differently in user space headers. Thus, replace its usage with the _BITUL() macro which is already used in other macro definitions in <linux/devlink.h>.

Fixes dc64cc7c6310 ("devlink: Add devlink reload limit option")

Thanks for the patch. It doesn't apply any longer, please respin on top of:

https://git.kernel.org/pub/scm/linux/kernel/git/netdev/net-next.git/

Thanks!