All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] staging: rtl8723bs: Remove unnecessary braces
@ 2019-10-06 13:30 Javier F. Arias
  2019-10-06 13:58 ` [Outreachy kernel] " Julia Lawall
  0 siblings, 1 reply; 5+ messages in thread
From: Javier F. Arias @ 2019-10-06 13:30 UTC (permalink / raw)
  To: gregkh; +Cc: outreachy-kernel

Remove unnecessary braces for single statement block.
Issue found by checkpatch.

Signed-off-by: Javier F. Arias <jarias.linux@gmail.com>
---
 drivers/staging/rtl8723bs/core/rtw_xmit.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/drivers/staging/rtl8723bs/core/rtw_xmit.c b/drivers/staging/rtl8723bs/core/rtw_xmit.c
index b5dcb78fb4f4..29acbb1ee869 100644
--- a/drivers/staging/rtl8723bs/core/rtw_xmit.c
+++ b/drivers/staging/rtl8723bs/core/rtw_xmit.c
@@ -3022,9 +3022,8 @@ int rtw_sctx_wait(struct submit_ctx *sctx, const char *msg)
 		status = sctx->status;
 	}
 
-	if (status == RTW_SCTX_DONE_SUCCESS) {
+	if (status == RTW_SCTX_DONE_SUCCESS)
 		ret = _SUCCESS;
-	}
 
 	return ret;
 }
-- 
2.20.1



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

* Re: [Outreachy kernel] [PATCH] staging: rtl8723bs: Remove unnecessary braces
  2019-10-06 13:30 [PATCH] staging: rtl8723bs: Remove unnecessary braces Javier F. Arias
@ 2019-10-06 13:58 ` Julia Lawall
  2019-10-06 21:15   ` Javier Arias
  0 siblings, 1 reply; 5+ messages in thread
From: Julia Lawall @ 2019-10-06 13:58 UTC (permalink / raw)
  To: Javier F. Arias; +Cc: gregkh, outreachy-kernel



On Sun, 6 Oct 2019, Javier F. Arias wrote:

> Remove unnecessary braces for single statement block.
> Issue found by checkpatch.
>
> Signed-off-by: Javier F. Arias <jarias.linux@gmail.com>

Acked-by: Julia Lawall <julia.lawall@lip6.fr>

The patch looks fine.  To go further with this code, you could see whether
the function can return more standdard kernel return values: typically 0
for succes and -ENOMEM etc for various kinds of failure.

julia

> ---
>  drivers/staging/rtl8723bs/core/rtw_xmit.c | 3 +--
>  1 file changed, 1 insertion(+), 2 deletions(-)
>
> diff --git a/drivers/staging/rtl8723bs/core/rtw_xmit.c b/drivers/staging/rtl8723bs/core/rtw_xmit.c
> index b5dcb78fb4f4..29acbb1ee869 100644
> --- a/drivers/staging/rtl8723bs/core/rtw_xmit.c
> +++ b/drivers/staging/rtl8723bs/core/rtw_xmit.c
> @@ -3022,9 +3022,8 @@ int rtw_sctx_wait(struct submit_ctx *sctx, const char *msg)
>  		status = sctx->status;
>  	}
>
> -	if (status == RTW_SCTX_DONE_SUCCESS) {
> +	if (status == RTW_SCTX_DONE_SUCCESS)
>  		ret = _SUCCESS;
> -	}
>
>  	return ret;
>  }
> --
> 2.20.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/20191006133016.GA22297%40gmail.com.
>


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

* Re: [Outreachy kernel] [PATCH] staging: rtl8723bs: Remove unnecessary braces
  2019-10-06 13:58 ` [Outreachy kernel] " Julia Lawall
@ 2019-10-06 21:15   ` Javier Arias
  2019-10-07  5:30     ` Julia Lawall
  0 siblings, 1 reply; 5+ messages in thread
From: Javier Arias @ 2019-10-06 21:15 UTC (permalink / raw)
  To: outreachy-kernel


[-- Attachment #1.1: Type: text/plain, Size: 2257 bytes --]

Sorry seems like I answered with a direct email instead of the mail list, 
so here it goes again:

Hello Julia,

Thanks for your feedback. I'm checking the return values and it seems like 
the Realtek driver files would use them internally throughout the code, and 
not returned to the system. They are defined in the following header file:

drivers/staging/rtl8723bs/include/osdep_service.h
>
 

>  11 #define _FAIL           0
>  12 #define _SUCCESS        1
>  13 #define RTW_RX_HANDLED 2
>

Should I do something with them?

On Sunday, 6 October 2019 08:58:26 UTC-5, Julia Lawall wrote:
>
>
>
> On Sun, 6 Oct 2019, Javier F. Arias wrote: 
>
> > Remove unnecessary braces for single statement block. 
> > Issue found by checkpatch. 
> > 
> > Signed-off-by: Javier F. Arias <jaria...@gmail.com <javascript:>> 
>
> Acked-by: Julia Lawall <julia...@lip6.fr <javascript:>> 
>
> The patch looks fine.  To go further with this code, you could see whether 
> the function can return more standdard kernel return values: typically 0 
> for succes and -ENOMEM etc for various kinds of failure. 
>
> julia 
>
> > --- 
> >  drivers/staging/rtl8723bs/core/rtw_xmit.c | 3 +-- 
> >  1 file changed, 1 insertion(+), 2 deletions(-) 
> > 
> > diff --git a/drivers/staging/rtl8723bs/core/rtw_xmit.c 
> b/drivers/staging/rtl8723bs/core/rtw_xmit.c 
> > index b5dcb78fb4f4..29acbb1ee869 100644 
> > --- a/drivers/staging/rtl8723bs/core/rtw_xmit.c 
> > +++ b/drivers/staging/rtl8723bs/core/rtw_xmit.c 
> > @@ -3022,9 +3022,8 @@ int rtw_sctx_wait(struct submit_ctx *sctx, const 
> char *msg) 
> >                  status = sctx->status; 
> >          } 
> > 
> > -        if (status == RTW_SCTX_DONE_SUCCESS) { 
> > +        if (status == RTW_SCTX_DONE_SUCCESS) 
> >                  ret = _SUCCESS; 
> > -        } 
> > 
> >          return ret; 
> >  } 
> > -- 
> > 2.20.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 outreach...@googlegroups.com <javascript:>. 
> > To view this discussion on the web visit 
> https://groups.google.com/d/msgid/outreachy-kernel/20191006133016.GA22297%40gmail.com. 
>
> > 
>

[-- Attachment #1.2: Type: text/html, Size: 4082 bytes --]

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

* Re: [Outreachy kernel] [PATCH] staging: rtl8723bs: Remove unnecessary braces
  2019-10-06 21:15   ` Javier Arias
@ 2019-10-07  5:30     ` Julia Lawall
  0 siblings, 0 replies; 5+ messages in thread
From: Julia Lawall @ 2019-10-07  5:30 UTC (permalink / raw)
  To: Javier Arias; +Cc: outreachy-kernel

[-- Attachment #1: Type: text/plain, Size: 3150 bytes --]



On Sun, 6 Oct 2019, Javier Arias wrote:

> Sorry seems like I answered with a direct email instead of the mail list, so
> here it goes again:
>
> Hello Julia,
>
> Thanks for your feedback. I'm checking the return values and it seems like
> the Realtek driver files would use them internally throughout the code, and
> not returned to the system. They are defined in the following header file:
>
>       drivers/staging/rtl8723bs/include/osdep_service.h
>
>  
>        11 #define _FAIL           0
>        12 #define _SUCCESS        1
>        13 #define RTW_RX_HANDLED 2
>
>
> Should I do something with them?

I think it would be a good improvement.  But it should be done slowly and
carefully.  Don't try to do everything at once.

julia



>
> On Sunday, 6 October 2019 08:58:26 UTC-5, Julia Lawall wrote:
>
>
>       On Sun, 6 Oct 2019, Javier F. Arias wrote:
>
>       > Remove unnecessary braces for single statement block.
>       > Issue found by checkpatch.
>       >
>       > Signed-off-by: Javier F. Arias <jaria...@gmail.com>
>
>       Acked-by: Julia Lawall <julia...@lip6.fr>
>
>       The patch looks fine.  To go further with this code, you could
>       see whether
>       the function can return more standdard kernel return values:
>       typically 0
>       for succes and -ENOMEM etc for various kinds of failure.
>
>       julia
>
>       > ---
>       >  drivers/staging/rtl8723bs/core/rtw_xmit.c | 3 +--
>       >  1 file changed, 1 insertion(+), 2 deletions(-)
>       >
>       > diff --git a/drivers/staging/rtl8723bs/core/rtw_xmit.c
>       b/drivers/staging/rtl8723bs/core/rtw_xmit.c
>       > index b5dcb78fb4f4..29acbb1ee869 100644
>       > --- a/drivers/staging/rtl8723bs/core/rtw_xmit.c
>       > +++ b/drivers/staging/rtl8723bs/core/rtw_xmit.c
>       > @@ -3022,9 +3022,8 @@ int rtw_sctx_wait(struct submit_ctx
>       *sctx, const char *msg)
>       >                  status = sctx->status;
>       >          }
>       >
>       > -        if (status == RTW_SCTX_DONE_SUCCESS) {
>       > +        if (status == RTW_SCTX_DONE_SUCCESS)
>       >                  ret = _SUCCESS;
>       > -        }
>       >
>       >          return ret;
>       >  }
>       > --
>       > 2.20.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 outreach...@googlegroups.com.
>       > To view this discussion on the web visithttps://groups.google.com/d/msgid/outreachy-kernel/20191006133016.GA22297%4
>       0gmail.com.
>       >
>
> --
> 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 visithttps://groups.google.com/d/msgid/outreachy-kernel/42d53c83-8aea-43c3-8095-
> e46577a1fcb4%40googlegroups.com.
>
>

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

* [PATCH] staging: rtl8723bs: Remove unnecessary braces
@ 2019-10-06 23:03 Javier F. Arias
  0 siblings, 0 replies; 5+ messages in thread
From: Javier F. Arias @ 2019-10-06 23:03 UTC (permalink / raw)
  To: gregkh; +Cc: outreachy-kernel

Remove braces that are not necessary for any arm of this statement.
Issue found by checkpatch.

Signed-off-by: Javier F. Arias <jarias.linux@gmail.com>
---
 drivers/staging/rtl8723bs/core/rtw_xmit.c | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)

diff --git a/drivers/staging/rtl8723bs/core/rtw_xmit.c b/drivers/staging/rtl8723bs/core/rtw_xmit.c
index 3956c43a6468..bda25e13e935 100644
--- a/drivers/staging/rtl8723bs/core/rtw_xmit.c
+++ b/drivers/staging/rtl8723bs/core/rtw_xmit.c
@@ -3063,9 +3063,8 @@ void rtw_ack_tx_done(struct xmit_priv *pxmitpriv, int status)
 {
 	struct submit_ctx *pack_tx_ops = &pxmitpriv->ack_tx_ops;
 
-	if (pxmitpriv->ack_tx) {
+	if (pxmitpriv->ack_tx)
 		rtw_sctx_done_err(&pack_tx_ops, status);
-	} else {
+	else
 		DBG_871X("%s ack_tx not set\n", __func__);
-	}
 }
-- 
2.20.1



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

end of thread, other threads:[~2019-10-07  5:30 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-10-06 13:30 [PATCH] staging: rtl8723bs: Remove unnecessary braces Javier F. Arias
2019-10-06 13:58 ` [Outreachy kernel] " Julia Lawall
2019-10-06 21:15   ` Javier Arias
2019-10-07  5:30     ` Julia Lawall
2019-10-06 23:03 Javier F. Arias

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.