From: Santha Meena Ramamoorthy <santhameena13@gmail.com>
To: Julia Lawall <julia.lawall@lip6.fr>, outreachy-kernel@googlegroups.com
Subject: Re: [Outreachy kernel] [PATCH v2] staging: use structure pointer to get the size of the structure
Date: Sat, 24 Feb 2018 13:21:52 -0800 [thread overview]
Message-ID: <20180224212152.GA11014@ubuntu> (raw)
In-Reply-To: <alpine.DEB.2.20.1802242158200.3243@hadrien>
On Sat, Feb 24, 2018 at 10:03:54PM +0100, Julia Lawall wrote:
> Sorry for not noticing this before, but the subject line needs to be more
> specific than staging. Use git log --oneline on the file to see what
> others have done before.
>
> On Sat, 24 Feb 2018, Santha Meena Ramamoorthy wrote:
>
> > Use pointer to the structure to get the size of the structure.
>
> It would also be good to say why this is a good idea. The code remains
> correct even if the type changes.
>
> Also, it looks liek you have not followed the get_maintainer call
> suggested in the tutorial. Greg is the only maintainer listed on this
> code.
>
> julia
Sorry, I'll fix them now.
Thanks,
Santha
>
> > Issue
> > found using checkpatch.
> >
> > Signed-off-by: Santha Meena Ramamoorthy <santhameena13@gmail.com>
> > ---
> > Change in v2:
> > - Use single line when the number of characters is less than 80
> > drivers/staging/rtl8192e/rtllib_wx.c | 3 +--
> > 1 file changed, 1 insertion(+), 2 deletions(-)
> >
> > diff --git a/drivers/staging/rtl8192e/rtllib_wx.c b/drivers/staging/rtl8192e/rtllib_wx.c
> > index 03fbff0..74d4d2d 100644
> > --- a/drivers/staging/rtl8192e/rtllib_wx.c
> > +++ b/drivers/staging/rtl8192e/rtllib_wx.c
> > @@ -371,8 +371,7 @@ int rtllib_wx_set_encode(struct rtllib_device *ieee,
> > struct lib80211_crypt_data *new_crypt;
> >
> > /* take WEP into use */
> > - new_crypt = kzalloc(sizeof(struct lib80211_crypt_data),
> > - GFP_KERNEL);
> > + new_crypt = kzalloc(sizeof(*new_crypt), GFP_KERNEL);
> > if (new_crypt == NULL)
> > return -ENOMEM;
> > new_crypt->ops = lib80211_get_crypto_ops("R-WEP");
> > --
> > 2.7.4
> >
> > --
> > 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 post to this group, send email to outreachy-kernel@googlegroups.com.
> > To view this discussion on the web visit https://groups.google.com/d/msgid/outreachy-kernel/1519505516-10389-1-git-send-email-santhameena13%40gmail.com.
> > For more options, visit https://groups.google.com/d/optout.
> >
prev parent reply other threads:[~2018-02-24 21:21 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-02-24 20:51 [PATCH v2] staging: use structure pointer to get the size of the structure Santha Meena Ramamoorthy
2018-02-24 20:56 ` [Outreachy kernel] " Hetavi (Haley) Shah
2018-02-24 21:07 ` Julia Lawall
2018-02-24 21:03 ` Julia Lawall
2018-02-24 21:21 ` Santha Meena Ramamoorthy [this message]
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=20180224212152.GA11014@ubuntu \
--to=santhameena13@gmail.com \
--cc=julia.lawall@lip6.fr \
--cc=outreachy-kernel@googlegroups.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.