diff options
author | Eva Rachel Retuya <eraretuya@gmail.com> | 2015-10-24 22:35:47 +0800 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2015-10-26 04:09:16 +0900 |
commit | 6f663d5de57ae65ae1e38cefdad3e109432c169e (patch) | |
tree | a2ade6a6ba2a4bc5a0bffbbdce28957394dab0a3 /drivers/staging/mt29f_spinand | |
parent | c75e057744fb16d00668674cf41d63b61ee3cd2d (diff) |
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>
Diffstat (limited to 'drivers/staging/mt29f_spinand')
-rw-r--r-- | drivers/staging/mt29f_spinand/mt29f_spinand.h | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/drivers/staging/mt29f_spinand/mt29f_spinand.h b/drivers/staging/mt29f_spinand/mt29f_spinand.h index fe6c15a50c35..ae62975cf44a 100644 --- a/drivers/staging/mt29f_spinand/mt29f_spinand.h +++ b/drivers/staging/mt29f_spinand/mt29f_spinand.h @@ -44,19 +44,19 @@ /* status */ #define STATUS_OIP_MASK 0x01 -#define STATUS_READY (0 << 0) -#define STATUS_BUSY (1 << 0) +#define STATUS_READY 0 +#define STATUS_BUSY BIT(0) #define STATUS_E_FAIL_MASK 0x04 -#define STATUS_E_FAIL (1 << 2) +#define STATUS_E_FAIL BIT(2) #define STATUS_P_FAIL_MASK 0x08 -#define STATUS_P_FAIL (1 << 3) +#define STATUS_P_FAIL BIT(3) #define STATUS_ECC_MASK 0x30 -#define STATUS_ECC_1BIT_CORRECTED (1 << 4) -#define STATUS_ECC_ERROR (2 << 4) -#define STATUS_ECC_RESERVED (3 << 4) +#define STATUS_ECC_1BIT_CORRECTED BIT(4) +#define STATUS_ECC_ERROR BIT(5) +#define STATUS_ECC_RESERVED (BIT(5) | BIT(4)) /*ECC enable defines*/ #define OTP_ECC_MASK 0x10 |