IB/rxe: fix compare_const_fl.cocci warnings
Subsystems (2)
PATCH 1/1 IB/rxe: fix compare_const_fl.cocci warnings
Move constants to the right of binary operators.
Generated by: scripts/coccinelle/misc/compare_const_fl.cocci
---
The constants on the right look a bit nicer. Another possibility would be !!.
tree: https://github.com/dledford/linux.git rxe-v2 head: bc91f3e63df667e8da8894a51149a2fc9acf0e71 commit: 30e5584cf453cd90bbcd3ebb5f3e774c0195dd83 [30/31] IB/rxe: Add
Soft-RoCE to kbuild and makefiles
rxe_mr.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/staging/rdma/rxe/rxe_mr.c +2 -2
@@ -43,8 +43,8 @@ static u8 rxe_get_key(void) key = key <<1 ; - key |= (0 != (key &0x100 )) ^ (0 != (key &0x10 )) - ^ (0 != (key &0x80 )) ^ (0 != (key &0x40 )); + key |= ((key &0x100 ) !=0 ) ^ ((key &0x10 ) !=0 ) + ^ ((key &0x80 ) !=0 ) ^ ((key &0x40 ) !=0 ); key &=0xff ;
--
To unsubscribe from this list: send the line "unsubscribe linux-rdma" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html
Doug Ledford
AppliedQuoted 23 lines · Julia Lawall
Move constants to the right of binary operators.
Generated by:
scripts/coccinelle/misc/compare_const_fl.cocciCC Kamal Heib <kamalh-VPRAkNaXOzVWk0Htik3J/[email protected]>Signed-off-by Fengguang Wu <[email protected]>Signed-off-by Julia Lawall <[email protected]>---
The constants on the right look a bit nicer. Another possibility would be !!.
tree: https://github.com/dledford/linux.git rxe-v2 head: bc91f3e63df667e8da8894a51149a2fc9acf0e71 commit: 30e5584cf453cd90bbcd3ebb5f3e774c0195dd83 [30/31] IB/rxe: AddSoft-RoCE to kbuild and makefiles
rxe_mr.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/staging/rdma/rxe/rxe_mr.c static u8 rxe_get_key(void) · line 50
Quoted 10 lines
drivers/staging/rdma/rxe/rxe_mr.c +2
-2@@ -43,8 +43,8 @@ static u8 rxe_get_key(void) key = key <<1 ; - key |= (0 != (key &0x100 )) ^ (0 != (key &0x10 )) - ^ (0 != (key &0x80 )) ^ (0 != (key &0x40 )); + key |= ((key &0x100 ) !=0 ) ^ ((key &0x10 ) !=0 ) + ^ ((key &0x80 ) !=0 ) ^ ((key &0x40 ) !=0 ); key &=0xff ;
Thanks, applied to my rxe-v2 branch.