All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] [Outreachy kernel] staging: rtl8188eu: hal: compress two lines into one line
@ 2020-03-11  7:04 Payal Kshirsagar
  2020-03-11  7:11 ` Greg KH
  2020-03-11  7:14 ` Julia Lawall
  0 siblings, 2 replies; 3+ messages in thread
From: Payal Kshirsagar @ 2020-03-11  7:04 UTC (permalink / raw)
  To: Larry.Finger, gregkh, outreachy-kernel; +Cc: Payal Kshirsagar

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

Signed-off-by: Payal Kshirsagar <payalskshirsagar1234@gmail.com>
---
 drivers/staging/rtl8188eu/hal/usb_halinit.c | 6 +-----
 1 file changed, 1 insertion(+), 5 deletions(-)

diff --git a/drivers/staging/rtl8188eu/hal/usb_halinit.c b/drivers/staging/rtl8188eu/hal/usb_halinit.c
index 16a57b31a439..aa6354b9ffa2 100644
--- a/drivers/staging/rtl8188eu/hal/usb_halinit.c
+++ b/drivers/staging/rtl8188eu/hal/usb_halinit.c
@@ -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



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

* Re: [PATCH] [Outreachy kernel] staging: rtl8188eu: hal: compress two lines into one line
  2020-03-11  7:04 [PATCH] [Outreachy kernel] staging: rtl8188eu: hal: compress two lines into one line Payal Kshirsagar
@ 2020-03-11  7:11 ` Greg KH
  2020-03-11  7:14 ` Julia Lawall
  1 sibling, 0 replies; 3+ messages in thread
From: Greg KH @ 2020-03-11  7:11 UTC (permalink / raw)
  To: Payal Kshirsagar; +Cc: Larry.Finger, outreachy-kernel

On Wed, Mar 11, 2020 at 12:34:47PM +0530, Payal Kshirsagar wrote:
> 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


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

* Re: [PATCH] [Outreachy kernel] staging: rtl8188eu: hal: compress two lines into one line
  2020-03-11  7:04 [PATCH] [Outreachy kernel] staging: rtl8188eu: hal: compress two lines into one line Payal Kshirsagar
  2020-03-11  7:11 ` Greg KH
@ 2020-03-11  7:14 ` Julia Lawall
  1 sibling, 0 replies; 3+ messages in thread
From: Julia Lawall @ 2020-03-11  7:14 UTC (permalink / raw)
  To: Payal Kshirsagar; +Cc: Larry.Finger, gregkh, outreachy-kernel



On Wed, 11 Mar 2020, Payal Kshirsagar wrote:

> 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

>
> Signed-off-by: Payal Kshirsagar <payalskshirsagar1234@gmail.com>
> ---
>  drivers/staging/rtl8188eu/hal/usb_halinit.c | 6 +-----
>  1 file changed, 1 insertion(+), 5 deletions(-)
>
> diff --git a/drivers/staging/rtl8188eu/hal/usb_halinit.c b/drivers/staging/rtl8188eu/hal/usb_halinit.c
> index 16a57b31a439..aa6354b9ffa2 100644
> --- a/drivers/staging/rtl8188eu/hal/usb_halinit.c
> +++ b/drivers/staging/rtl8188eu/hal/usb_halinit.c
> @@ -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 outreachy-kernel+unsubscribe@googlegroups.com.
> To view this discussion on the web visit https://groups.google.com/d/msgid/outreachy-kernel/20200311070447.6909-1-payalskshirsagar1234%40gmail.com.
>


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

end of thread, other threads:[~2020-03-11  7:14 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2020-03-11  7:04 [PATCH] [Outreachy kernel] staging: rtl8188eu: hal: compress two lines into one line Payal Kshirsagar
2020-03-11  7:11 ` Greg KH
2020-03-11  7:14 ` Julia Lawall

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.