From: Greg KH <greg@kroah.com>
To: sanjana99reddy99@gmail.com
Cc: outreachy-kernel <outreachy-kernel@googlegroups.com>
Subject: Re: [Outreachy kernel] [PATCH] staging: rtl8188eu: core: rtw_wlan_util.c: Modify return type suggested by Coccinelle.
Date: Fri, 22 Mar 2019 17:05:30 +0100 [thread overview]
Message-ID: <20190322160530.GA9031@kroah.com> (raw)
In-Reply-To: <dcd4eaa9-83e8-448e-ac97-00555572ac62@googlegroups.com>
On Fri, Mar 22, 2019 at 08:27:09AM -0700, sanjana99reddy99@gmail.com wrote:
>
>
> On Friday, March 22, 2019 at 12:31:06 AM UTC+5:30, gregkh wrote:
> >
> > On Thu, Mar 21, 2019 at 04:42:22PM +0530, Sanjana Sanikommu wrote:
> > > The last two lines in the function could
> > > be compressed into one. Avoid usage of local variable.
> > > Challenge suggested by Coccinelle using ret.cocci.
> > > The below is the script for ret.cocci:
> > > @@
> > > local idexpression res;
> > > expression e;
> > > @@
> > >
> > > -res =
> > > +return
> > > e;
> > > -return res;
> > >
> > > Signed-off-by: Sanjana Sanikommu <sanjana9...@gmail.com <javascript:>>
> > > ---
> > > drivers/staging/rtl8188eu/core/rtw_wlan_util.c | 4 +---
> > > 1 file changed, 1 insertion(+), 3 deletions(-)
> > >
> > > diff --git a/drivers/staging/rtl8188eu/core/rtw_wlan_util.c
> > b/drivers/staging/rtl8188eu/core/rtw_wlan_util.c
> > > index 4480deef95a1..70776f8e19a6 100644
> > > --- a/drivers/staging/rtl8188eu/core/rtw_wlan_util.c
> > > +++ b/drivers/staging/rtl8188eu/core/rtw_wlan_util.c
> > > @@ -1182,10 +1182,8 @@ unsigned int update_MSC_rate(struct
> > ieee80211_ht_cap *pHT_caps)
> > > {
> > > unsigned int mask = 0;
> > >
> > > - mask = (pHT_caps->mcs.rx_mask[0] << 12) |
> > > + return (pHT_caps->mcs.rx_mask[0] << 12) |
> > > (pHT_caps->mcs.rx_mask[1] << 20);
> > > -
> > > - return mask;
> > > }
> >
> > Did you build this patch?
> >
> > Just looking at it I can see the compiler warning that it will emit...
> >
> > Please always test-build your patches, otherwise it just makes people
> > grumpy :)
> >
>
> I apologise for what happened regarding this patch. I submitted this patch
> after
> 0 errors, 0 warnings, 0 checks i.e after post commit hooks.
> I would like to know where I went wrong. I will correct them :)
Did you build the code after making the change? That's the most
important part :)
thanks,
greg k-h
next prev parent reply other threads:[~2019-03-22 16:05 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-03-21 11:12 [PATCH] staging: rtl8188eu: core: rtw_wlan_util.c: Modify return type suggested by Coccinelle Sanjana Sanikommu
2019-03-21 19:01 ` [Outreachy kernel] " Greg KH
2019-03-22 15:27 ` sanjana99reddy99
2019-03-22 15:43 ` Julia Lawall
2019-03-22 16:05 ` Greg KH [this message]
2019-03-24 7:15 ` sanjana99reddy99
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20190322160530.GA9031@kroah.com \
--to=greg@kroah.com \
--cc=outreachy-kernel@googlegroups.com \
--cc=sanjana99reddy99@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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.