Re: [PATCH] staging: rtl8723bs: core: drop unneeded null tests

2017-04-08 Thread Julia Lawall


On Sat, 8 Apr 2017, Larry Finger wrote:

> On 04/08/2017 12:32 PM, Julia Lawall wrote:
> >
> >
> > On Sat, 8 Apr 2017, Hans de Goede wrote:
> >
> > > Hi Julia,
> > >
> > > On 08-04-17 19:10, Julia Lawall wrote:
> > > > kfree returns immediately on NULL so the tests are not needed.
> > > >
> > > > Generated by: scripts/coccinelle/free/ifnullfree.cocci
> > > >
> > > > CC: Hans de Goede 
> > > > Signed-off-by: Julia Lawall 
> > > > Signed-off-by: Fengguang Wu 
> > >
> > > Thank you for these patches. Larry Finger has just
> > > posted a large cleanup series for the rtl8723bs
> > > driver, which will likely conflict with these.
> > >
> > > Can you rebase and resend these patches once Larry's
> > > series has been merged please?
> >
> > OK, thanks for the update.  There were a bunch of other coccicheck
> > warnings.  But I will wait for the improved version.
>
> Julia,
>
> Rather than fixing checkpatch or coccicheck problems, my intent is to now
> strip out unneeded code such as the part that handles 5G channels. That should
> make a lot of formatting patches not be needed. I did the Smatch fixes because
> a number of them were potentially able to cause crashes.
>
> As I am not sure how soon I will be doing the next fixes, I will not submit
> any more patches until yours are rebased and merged.

I guess Greg has not yet taken your patches, because git pull
in staging-testing doesn't give me anything new.  I think you could just
go ahead, and drop my patches.  I can resend them later if they are still
appropriate.

julia
___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


Re: [PATCH] staging: rtl8723bs: core: drop unneeded null tests

2017-04-08 Thread Larry Finger

On 04/08/2017 12:32 PM, Julia Lawall wrote:



On Sat, 8 Apr 2017, Hans de Goede wrote:


Hi Julia,

On 08-04-17 19:10, Julia Lawall wrote:

kfree returns immediately on NULL so the tests are not needed.

Generated by: scripts/coccinelle/free/ifnullfree.cocci

CC: Hans de Goede 
Signed-off-by: Julia Lawall 
Signed-off-by: Fengguang Wu 


Thank you for these patches. Larry Finger has just
posted a large cleanup series for the rtl8723bs
driver, which will likely conflict with these.

Can you rebase and resend these patches once Larry's
series has been merged please?


OK, thanks for the update.  There were a bunch of other coccicheck
warnings.  But I will wait for the improved version.


Julia,

Rather than fixing checkpatch or coccicheck problems, my intent is to now strip 
out unneeded code such as the part that handles 5G channels. That should make a 
lot of formatting patches not be needed. I did the Smatch fixes because a number 
of them were potentially able to cause crashes.


As I am not sure how soon I will be doing the next fixes, I will not submit any 
more patches until yours are rebased and merged.


Larry


___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


Re: [PATCH] staging: rtl8723bs: core: drop unneeded null tests

2017-04-08 Thread Julia Lawall


On Sat, 8 Apr 2017, Hans de Goede wrote:

> Hi Julia,
>
> On 08-04-17 19:10, Julia Lawall wrote:
> > kfree returns immediately on NULL so the tests are not needed.
> >
> > Generated by: scripts/coccinelle/free/ifnullfree.cocci
> >
> > CC: Hans de Goede 
> > Signed-off-by: Julia Lawall 
> > Signed-off-by: Fengguang Wu 
>
> Thank you for these patches. Larry Finger has just
> posted a large cleanup series for the rtl8723bs
> driver, which will likely conflict with these.
>
> Can you rebase and resend these patches once Larry's
> series has been merged please?

OK, thanks for the update.  There were a bunch of other coccicheck
warnings.  But I will wait for the improved version.

julia


>
> Regards,
>
> Hans
>
>
>
> > ---
> >
> >  rtw_cmd.c |6 ++
> >  1 file changed, 2 insertions(+), 4 deletions(-)
> >
> > --- a/drivers/staging/rtl8723bs/core/rtw_cmd.c
> > +++ b/drivers/staging/rtl8723bs/core/rtw_cmd.c
> > @@ -248,11 +248,9 @@ void _rtw_free_evt_priv(struct evt_priv
> >  void _rtw_free_cmd_priv(struct cmd_priv *pcmdpriv)
> >  {
> > if (pcmdpriv) {
> > -   if (pcmdpriv->cmd_allocated_buf)
> > -   kfree(pcmdpriv->cmd_allocated_buf);
> > +   kfree(pcmdpriv->cmd_allocated_buf);
> >
> > -   if (pcmdpriv->rsp_allocated_buf)
> > -   kfree(pcmdpriv->rsp_allocated_buf);
> > +   kfree(pcmdpriv->rsp_allocated_buf);
> >
> > mutex_destroy(>sctx_mutex);
> > }
> >
>
___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


Re: [PATCH] staging: rtl8723bs: core: drop unneeded null tests

2017-04-08 Thread Hans de Goede

Hi Julia,

On 08-04-17 19:10, Julia Lawall wrote:

kfree returns immediately on NULL so the tests are not needed.

Generated by: scripts/coccinelle/free/ifnullfree.cocci

CC: Hans de Goede 
Signed-off-by: Julia Lawall 
Signed-off-by: Fengguang Wu 


Thank you for these patches. Larry Finger has just
posted a large cleanup series for the rtl8723bs
driver, which will likely conflict with these.

Can you rebase and resend these patches once Larry's
series has been merged please?

Regards,

Hans




---

 rtw_cmd.c |6 ++
 1 file changed, 2 insertions(+), 4 deletions(-)

--- a/drivers/staging/rtl8723bs/core/rtw_cmd.c
+++ b/drivers/staging/rtl8723bs/core/rtw_cmd.c
@@ -248,11 +248,9 @@ void _rtw_free_evt_priv(struct evt_priv
 void _rtw_free_cmd_priv(struct cmd_priv *pcmdpriv)
 {
if (pcmdpriv) {
-   if (pcmdpriv->cmd_allocated_buf)
-   kfree(pcmdpriv->cmd_allocated_buf);
+   kfree(pcmdpriv->cmd_allocated_buf);

-   if (pcmdpriv->rsp_allocated_buf)
-   kfree(pcmdpriv->rsp_allocated_buf);
+   kfree(pcmdpriv->rsp_allocated_buf);

mutex_destroy(>sctx_mutex);
}


___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel