Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1606166
| From | Arushi Singhal <arushisinghal19971997@gmail.com> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | [PATCH] staging: rtl8712: Replace a bit shift by a use of BIT. |
| Date | 2017-03-22 03:50 +0100 |
| Message-ID | <tnEvv-3Xg-7@gated-at.bofh.it> (permalink) |
| Organization | linux.* mail to news gateway |
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>
---
drivers/staging/rtl8712/rtl8712_xmit.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/staging/rtl8712/rtl8712_xmit.c b/drivers/staging/rtl8712/rtl8712_xmit.c
index 7fe626583c8a..a17531b30c1d 100644
--- a/drivers/staging/rtl8712/rtl8712_xmit.c
+++ b/drivers/staging/rtl8712/rtl8712_xmit.c
@@ -503,7 +503,7 @@ static void update_txdesc(struct xmit_frame *pxmitframe, uint *pmem, int sz)
switch (pattrib->encrypt) { /*SEC_TYPE*/
case _WEP40_:
case _WEP104_:
- ptxdesc->txdw1 |= cpu_to_le32((0x01 << 22) &
+ ptxdesc->txdw1 |= cpu_to_le32((BIT(22)) &
0x00c00000);
/*KEY_ID when WEP is used;*/
ptxdesc->txdw1 |= cpu_to_le32((psecuritypriv->
--
2.11.0
Back to linux.kernel | Previous | Next | Find similar | Unroll thread
[PATCH] staging: rtl8712: Replace a bit shift by a use of BIT. Arushi Singhal <arushisinghal19971997@gmail.com> - 2017-03-22 03:50 +0100
csiph-web