Skip to contentSkip to conversation

checkpatch: trivial style fixes

PATCH Applied Dwaipayan Ray 2 participants 2 messages Jan 5, 2021 Checkpatch

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 checkpatch: trivial style fixes

Indentations should use tabs wherever possible.
Replace spaces by tabs for indents.

---
 scripts/checkpatch.pl | 18 +++++++++---------
 1 file changed, 9 insertions(+), 9 deletions(-)
scripts/checkpatch.pl +9 -9
index e6857bdfcb2d..7a323ca8a177 100755
@@ -2974,7 +2974,7 @@ sub process {
 				}
 				if (!defined $lines[$linenr]) {
 					WARN("BAD_SIGN_OFF",
-                                             "Co-developed-by: must be immediately followed by Signed-off-by:\n" . "$here\n" . $rawline);
+					     "Co-developed-by: must be immediately followed by Signed-off-by:\n" . "$here\n" . $rawline);
 				} elsif ($rawlines[$linenr] !~ /^\s*signed-off-by:\s*(.*)/i) {
 					WARN("BAD_SIGN_OFF",
 					     "Co-developed-by: must be immediately followed by Signed-off-by:\n" . "$here\n" . $rawline . "\n" .$rawlines[$linenr]);
@@ -2997,8 +2997,8 @@ sub process {
 			if (ERROR("GERRIT_CHANGE_ID",
 			          "Remove Gerrit Change-Id's before submitting upstream\n" . $herecurr) &&
 			    $fix) {
-                                fix_delete_line($fixlinenr, $rawline);
-                        }
+				fix_delete_line($fixlinenr, $rawline);
+			}
 		}
 
 # Check if the commit log is in a possible stack dump
@@ -3240,10 +3240,10 @@ sub process {
 				next if ($start_char =~ /^\S$/);
 				next if (index(" \t.,;?!", $end_char) == -1);
 
-                                # avoid repeating hex occurrences like 'ff ff fe 09 ...'
-                                if ($first =~ /\b[0-9a-f]{2,}\b/i) {
-                                        next if (!exists($allow_repeated_words{lc($first)}));
-                                }
+				# avoid repeating hex occurrences like 'ff ff fe 09 ...'
+				if ($first =~ /\b[0-9a-f]{2,}\b/i) {
+					next if (!exists($allow_repeated_words{lc($first)}));
+				}
 
 				if (WARN("REPEATED_WORD",
 					 "Possible repeated word: '$first'\n" . $herecurr) &&
@@ -4432,7 +4432,7 @@ sub process {
 			WARN("STATIC_CONST_CHAR_ARRAY",
 			     "char * array declaration might be better as static const\n" .
 				$herecurr);
-               }
+		}
 
 # check for sizeof(foo)/sizeof(foo[0]) that could be ARRAY_SIZE(foo)
 		if ($line =~ m@\bsizeof\s*\(\s*($Lval)\s*\)@) {
@@ -5285,7 +5285,7 @@ sub process {
 		    $lines[$linenr - 3] !~ /^[ +]\s*$Ident\s*:/) {
 			WARN("RETURN_VOID",
 			     "void function return statements are not generally useful\n" . $hereprev);
-               }
+		}
 
 # if statements using unnecessary parentheses - ie: if ((foo == bar))
 		if ($perl_version_ok &&
Signature · 6 lines
2.27.0

_______________________________________________
Linux-kernel-mentees mailing list
[email protected]
https://lists.linuxfoundation.org/mailman/listinfo/linux-kernel-mentees
maintainer Acked-by on v1 1/1
#1 lore raw
Quoted 2 lines · Dwaipayan Ray

Indentations should use tabs wherever possible.
Replace spaces by tabs for indents.

Thanks.

Quoted 66 lines

---
 scripts/checkpatch.pl | 18 +++++++++---------

 1 file changed, 9 insertions(+), 9 deletions(-)
scripts/checkpatch.pl +1 -1
index e6857bdfcb2d..7a323ca8a177 100755
@@ -2974,7 +2974,7 @@ sub process {
  				}
  				if (!defined $lines[$linenr]) {
  					WARN("BAD_SIGN_OFF",
-                                             "Co-developed-by: must be immediately followed by Signed-off-by:\n" . "$here\n" . $rawline);
+					     "Co-developed-by: must be immediately followed by Signed-off-by:\n" . "$here\n" . $rawline);
  				} elsif ($rawlines[$linenr] !~ /^\s*signed-off-by:\s*(.*)/i) {
  					WARN("BAD_SIGN_OFF",
  					     "Co-developed-by: must be immediately followed by Signed-off-by:\n" . "$here\n" . $rawline . "\n" .$rawlines[$linenr]);
@@ -2997,8 +2997,8 @@ sub process {
  			if (ERROR("GERRIT_CHANGE_ID",

  "Remove Gerrit Change-Id's before submitting upstream\n" . $herecurr) && $fix) {

scripts/checkpatch.pl +2 -2
-                                fix_delete_line($fixlinenr, $rawline);
-                        }
+				fix_delete_line($fixlinenr, $rawline);
+			}

  }

 # Check if the commit log is in a possible stack dump

scripts/checkpatch.pl +0 -0
@@ -3240,10 +3240,10 @@ sub process {
  				next if ($start_char =~ /^\S$/);
  				next if (index(" \t.,;?!", $end_char) == -1);

scripts/checkpatch.pl +4 -4
-                                # avoid repeating hex occurrences like 'ff ff fe 09 ...'
-                                if ($first =~ /\b[0-9a-f]{2,}\b/i) {
-                                        next if (!exists($allow_repeated_words{lc($first)}));
-                                }
+				# avoid repeating hex occurrences like 'ff ff fe 09 ...'
+				if ($first =~ /\b[0-9a-f]{2,}\b/i) {
+					next if (!exists($allow_repeated_words{lc($first)}));
+				}

  if (WARN("REPEATED_WORD",
  "Possible repeated word: '$first'\n" . $herecurr) &&

scripts/checkpatch.pl +0 -0
@@ -4432,7 +4432,7 @@ sub process {
  			WARN("STATIC_CONST_CHAR_ARRAY",

  "char * array declaration might be better as static const\n" . $herecurr);

scripts/checkpatch.pl +1 -1
-               }
+		}

 # check for sizeof(foo)/sizeof(foo[0]) that could be ARRAY_SIZE(foo)
 		if ($line =~ m@\bsizeof\s*\(\s*($Lval)\s*\)@) {
scripts/checkpatch.pl +1 -1
@@ -5285,7 +5285,7 @@ sub process {
  		    $lines[$linenr - 3] !~ /^[ +]\s*$Ident\s*:/) {
  			WARN("RETURN_VOID",
  			     "void function return statements are not generally useful\n" . $hereprev);
-               }
+		}

Quoted 2 lines
 # if statements using unnecessary parentheses - ie: if ((foo == bar))
 		if ($perl_version_ok &&

_______________________________________________
Linux-kernel-mentees mailing list
[email protected]
https://lists.linuxfoundation.org/mailman/listinfo/linux-kernel-mentees