* [PATCH v3] staging: rtl8192e: use struct pointer to get the size of the struct
@ 2018-02-24 21:46 Santha Meena Ramamoorthy
2018-02-25 9:12 ` [Outreachy kernel] " Julia Lawall
0 siblings, 1 reply; 3+ messages in thread
From: Santha Meena Ramamoorthy @ 2018-02-24 21:46 UTC (permalink / raw)
To: gregkh; +Cc: outreachy-kernel, Santha Meena Ramamoorthy
Use pointer to the structure to get the size of the structure in order
to conform to the Linux kernel coding style. 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
Change in v3:
- Improve the subject line and the commit message
No code change since v2
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
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [Outreachy kernel] [PATCH v3] staging: rtl8192e: use struct pointer to get the size of the struct
2018-02-24 21:46 [PATCH v3] staging: rtl8192e: use struct pointer to get the size of the struct Santha Meena Ramamoorthy
@ 2018-02-25 9:12 ` Julia Lawall
2018-02-28 18:17 ` Santha Meena Ramamoorthy
0 siblings, 1 reply; 3+ messages in thread
From: Julia Lawall @ 2018-02-25 9:12 UTC (permalink / raw)
To: Santha Meena Ramamoorthy; +Cc: gregkh, outreachy-kernel
On Sat, 24 Feb 2018, Santha Meena Ramamoorthy wrote:
> Use pointer to the structure to get the size of the structure in order
> to conform to the Linux kernel coding style. Issue found using
> checkpatch.
>
> Signed-off-by: Santha Meena Ramamoorthy <santhameena13@gmail.com>
Acked-by: Julia Lawall <julia.lawall@lip6.fr>
> ---
> Change in v2:
> - Use single line when the number of characters is less than 80
> Change in v3:
> - Improve the subject line and the commit message
> No code change since v2
Actually, the most recent change description should come first.
julia
> 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/1519508793-11537-1-git-send-email-santhameena13%40gmail.com.
> For more options, visit https://groups.google.com/d/optout.
>
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [Outreachy kernel] [PATCH v3] staging: rtl8192e: use struct pointer to get the size of the struct
2018-02-25 9:12 ` [Outreachy kernel] " Julia Lawall
@ 2018-02-28 18:17 ` Santha Meena Ramamoorthy
0 siblings, 0 replies; 3+ messages in thread
From: Santha Meena Ramamoorthy @ 2018-02-28 18:17 UTC (permalink / raw)
To: Julia Lawall, outreachy-kernel
On Sun, Feb 25, 2018 at 10:12:38AM +0100, Julia Lawall wrote:
>
>
> On Sat, 24 Feb 2018, Santha Meena Ramamoorthy wrote:
>
> > Use pointer to the structure to get the size of the structure in order
> > to conform to the Linux kernel coding style. Issue found using
> > checkpatch.
> >
> > Signed-off-by: Santha Meena Ramamoorthy <santhameena13@gmail.com>
>
> Acked-by: Julia Lawall <julia.lawall@lip6.fr>
>
> > ---
> > Change in v2:
> > - Use single line when the number of characters is less than 80
> > Change in v3:
> > - Improve the subject line and the commit message
> > No code change since v2
>
> Actually, the most recent change description should come first.
>
> julia
Sorry, I'll remember that :)
>
> > 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/1519508793-11537-1-git-send-email-santhameena13%40gmail.com.
> > For more options, visit https://groups.google.com/d/optout.
> >
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2018-02-28 18:18 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-02-24 21:46 [PATCH v3] staging: rtl8192e: use struct pointer to get the size of the struct Santha Meena Ramamoorthy
2018-02-25 9:12 ` [Outreachy kernel] " Julia Lawall
2018-02-28 18:17 ` Santha Meena Ramamoorthy
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.