linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] staging: rtl8712: Replace a bit shift by a use of BIT.
@ 2017-03-22  2:44 Arushi Singhal
  0 siblings, 0 replies; only message in thread
From: Arushi Singhal @ 2017-03-22  2:44 UTC (permalink / raw)
  To: Larry.Finger
  Cc: Florian Schilhabel, Greg Kroah-Hartman, devel, linux-kernel,
	outreachy-kernel

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

^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2017-03-22  2:44 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-03-22  2:44 [PATCH] staging: rtl8712: Replace a bit shift by a use of BIT Arushi Singhal

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).