Staging: lustre :lustre: include :lustre_compat.h: Prefer using the BIT macro
PATCH 8/8 Staging: lustre :lustre: include :lustre_compat.h: Prefer using the BIT macro
Replace all instances of (1 << 27) with BIT(27) to fix checkpatch check messages
--- drivers/staging/lustre/lustre/include/lustre_compat.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/staging/lustre/lustre/include/lustre_compat.h +1 -1
@@ -43,7 +43,7 @@* set ATTR_BLOCKS to a high value to avoid any risk of collision with other * ATTR_* attributes (see bug 13828) */ -#define ATTR_BLOCKS (1 << 27) +#define ATTR_BLOCKS BIT(27)#define current_ngroups current_cred()->group_info->ngroups#define current_groups current_cred()->group_info->small_block
Signature · 1 line
1.9.1
Quoted 1 line · Jaya Durga
Subject: Staging: lustre :lustre: include :lustre_compat.h: Prefer using the BIT macro
Don't overdo it ;-).
Subject: staging: lustre: lustre_compat.h: Prefer using the BIT macro
Quoted 2 lines
Replace all instances of (1 << 27) with BIT(27) to fix checkpatch check messages
While it may technically be true that this one instance is every instance of (1<<27) there is in lustre_compat.h, I must say I expected a bigger patch when I saw "replace all instances".
Quoted 25 lines
Signed-off-by Jaya Durga <[email protected]>--- drivers/staging/lustre/lustre/include/lustre_compat.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)drivers/staging/lustre/lustre/include/lustre_compat.h +1
-2@@ -43,7 +43,7 @@* set ATTR_BLOCKS to a high value to avoid any risk of collision with other * ATTR_* attributes (see bug 13828) */ -#define ATTR_BLOCKS (1 << 27) +#define ATTR_BLOCKS BIT(27)#define current_ngroups current_cred()->group_info->ngroups#define current_groups current_cred()->group_info->small_block --1.9.1
_______________________________________________
devel mailing list
devel at linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
Greg KH
maintainerQuoted 13 lines · Jaya Durga
Replace all instances of (1 << 27) with BIT(27) to fix checkpatch check messages
Signed-off-by Jaya Durga <[email protected]>--- drivers/staging/lustre/lustre/include/lustre_compat.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)drivers/staging/lustre/lustre/include/lustre_compat.h +0
-0
drivers/staging/lustre/lustre/include/lustre_compat.h line 46
Quoted 5 lines
drivers/staging/lustre/lustre/include/lustre_compat.h +1
-1@@ -43,7 +43,7 @@* set ATTR_BLOCKS to a high value to avoid any risk of collision with other * ATTR_* attributes (see bug 13828) */ -#define ATTR_BLOCKS (1 << 27) +#define ATTR_BLOCKS BIT(27)
Isn't this used in lustre's userspace code? If so, you can't use the BIT() macro there :(
Please check before you redo this.
thanks,
greg k-h
Quoted 26 lines · Greg KH
Quoted 13 lines · Jaya Durga
Replace all instances of (1 << 27) with BIT(27) to fix checkpatch check messages
Signed-off-by Jaya Durga <[email protected]>---
drivers/staging/lustre/lustre/include/lustre_compat.h| 2 +-1 file changed, 1 insertion(+), 1 deletion(-)drivers/staging/lustre/lustre/include/lustre_compat.h +0
-0drivers/staging/lustre/lustre/include/lustre_compat.h line 46
Quoted 5 lines
drivers/staging/lustre/lustre/include/lustre_compat.h +1
-1@@ -43,7 +43,7 @@* set ATTR_BLOCKS to a high value to avoid any risk of collision with other * ATTR_* attributes (see bug 13828) */ -#define ATTR_BLOCKS (1 << 27) +#define ATTR_BLOCKS BIT(27)Isn't this used in lustre's userspace code? If so, you can't use the
BIT()macro there :(
Quoted 1 line
Please check before you redo this.
The "lustre_compat.h" header was previously used for compatibility between different kernel versions, which is why it is now basically empty. It isn't used for userspace interfaces as other "compat" headers are in the kernel.
Cheers, Andreas
--
Andreas Dilger
Lustre Principal Architect
Intel Corporation