Skip to contentSkip to conversation

Removed Warning shown in checkpatch.pl for comment and white space

PATCH In review Ashish Kalra 2 participants 4 messages Nov 26, 2017 – Nov 28, 2017 Broadcom specific amba driver (bcma)

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 Removed Warning shown in checkpatch.pl for comment and white space

checkpatch.pl was showing warnings due to incorrected space at the end of line and also not using * at start of second comment line, Corrected the same and now there is zero warning

---
 drivers/bcma/driver_pcie2.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
drivers/bcma/driver_pcie2.c +2 -1
index b1a6e327cb23..cf889fc62ac7 100644
@@ -83,7 +83,8 @@ static void bcma_core_pcie2_hw_ltr_war(struct bcma_drv_pcie2 *pcie2)
 		bcma_core_pcie2_set_ltr_vals(pcie2);
 
 		/* TODO:
-		si_core_wrapperreg(pcie2, 3, 0x60, 0x8080, 0); */
+		 *si_core_wrapperreg(pcie2, 3, 0x60, 0x8080, 0);
+		 */
 
 		/* enable the LTR */
 		devstsctr2 |= PCIE2_CAP_DEVSTSCTRL2_LTRENAB;
Signature · 1 line
2.14.1
#1 lore raw

On Sun, Nov 26, 2017 at 09:35:50PM +0530, Ashish Kalra wrote:

Hi Ashish,

Quoted 3 lines

checkpatch.pl was showing warnings due to incorrected space at the end of line and also not using * at start of second comment line, Corrected the same and now there is zero warning

Your patch subject is incorrect in many ways :

o It doesn't mention what driver you are cleaning.
o Don't mention the tool you used in the subject, in fact I would run checkpatch.pl on your patch itself before sending.
o Always write commit log in *imperative mood*

Perhaps this might help you :
https://www.kernel.org/doc/html/latest/process/submitting-patches.html#describe-your-changes

Quoted 22 lines
---
 drivers/bcma/driver_pcie2.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
drivers/bcma/driver_pcie2.c +2 -1
index b1a6e327cb23..cf889fc62ac7 100644
@@ -83,7 +83,8 @@ static void bcma_core_pcie2_hw_ltr_war(struct bcma_drv_pcie2 *pcie2)
 		bcma_core_pcie2_set_ltr_vals(pcie2);
 
 		/* TODO:
-		si_core_wrapperreg(pcie2, 3, 0x60, 0x8080, 0); */
+		 *si_core_wrapperreg(pcie2, 3, 0x60, 0x8080, 0);
+		 */
 
 		/* enable the LTR */
 		devstsctr2 |= PCIE2_CAP_DEVSTSCTRL2_LTRENAB;
Signature · 1 line
2.14.1
#2 lore raw

PATCH v2 1/1 drivers: bcma: driver_pcie2.c: Comment format correction & moving trailing */ to a separate line as per checkpatch

This patch fixes the checkpatch.pl warning:

WARNING: Block comments use * on subsequent lines
+ /* TODO:
+ si_core_wrapperreg(pcie2, 3, 0x60, 0x8080, 0); */

WARNING: Block comments use a trailing */ on a separate line
+ si_core_wrapperreg(pcie2, 3, 0x60, 0x8080, 0); */

total: 0 errors, 2 warnings, 200 lines checked

---
changes from v1 (https://lkml.org/lkml/2017/11/26/85)
v2: Improved commit message as per review from Morgan Freeman <[email protected]>

 drivers/bcma/driver_pcie2.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
drivers/bcma/driver_pcie2.c +2 -1
index b1a6e327cb23..cf889fc62ac7 100644
@@ -83,7 +83,8 @@ static void bcma_core_pcie2_hw_ltr_war(struct bcma_drv_pcie2 *pcie2)
 		bcma_core_pcie2_set_ltr_vals(pcie2);
 
 		/* TODO:
-		si_core_wrapperreg(pcie2, 3, 0x60, 0x8080, 0); */
+		 *si_core_wrapperreg(pcie2, 3, 0x60, 0x8080, 0);
+		 */
 
 		/* enable the LTR */
 		devstsctr2 |= PCIE2_CAP_DEVSTSCTRL2_LTRENAB;
Signature · 1 line
2.14.1
#3 lore raw

Re: [PATCH v2] drivers: bcma: driver_pcie2.c: Comment format correction & moving trailing */ to a separate line as per checkpatch

Hi Ashish,

Quoted 1 line · Ashish Kalra

This patch fixes the checkpatch.pl warning:

Write in _imperative_mood_ as I said before.
Like "Use this..." or "Make this..."

Quoted 8 lines

WARNING: Block comments use * on subsequent lines

(quoted diff) +2 -0
+		/* TODO:
+		si_core_wrapperreg(pcie2, 3, 0x60, 0x8080, 0); */

WARNING: Block comments use a trailing */ on a separate line

(quoted diff) +1 -0
+		si_core_wrapperreg(pcie2, 3, 0x60, 0x8080, 0); */

total: 0 errors, 2 warnings, 200 lines checked

No need to mention all of this!

Quoted 4 lines

---
changes from v1 (https://lkml.org/lkml/2017/11/26/85)
v2: Improved commit message as per review from Morgan Freeman <[email protected]>

Your patch subject is again *wrong* here.

Look here: https://pastebin.com/X7x89Q4v

Please take a look at this :
https://wireless.wiki.kernel.org/en/developers/documentation/submittingpatches

Also, don't send me the patch directly, instead to the relevant maintainer and CC me.

Thanks
Himanshu Jha