Skip to contentSkip to conversation

staging: rtl8188eu: hal: compress two lines into one line

PATCH In review Payal Kshirsagar 3 participants 3 messages Mar 11, 2020 Staging

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 staging: rtl8188eu: hal: compress two lines into one line

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

---
 drivers/staging/rtl8188eu/hal/usb_halinit.c | 6 +-----
 1 file changed, 1 insertion(+), 5 deletions(-)
drivers/staging/rtl8188eu/hal/usb_halinit.c +1 -5
index 16a57b31a439..aa6354b9ffa2 100644
@@ -40,8 +40,6 @@ static void _ConfigNormalChipOutEP_8188E(struct adapter *adapt, u8 NumOutPipe)
 
 static bool HalUsbSetQueuePipeMapping8188EUsb(struct adapter *adapt, u8 NumInPipe, u8 NumOutPipe)
 {
-	bool			result		= false;
-
 	_ConfigNormalChipOutEP_8188E(adapt, NumOutPipe);
 
 	/*  Normal chip with one IN and one OUT doesn't have interrupt IN EP. */
@@ -52,9 +50,7 @@ static bool HalUsbSetQueuePipeMapping8188EUsb(struct adapter *adapt, u8 NumInPip
 
 	/*  All config other than above support one Bulk IN and one Interrupt IN. */
 
-	result = hal_mapping_out_pipe(adapt, NumOutPipe);
-
-	return result;
+	return hal_mapping_out_pipe(adapt, NumOutPipe);
 }
 
 void rtw_hal_chip_configure(struct adapter *adapt)
Signature · 1 line
2.17.1
maintainer
#1 lore raw
Quoted 1 line · Payal Kshirsagar

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

Please wrap your changelog text lines at 72 columns like your editor suggested that you do :)

thanks,

greg k-h

#2 lore raw
In reply to Payal Kshirsagar
Quoted 1 line · Payal Kshirsagar

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

The change looks ok but the log messahe is not really ideal. It's nice to mention Coccinelle, but that's not the most important thing so it shouldn't be first. Compressing lines doesn't really give a clear picture either. The subject line could be "remove an unneeded variable". The log message should focus on explaining why it is unneeded. Then mentioned how the change was found at the end.

julia

Quoted 38 lines
---
 drivers/staging/rtl8188eu/hal/usb_halinit.c | 6 +-----
 1 file changed, 1 insertion(+), 5 deletions(-)
drivers/staging/rtl8188eu/hal/usb_halinit.c +1 -6
index 16a57b31a439..aa6354b9ffa2 100644
@@ -40,8 +40,6 @@ static void _ConfigNormalChipOutEP_8188E(struct adapter *adapt, u8 NumOutPipe)
 
 static bool HalUsbSetQueuePipeMapping8188EUsb(struct adapter *adapt, u8 NumInPipe, u8 NumOutPipe)
 {
-	bool			result		= false;
-
 	_ConfigNormalChipOutEP_8188E(adapt, NumOutPipe);
 
 	/*  Normal chip with one IN and one OUT doesn't have interrupt IN EP. */
@@ -52,9 +50,7 @@ static bool HalUsbSetQueuePipeMapping8188EUsb(struct adapter *adapt, u8 NumInPip
 
 	/*  All config other than above support one Bulk IN and one Interrupt IN. */
 
-	result = hal_mapping_out_pipe(adapt, NumOutPipe);
-
-	return result;
+	return hal_mapping_out_pipe(adapt, NumOutPipe);
 }
 
 void rtw_hal_chip_configure(struct adapter *adapt)
--

2.17.1

--
You received this message because you are subscribed to the Google Groups "outreachy-kernel" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/outreachy-kernel/20200311070447.6909-1-payalskshirsagar1234%40gmail.com.