diff options
author | Arushi Singhal <arushisinghal19971997@gmail.com> | 2017-03-22 18:47:57 +0530 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2017-03-23 14:25:33 +0100 |
commit | 4f8f316be6bace82139e321e11674949ce446454 (patch) | |
tree | a1810c6e55319046988cd50136af71902fd8b206 /drivers/staging/rts5208 | |
parent | 22d89cc86c35d510f305a5e2bb651627487d26e9 (diff) | |
download | linux-4f8f316be6bace82139e321e11674949ce446454.tar.gz linux-4f8f316be6bace82139e321e11674949ce446454.tar.bz2 linux-4f8f316be6bace82139e321e11674949ce446454.zip |
staging: rts5208: Replace a bit shift by a use of BIT.
This patch replaces bit shifting on 1 with the BIT(x) macro.
This was done with coccinelle:
@@
constant c;
@@
-1 << c
+BIT(c)
Signed-off-by: Arushi Singhal <arushisinghal19971997@gmail.com>
Acked-by: Julia Lawall <julia.lawall@lip6.fr>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/staging/rts5208')
-rw-r--r-- | drivers/staging/rts5208/rtsx_chip.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/staging/rts5208/rtsx_chip.c b/drivers/staging/rts5208/rtsx_chip.c index 3511157a2c78..7f4107bffe31 100644 --- a/drivers/staging/rts5208/rtsx_chip.c +++ b/drivers/staging/rts5208/rtsx_chip.c @@ -1490,7 +1490,7 @@ int rtsx_write_register(struct rtsx_chip *chip, u16 addr, u8 mask, u8 data) for (i = 0; i < MAX_RW_REG_CNT; i++) { val = rtsx_readl(chip, RTSX_HAIMR); - if ((val & (1 << 31)) == 0) { + if ((val & BIT(31)) == 0) { if (data != (u8)val) { rtsx_trace(chip); return STATUS_FAIL; @@ -1518,7 +1518,7 @@ int rtsx_read_register(struct rtsx_chip *chip, u16 addr, u8 *data) for (i = 0; i < MAX_RW_REG_CNT; i++) { val = rtsx_readl(chip, RTSX_HAIMR); - if ((val & (1 << 31)) == 0) + if ((val & BIT(31)) == 0) break; } |