Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

Staging: mt29f_spinand: Prefer using the BIT macro

Replace all instances of bit shifting on 1 with the BIT(x) macro. In
addition, convert other non-1 shift operations with the equivalent
BIT(x) macro for uniformity. Issue pointed out by checkpatch.

CHECK: Prefer using the BIT macro

Signed-off-by: Eva Rachel Retuya <eraretuya@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

authored by

Eva Rachel Retuya and committed by
Greg Kroah-Hartman
6f663d5d c75e0577

+7 -7
+7 -7
drivers/staging/mt29f_spinand/mt29f_spinand.h
··· 44 44 45 45 /* status */ 46 46 #define STATUS_OIP_MASK 0x01 47 - #define STATUS_READY (0 << 0) 48 - #define STATUS_BUSY (1 << 0) 47 + #define STATUS_READY 0 48 + #define STATUS_BUSY BIT(0) 49 49 50 50 #define STATUS_E_FAIL_MASK 0x04 51 - #define STATUS_E_FAIL (1 << 2) 51 + #define STATUS_E_FAIL BIT(2) 52 52 53 53 #define STATUS_P_FAIL_MASK 0x08 54 - #define STATUS_P_FAIL (1 << 3) 54 + #define STATUS_P_FAIL BIT(3) 55 55 56 56 #define STATUS_ECC_MASK 0x30 57 - #define STATUS_ECC_1BIT_CORRECTED (1 << 4) 58 - #define STATUS_ECC_ERROR (2 << 4) 59 - #define STATUS_ECC_RESERVED (3 << 4) 57 + #define STATUS_ECC_1BIT_CORRECTED BIT(4) 58 + #define STATUS_ECC_ERROR BIT(5) 59 + #define STATUS_ECC_RESERVED (BIT(5) | BIT(4)) 60 60 61 61 /*ECC enable defines*/ 62 62 #define OTP_ECC_MASK 0x10