mirror of
https://github.com/tbsdtv/linux_media.git
synced 2025-07-23 12:43:29 +02:00
checkpatch: trivial style fixes
Indentations should use tabs wherever possible. Replace spaces by tabs for indents. Link: https://lkml.kernel.org/r/20210105103044.40282-1-dwaipayanray1@gmail.com Signed-off-by: Dwaipayan Ray <dwaipayanray1@gmail.com> Acked-by: Joe Perches <joe@perches.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
This commit is contained in:
committed by
Linus Torvalds
parent
35cdcbfc5c
commit
ea7dbab3e5
@@ -2974,7 +2974,7 @@ sub process {
|
|||||||
}
|
}
|
||||||
if (!defined $lines[$linenr]) {
|
if (!defined $lines[$linenr]) {
|
||||||
WARN("BAD_SIGN_OFF",
|
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) {
|
} elsif ($rawlines[$linenr] !~ /^\s*signed-off-by:\s*(.*)/i) {
|
||||||
WARN("BAD_SIGN_OFF",
|
WARN("BAD_SIGN_OFF",
|
||||||
"Co-developed-by: must be immediately followed by Signed-off-by:\n" . "$here\n" . $rawline . "\n" .$rawlines[$linenr]);
|
"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",
|
if (ERROR("GERRIT_CHANGE_ID",
|
||||||
"Remove Gerrit Change-Id's before submitting upstream\n" . $herecurr) &&
|
"Remove Gerrit Change-Id's before submitting upstream\n" . $herecurr) &&
|
||||||
$fix) {
|
$fix) {
|
||||||
fix_delete_line($fixlinenr, $rawline);
|
fix_delete_line($fixlinenr, $rawline);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
# Check if the commit log is in a possible stack dump
|
# Check if the commit log is in a possible stack dump
|
||||||
@@ -3240,10 +3240,10 @@ sub process {
|
|||||||
next if ($start_char =~ /^\S$/);
|
next if ($start_char =~ /^\S$/);
|
||||||
next if (index(" \t.,;?!", $end_char) == -1);
|
next if (index(" \t.,;?!", $end_char) == -1);
|
||||||
|
|
||||||
# avoid repeating hex occurrences like 'ff ff fe 09 ...'
|
# avoid repeating hex occurrences like 'ff ff fe 09 ...'
|
||||||
if ($first =~ /\b[0-9a-f]{2,}\b/i) {
|
if ($first =~ /\b[0-9a-f]{2,}\b/i) {
|
||||||
next if (!exists($allow_repeated_words{lc($first)}));
|
next if (!exists($allow_repeated_words{lc($first)}));
|
||||||
}
|
}
|
||||||
|
|
||||||
if (WARN("REPEATED_WORD",
|
if (WARN("REPEATED_WORD",
|
||||||
"Possible repeated word: '$first'\n" . $herecurr) &&
|
"Possible repeated word: '$first'\n" . $herecurr) &&
|
||||||
@@ -4423,7 +4423,7 @@ sub process {
|
|||||||
WARN("STATIC_CONST_CHAR_ARRAY",
|
WARN("STATIC_CONST_CHAR_ARRAY",
|
||||||
"char * array declaration might be better as static const\n" .
|
"char * array declaration might be better as static const\n" .
|
||||||
$herecurr);
|
$herecurr);
|
||||||
}
|
}
|
||||||
|
|
||||||
# check for sizeof(foo)/sizeof(foo[0]) that could be ARRAY_SIZE(foo)
|
# check for sizeof(foo)/sizeof(foo[0]) that could be ARRAY_SIZE(foo)
|
||||||
if ($line =~ m@\bsizeof\s*\(\s*($Lval)\s*\)@) {
|
if ($line =~ m@\bsizeof\s*\(\s*($Lval)\s*\)@) {
|
||||||
@@ -5276,7 +5276,7 @@ sub process {
|
|||||||
$lines[$linenr - 3] !~ /^[ +]\s*$Ident\s*:/) {
|
$lines[$linenr - 3] !~ /^[ +]\s*$Ident\s*:/) {
|
||||||
WARN("RETURN_VOID",
|
WARN("RETURN_VOID",
|
||||||
"void function return statements are not generally useful\n" . $hereprev);
|
"void function return statements are not generally useful\n" . $hereprev);
|
||||||
}
|
}
|
||||||
|
|
||||||
# if statements using unnecessary parentheses - ie: if ((foo == bar))
|
# if statements using unnecessary parentheses - ie: if ((foo == bar))
|
||||||
if ($perl_version_ok &&
|
if ($perl_version_ok &&
|
||||||
|
Reference in New Issue
Block a user