Fix checkpatch.pl warnings
bnvandana at gmail.com (Vandana BN)
PATCH 1/1 Fix checkpatch.pl warnings
--- drivers/staging/rtl8723bs/core/rtw_debug.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-)
drivers/staging/rtl8723bs/core/rtw_debug.c +1 -2
@@ -1425,9 +1425,8 @@ int proc_get_btcoex_info(struct seq_file *m, void *v) padapter = (struct adapter *)rtw_netdev_priv (dev); pbuf =rtw_zmalloc (bufsize); -if (NULL == pbuf) { +if (pbuf ==NULL )return -ENOMEM ; - }rtw_btcoex_DisplayBtCoexInfo (padapter, pbuf, bufsize);
Signature · 1 line
2.17.1
PATCH 1/1 Fix checkpatch.pl warnings
Quoted 11 lines · Vandana BN
Signed-off-by Vandana BN <bnvandana at gmail.com>--- drivers/staging/rtl8723bs/core/rtw_debug.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-)drivers/staging/rtl8723bs/core/rtw_debug.c +0
-0
drivers/staging/rtl8723bs/core/rtw_debug.c int proc_get_btcoex_info(struct seq_file *m, void *v) · line 1432
Quoted 10 lines
drivers/staging/rtl8723bs/core/rtw_debug.c +1
-2@@ -1425,9 +1425,8 @@ int proc_get_btcoex_info(struct seq_file *m, void *v) padapter = (struct adapter *)rtw_netdev_priv (dev); pbuf =rtw_zmalloc (bufsize); -if (NULL == pbuf) { +if (pbuf ==NULL )return -ENOMEM ; - }rtw_btcoex_DisplayBtCoexInfo (padapter, pbuf, bufsize);
Hi Vandana,
Thanks for the patch. A few things to note:
The commit summary line should include the area and driver.
Instead of "Fix checkpatch.pl warnings", it should say:
"staging: rtl8723bs: Fix checkpatch.pl warnings"
Please include the checkpatch warning in the commit message to tell us more about the reason for this fix.
Please look at a few patches that get posted to Linux kernel mailing lists - you can find them on https://lkml.org/lkml/last100/
for what kind if details should be included in the commit log.
thanks,
-- Shuah
bnvandana at gmail.com (bnva)
PATCH 1/1 Fix checkpatch.pl warnings
Quoted 34 lines · Shuah Khan
Quoted 17 lines · Vandana BN
Signed-off-by Vandana BN <bnvandana at gmail.com>---
?drivers/staging/rtl8723bs/core/rtw_debug.c| 3 +-- ? 1 file changed, 1 insertion(+), 2 deletions(-)drivers/staging/rtl8723bs/core/rtw_debug.c +1
-2@@ -1425,9 +1425,8 @@ int proc_get_btcoex_info(struct seq_file *m, void *v) ????? padapter = (struct adapter *)rtw_netdev_priv(dev); ? ????? pbuf = rtw_zmalloc(bufsize); -??? if (NULL == pbuf) { +??? if (pbuf == NULL) ????????? return -ENOMEM; -??? } ? ????? rtw_btcoex_DisplayBtCoexInfo(padapter, pbuf, bufsize);Quoted 1 line
?
Hi Vandana,
Thanks for the patch. A few things to note:
The commit summary line should include the area and driver.
Instead of "Fix checkpatch.pl warnings", it should say:
"staging: rtl8723bs: Fix checkpatch.pl warnings"
Please include the checkpatch warning in the commit message to tell us more about the reason for this fix.
Quoted 6 lines
Please look at a few patches that get posted to Linux kernel mailing lists - you can find them on https://lkml.org/lkml/last100/
for what kind if details should be included in the commit log.thanks,
-- Shuah
Thank you.
I have sent another patch adding commit message and changing the subject.
regards,
Vandana.
PATCH v2 1/1 staging: rtl8723bs: Fix checkpatch.pl warnings
In reply to bnvandana at gmail.com (Vandana BN)fixed below warnings,
Comparisons should place the constant on the right side of the test braces {} are not necessary for single statement blocks
------
v2- Edited commit message and subject
------
--- drivers/staging/rtl8723bs/core/rtw_debug.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-)
drivers/staging/rtl8723bs/core/rtw_debug.c +1 -2
@@ -1425,9 +1425,8 @@ int proc_get_btcoex_info(struct seq_file *m, void *v) padapter = (struct adapter *)rtw_netdev_priv (dev); pbuf =rtw_zmalloc (bufsize); -if (NULL == pbuf) { +if (pbuf ==NULL )return -ENOMEM ; - }rtw_btcoex_DisplayBtCoexInfo (padapter, pbuf, bufsize);
Signature · 1 line
2.17.1
PATCH v2 1/1 staging: rtl8723bs: Fix checkpatch.pl warnings
Quoted 31 lines · Vandana BN
fixed below warnings,
Comparisons should place the constant on the right side of the test braces {} are not necessary for single statement blocksSigned-off-by Vandana BN <bnvandana at gmail.com>------
v2- Edited commit message and subject
--------- drivers/staging/rtl8723bs/core/rtw_debug.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-)drivers/staging/rtl8723bs/core/rtw_debug.c +1
-2@@ -1425,9 +1425,8 @@ int proc_get_btcoex_info(struct seq_file *m, void *v) padapter = (struct adapter *)rtw_netdev_priv (dev); pbuf =rtw_zmalloc (bufsize); -if (NULL == pbuf) { +if (pbuf ==NULL )return -ENOMEM ; - }rtw_btcoex_DisplayBtCoexInfo (padapter, pbuf, bufsize);Signature · 1 line
2.17.1
Hey!
Your patch subject should briefly describe the changes you are making. It should not be very generic like "fix checkpatch.pl warnings" or "fix sparse warnings".
A good subject would be:
"Place constant on the right"
In your changelog, you can mention the fact that this is a checkpatch.pl warning. Something like:
"This patch fixes the checkpatch.pl warning:
<Whatever the warning was>
"
Read this before submitting your patch:
https://kernelnewbies.org/PatchPhilosophy
This is a great place to begin your patches journey!:
https://kernelnewbies.org/Outreachyfirstpatch
And also did you send this to the appropriate mailing lists?
Use ./scripts/get_maintainer.pl to get the maintainer and mailing list to send this patch to. You ll be sending your patch to Greg again :p as he maintains the staging branch.
Bharath
Quoted 4 lines
_______________________________________________
Linux-kernel-mentees mailing list
Linux-kernel-mentees at lists.linuxfoundation.org
https://lists.linuxfoundation.org/mailman/listinfo/linux-kernel-mentees
PATCH v2 1/1 staging: rtl8723bs: Fix checkpatch.pl warnings
Quoted 47 lines · Bharath Vedartham
Quoted 31 lines · Vandana BN
fixed below warnings,
Comparisons should place the constant on the right side of the test braces {} are not necessary for single statement blocksSigned-off-by Vandana BN <bnvandana at gmail.com>------
v2- Edited commit message and subject
--------- drivers/staging/rtl8723bs/core/rtw_debug.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-)drivers/staging/rtl8723bs/core/rtw_debug.c +1
-2@@ -1425,9 +1425,8 @@ int proc_get_btcoex_info(struct seq_file *m, void *v) padapter = (struct adapter *)rtw_netdev_priv (dev); pbuf =rtw_zmalloc (bufsize); -if (NULL == pbuf) { +if (pbuf ==NULL )return -ENOMEM ; - }rtw_btcoex_DisplayBtCoexInfo (padapter, pbuf, bufsize);Signature · 1 line
2.17.1Hey!
Your patch subject should briefly describe the changes you are making. It should not be very generic like "fix checkpatch.pl warnings" or "fix sparse warnings".
A good subject would be:
"Place constant on the right"In your changelog, you can mention the fact that this is a checkpatch.pl warning. Something like:
"This patch fixes the checkpatch.pl warning:
<Whatever the warning was>
"
Quoted 5 lines
Read this before submitting your patch:
https://kernelnewbies.org/PatchPhilosophyThis is a great place to begin your patches journey!:
https://kernelnewbies.org/Outreachyfirstpatch
Please don't follow Outreachyfirstpatch instructions - even if you do, don't send the patch to OutReachy mailing list and this will be very confusing!!
You should follow the instructions on
https://wiki.linuxfoundation.org/lkmp to send patches.
Quoted 2 lines
And also did you send this to the appropriate mailing lists?
This is fine - the first patch can come just to
linux-kernel-mentees at lists.linuxfoundation.org
Quoted 5 lines
Use
./scripts/get_maintainer.plto get the maintainer and mailing list to send this patch to. You ll be sending your patch to Greg again :p as he maintains the staging branch.
Greg is on the cc.
thanks,
-- Shuah
skhan at linuxfoundation.org (Shuah Khan)
PATCH v2 1/1 staging: rtl8723bs: Fix checkpatch.pl warnings
In reply to Vandana BNQuoted 19 lines · Vandana BN
fixed below warnings,
Comparisons should place the constant on the right side of the test braces {} are not necessary for single statement blocksSigned-off-by Vandana BN <bnvandana at gmail.com>------
v2- Edited commit message and subject
--------- drivers/staging/rtl8723bs/core/rtw_debug.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-)drivers/staging/rtl8723bs/core/rtw_debug.c +0
-0
drivers/staging/rtl8723bs/core/rtw_debug.c int proc_get_btcoex_info(struct seq_file *m, void *v) · line 1432
Quoted 10 lines
drivers/staging/rtl8723bs/core/rtw_debug.c +1
-2@@ -1425,9 +1425,8 @@ int proc_get_btcoex_info(struct seq_file *m, void *v) padapter = (struct adapter *)rtw_netdev_priv (dev); pbuf =rtw_zmalloc (bufsize); -if (NULL == pbuf) { +if (pbuf ==NULL )return -ENOMEM ; - }rtw_btcoex_DisplayBtCoexInfo (padapter, pbuf, bufsize);
Please make the changes to improve the commit log. State what you are changing.
Please go ahead and the patch to the everybody getmaintainers.pl suggests and cc me and linux-kernel-mentees at list.linuxfoundation.org
The same as above for your future patches.
thanks,
-- Shuah
PATCH v3 1/1 staging: rtl8723bs: Fix checkpatch.pl warnings
In reply to bnvandana at gmail.com (Vandana BN)This patch resolves coding style brace warning and constant on right warning.
WARNING: Comparisons should place the constant on the right side of the test
WARNING: braces {} are not necessary for single statement blocks
Signed-off-by: Vandana BN <bnvandana at gmail.com>
------
v2- Edited commit message and subject
v3- Edited commit message
------
--- drivers/staging/rtl8723bs/core/rtw_debug.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-)
drivers/staging/rtl8723bs/core/rtw_debug.c +1 -2
@@ -1425,9 +1425,8 @@ int proc_get_btcoex_info(struct seq_file *m, void *v) padapter = (struct adapter *)rtw_netdev_priv (dev); pbuf =rtw_zmalloc (bufsize); -if (NULL == pbuf) { +if (pbuf ==NULL )return -ENOMEM ; - }rtw_btcoex_DisplayBtCoexInfo (padapter, pbuf, bufsize);
Signature · 1 line
2.17.1
gregkh at linuxfoundation.org (Greg KH)
PATCH v3 1/1 staging: rtl8723bs: Fix checkpatch.pl warnings
Quoted 5 lines · Vandana BN
This patch resolves coding style brace warning and constant on right warning.
WARNING: Comparisons should place the constant on the right side of the test
WARNING: braces {} are not necessary for single statement blocksSigned-off-by Vandana BN <bnvandana at gmail.com>
I need a "real name" here, and in the From: line. Unless I am mistaken and your last name is just "BN" and that is how you sign legal documents? If so, please let me know.
Quoted 13 lines
------
v2- Edited commit message and subject
v3- Edited commit message
--------- drivers/staging/rtl8723bs/core/rtw_debug.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-)drivers/staging/rtl8723bs/core/rtw_debug.c +0
-0
drivers/staging/rtl8723bs/core/rtw_debug.c int proc_get_btcoex_info(struct seq_file *m, void *v) · line 1428
Quoted 5 lines
drivers/staging/rtl8723bs/core/rtw_debug.c +1
-1@@ -1425,9 +1425,8 @@ int proc_get_btcoex_info(struct seq_file *m, void *v) padapter = (struct adapter *)rtw_netdev_priv (dev); pbuf =rtw_zmalloc (bufsize); -if (NULL == pbuf) { +if (pbuf ==NULL )
checkpatch.pl was ok with this? It didn't say to write this line differently after you ran this patch through it?
thanks,
greg k-h
PATCH v3 1/1 staging: rtl8723bs: Fix checkpatch.pl warnings
Quoted 9 lines · Greg KH
Quoted 5 lines · Vandana BN
This patch resolves coding style brace warning and constant on right warning.
WARNING: Comparisons should place the constant on the right side of the test
WARNING: braces {} are not necessary for single statement blocksSigned-off-by Vandana BN <bnvandana at gmail.com>I need a "real name" here, and in the From: line. Unless I am mistaken and your last name is just "BN" and that is how you sign legal documents? If so, please let me know.
Vandana BN is my real and legal name :)
Quoted 23 lines
Quoted 15 lines
------
v2- Edited commit message and subject
v3- Edited commit message
--------- drivers/staging/rtl8723bs/core/rtw_debug.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-)drivers/staging/rtl8723bs/core/rtw_debug.c +0
-0drivers/staging/rtl8723bs/core/rtw_debug.c int proc_get_btcoex_info(struct seq_file *m, void *v) · line 1428
Quoted 5 lines
drivers/staging/rtl8723bs/core/rtw_debug.c +1
-1@@ -1425,9 +1425,8 @@ int proc_get_btcoex_info(struct seq_file *m, void *v) padapter = (struct adapter *)rtw_netdev_priv (dev); pbuf =rtw_zmalloc (bufsize); -if (NULL == pbuf) { +if (pbuf ==NULL )checkpatch.pl was ok with this? It didn't say to write this line differently after you ran this patch through it?
Quoted 3 lines
thanks,
greg k-h
Thanks I had missed looking at CHECK .will resolve and send a new patch.
Regards,
Vandana.
Greg KH
maintainerPATCH v3 1/1 staging: rtl8723bs: Fix checkpatch.pl warnings
Quoted 7 lines · Vandana BN
Quoted 5 lines · Greg KH
Quoted 4 lines · Vandana BN
This patch resolves coding style brace warning and constant on right warning.
WARNING: Comparisons should place the constant on the right side of the test
WARNING: braces {} are not necessary for single statement blocks
Quoted 5 lines
Quoted 4 lines
Quoted 1 line
Signed-off-by Vandana BN <bnvandana at gmail.com>I need a "real name" here, and in the From: line. Unless I am mistaken and your last name is just "BN" and that is how you sign legal documents? If so, please let me know.
Vandana BN is my real and legal name :)
Ok, thanks, I had to ask :)
greg k-h
PATCH v4 1/1 staging: rtl8723bs: Fix checkpatch.pl warnings
In reply to bnvandana at gmail.com (Vandana BN)This patch resolves coding style brace warning and constant on right warning.
WARNING: Comparisons should place the constant on the right side of the test
WARNING: braces {} are not necessary for single statement blocks
CHECK: Comparison to NULL could be written "!pbuf"
Signed-off-by: Vandana BN <bnvandana at gmail.com>
------
v2- Edited commit message and subject
v3- Edited commit message
v4- changed NULL check to use !pbuf
------
--- drivers/staging/rtl8723bs/core/rtw_debug.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-)
drivers/staging/rtl8723bs/core/rtw_debug.c +1 -2
@@ -1425,9 +1425,8 @@ int proc_get_btcoex_info(struct seq_file *m, void *v) padapter = (struct adapter *)rtw_netdev_priv (dev); pbuf =rtw_zmalloc (bufsize); -if (NULL == pbuf) { +if (!pbuf)return -ENOMEM ; - }rtw_btcoex_DisplayBtCoexInfo (padapter, pbuf, bufsize);
Signature · 1 line
2.17.1
PATCH v4 1/1 staging: rtl8723bs: Fix checkpatch.pl warnings
In reply to bnvandana at gmail.com (Vandana BN)This patch resolves coding style brace warning and constant on right warning.
WARNING: Comparisons should place the constant on the right side of the test
WARNING: braces {} are not necessary for single statement blocks
CHECK: Comparison to NULL could be written "!pbuf"
Signed-off-by: Vandana BN <bnvandana at gmail.com>
------
v2- Edited commit message and subject
v3- Edited commit message
v4- changed NULL check to use !pbuf
------
--- drivers/staging/rtl8723bs/core/rtw_debug.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-)
drivers/staging/rtl8723bs/core/rtw_debug.c +1 -2
@@ -1425,9 +1425,8 @@ int proc_get_btcoex_info(struct seq_file *m, void *v) padapter = (struct adapter *)rtw_netdev_priv (dev); pbuf =rtw_zmalloc (bufsize); -if (NULL == pbuf) { +if (!pbuf)return -ENOMEM ; - }rtw_btcoex_DisplayBtCoexInfo (padapter, pbuf, bufsize);
Signature · 1 line
2.17.1