linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] checkpatch: trivial style fixes
@ 2021-01-05 10:30 Dwaipayan Ray
  2021-01-05 10:37 ` Joe Perches
  0 siblings, 1 reply; 2+ messages in thread
From: Dwaipayan Ray @ 2021-01-05 10:30 UTC (permalink / raw)
  To: joe; +Cc: dwaipayanray1, linux-kernel-mentees, linux-kernel, lukas.bulwahn

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

Signed-off-by: Dwaipayan Ray <dwaipayanray1@gmail.com>
---
 scripts/checkpatch.pl | 18 +++++++++---------
 1 file changed, 9 insertions(+), 9 deletions(-)

diff --git a/scripts/checkpatch.pl b/scripts/checkpatch.pl
index e6857bdfcb2d..7a323ca8a177 100755
--- a/scripts/checkpatch.pl
+++ b/scripts/checkpatch.pl
@@ -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 &&
-- 
2.27.0


^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH] checkpatch: trivial style fixes
  2021-01-05 10:30 [PATCH] checkpatch: trivial style fixes Dwaipayan Ray
@ 2021-01-05 10:37 ` Joe Perches
  0 siblings, 0 replies; 2+ messages in thread
From: Joe Perches @ 2021-01-05 10:37 UTC (permalink / raw)
  To: Dwaipayan Ray, Andrew Morton
  Cc: linux-kernel-mentees, linux-kernel, lukas.bulwahn

On Tue, 2021-01-05 at 16:00 +0530, Dwaipayan Ray wrote:
> Indentations should use tabs wherever possible.
> Replace spaces by tabs for indents.

Thanks.

Acked-by: Joe Perches <joe@perches.com>

> 
> Signed-off-by: Dwaipayan Ray <dwaipayanray1@gmail.com>
> ---
>  scripts/checkpatch.pl | 18 +++++++++---------
>  1 file changed, 9 insertions(+), 9 deletions(-)
> 
> diff --git a/scripts/checkpatch.pl b/scripts/checkpatch.pl
> index e6857bdfcb2d..7a323ca8a177 100755
> --- a/scripts/checkpatch.pl
> +++ b/scripts/checkpatch.pl
> @@ -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 &&



^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2021-01-05 10:38 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-01-05 10:30 [PATCH] checkpatch: trivial style fixes Dwaipayan Ray
2021-01-05 10:37 ` Joe Perches

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).