summaryrefslogtreecommitdiff
path: root/util
diff options
context:
space:
mode:
authorElyes Haouas <ehaouas@noos.fr>2022-05-08 10:07:12 +0200
committerMartin L Roth <gaumless@tutanota.com>2022-05-16 02:28:02 +0000
commit0014bce46be97f28594248bbf9951bd0d0c4bf17 (patch)
treeb43ce1e37e333cdee4c4e62ceb8a6579f61ce70a /util
parent026978bce588f9d26d443fbacbf8dcc90957e331 (diff)
util/lint/checkpatch.pl: Fix "Invalid color mode" error message
Remove duplicated code: "if ($color =~ /^[01]$/) { $color = !$color; } elsif ($color =~ /^always$/i) { $color = 1; } elsif ($color =~ /^never$/i) { $color = 0; } elsif ($color =~ /^auto$/i) { $color = (-t STDOUT); } else { die "$P: Invalid color mode: $color\n"; }" Change-Id: I5713c364edea806e58df26c3a37b4bba7603ed0a Signed-off-by: Elyes Haouas <ehaouas@noos.fr> Reviewed-on: https://review.coreboot.org/c/coreboot/+/64172 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Martin L Roth <gaumless@tutanota.com>
Diffstat (limited to 'util')
-rwxr-xr-xutil/lint/checkpatch.pl12
1 files changed, 0 insertions, 12 deletions
diff --git a/util/lint/checkpatch.pl b/util/lint/checkpatch.pl
index 81fda35d33..a7a31db144 100755
--- a/util/lint/checkpatch.pl
+++ b/util/lint/checkpatch.pl
@@ -398,18 +398,6 @@ if ($#ARGV < 0) {
# skip TAB size 1 to avoid additional checks on $tabsize - 1
die "$P: Invalid TAB size: $tabsize\n" if ($tabsize < 2);
-if ($color =~ /^[01]$/) {
- $color = !$color;
-} elsif ($color =~ /^always$/i) {
- $color = 1;
-} elsif ($color =~ /^never$/i) {
- $color = 0;
-} elsif ($color =~ /^auto$/i) {
- $color = (-t STDOUT);
-} else {
- die "Invalid color mode: $color\n";
-}
-
sub hash_save_array_words {
my ($hashRef, $arrayRef) = @_;