All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH v2] Staging: rtl8188eu: Remove unused variable
@ 2015-02-23  9:41 Vatika Harlalka
  2015-02-23 10:15 ` [Outreachy kernel] " Daniel Baluta
  2015-02-23 19:41 ` Jes Sorensen
  0 siblings, 2 replies; 3+ messages in thread
From: Vatika Harlalka @ 2015-02-23  9:41 UTC (permalink / raw)
  To: outreachy-kernel

We only need the last 8 bits of the offset variable so we can
directly operate on it instead of introducing unneeded
newoffset variable.

Signed-off-by: Vatika Harlalka <vatikaharlalka@gmail.com>
---
 Changes in v2: Changed commit message to make it more descriptive.

 drivers/staging/rtl8188eu/hal/phy.c | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)

diff --git a/drivers/staging/rtl8188eu/hal/phy.c b/drivers/staging/rtl8188eu/hal/phy.c
index 623fb4f..341f0db 100644
--- a/drivers/staging/rtl8188eu/hal/phy.c
+++ b/drivers/staging/rtl8188eu/hal/phy.c
@@ -117,10 +117,9 @@ static void rf_serial_write(struct adapter *adapt,
 	u32 data_and_addr = 0;
 	struct hal_data_8188e *hal_data = GET_HAL_DATA(adapt);
 	struct bb_reg_def *phyreg = &hal_data->PHYRegDef[rfpath];
-	u32 newoffset;
 
-	newoffset = offset & 0xff;
-	data_and_addr = ((newoffset<<20) | (data&0x000fffff)) & 0x0fffffff;
+	offset &= 0xff;
+	data_and_addr = ((offset<<20) | (data&0x000fffff)) & 0x0fffffff;
 	phy_set_bb_reg(adapt, phyreg->rf3wireOffset, bMaskDWord, data_and_addr);
 }
 
-- 
1.9.1



^ permalink raw reply related	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2015-02-23 19:41 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-02-23  9:41 [PATCH v2] Staging: rtl8188eu: Remove unused variable Vatika Harlalka
2015-02-23 10:15 ` [Outreachy kernel] " Daniel Baluta
2015-02-23 19:41 ` Jes Sorensen

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.