Skip to content

Commit

Permalink
devlink: use _BITUL() macro instead of BIT() in the UAPI header
Browse files Browse the repository at this point in the history
[ Upstream commit 75f4d45 ]

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: dc64cc7 ("devlink: Add devlink reload limit option")
Signed-off-by: Tobias Klauser <tklauser@distanz.ch>
Link: https://lore.kernel.org/r/20201215102531.16958-1-tklauser@distanz.ch
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
  • Loading branch information
tklauser authored and gregkh committed Dec 30, 2020
1 parent 027112b commit 0eecef0
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion include/uapi/linux/devlink.h
Expand Up @@ -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! */
Expand Down

0 comments on commit 0eecef0

Please sign in to comment.