Skip to contentSkip to conversation

staging: rtl8712: rtl871x_mp.c: Compress two lines into one line

PATCH New Payal Kshirsagar 1 participant 1 message Apr 1, 2019 Staging

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 staging: rtl8712: rtl871x_mp.c: Compress two lines into one line

Challenge suggested by coccinelle.
Compresse two lines into one line and remove unnecessary variable.

---
 drivers/staging/rtl8712/rtl871x_mp.c | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)
drivers/staging/rtl8712/rtl871x_mp.c +2 -3
index 1d5364f..ba37950 100644
@@ -697,15 +697,14 @@ void r8712_ResetPhyRxPktCount(struct _adapter *pAdapter)
 static u32 GetPhyRxPktCounts(struct _adapter *pAdapter, u32 selbit)
 {
 	/*selection*/
-	u32 phyrx_set = 0, count = 0;
+	u32 phyrx_set = 0;
 	u32 SelectBit;
 
 	SelectBit = selbit << 28;
 	phyrx_set |= (SelectBit & 0xF0000000);
 	r8712_write32(pAdapter, RXERR_RPT, phyrx_set);
 	/*Read packet count*/
-	count = r8712_read32(pAdapter, RXERR_RPT) & RPTMaxCount;
-	return count;
+	return r8712_read32(pAdapter, RXERR_RPT) & RPTMaxCount;
 }
 
 u32 r8712_GetPhyRxPktReceived(struct _adapter *pAdapter)
Signature · 1 line
2.7.4