staging: use structure pointer to get the size of the structure
PATCH v2 1/1 staging: use structure pointer to get the size of the structure
Use pointer to the structure to get the size of the structure. Issue found using checkpatch.
---
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(-)
drivers/staging/rtl8192e/rtllib_wx.c +1 -2
@@ -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" );
Signature · 1 line
2.7.4
Hello,
I have recently found out about this project and would like to make some contributions.
May I know what is the first contribution that I can start with?
Thank you,
Haley Shah.
Quoted 39 lines · Santha Meena Ramamoorthy
Use pointer to the structure to get the size of the structure. Issue found using checkpatch.
Signed-off-by Santha Meena Ramamoorthy <[email protected]>---
Change in v2:
- Use single line when the number of characters is less than 80drivers/staging/rtl8192e/rtllib_wx.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-)drivers/staging/rtl8192e/rtllib_wx.c +1
-3@@ -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 [email protected].
To post to this group, send email to [email protected]. 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.
Quoted 5 lines · Hetavi (Haley) Shah
Hello,
I have recently found out about this project and would like to make some contributions.May I know what is the first contribution that I can start with?
Please start by reading and working through the tutorial that is linked to in the outreachy page: https://kernelnewbies.org/Outreachyfirstpatch
Also, please don't respond to random mails with questions about other topics. It is particularly confusing to see a mail that has a PATCH subject line and is not a patch.
julia
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.
Quoted 1 line · Santha Meena Ramamoorthy
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
Quoted 34 lines
Issue
found using checkpatch.Signed-off-by Santha Meena Ramamoorthy <[email protected]>---
Change in v2:
- Use single line when the number of characters is less than 80drivers/staging/rtl8192e/rtllib_wx.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-)drivers/staging/rtl8192e/rtllib_wx.c +1
-3@@ -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 [email protected]. To post to this group, send email to [email protected].
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.
Quoted 8 lines · Julia Lawall
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.
Quoted 1 line · Santha Meena Ramamoorthy
Use pointer to the structure to get the size of the structure.
Quoted 8 lines
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_maintainercall suggested in the tutorial. Greg is the only maintainer listed on this code.julia
Sorry, I'll fix them now.
Thanks,
Santha
Quoted 35 lines
Quoted 35 lines
Issue
found using checkpatch.Signed-off-by Santha Meena Ramamoorthy <[email protected]>---
Change in v2:
- Use single line when the number of characters is less than 80drivers/staging/rtl8192e/rtllib_wx.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-)drivers/staging/rtl8192e/rtllib_wx.c +1
-3@@ -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 [email protected]. To post to this group, send email to [email protected].
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.