From: Tobin C. Harding Date: Tue, 10 Apr 2018 23:33:24 +0000 (-0700) Subject: checkpatch: remove unused variable declarations X-Git-Tag: Ubuntu-5.2.0-15.16~4620^2~44 X-Git-Url: https://git.proxmox.com/?a=commitdiff_plain;h=c2066ca350b32f1d3d69743c59099c6f91f7a559;p=mirror_ubuntu-eoan-kernel.git checkpatch: remove unused variable declarations Variables are declared and not used, we should remove them. Link: http://lkml.kernel.org/r/1519700648-23108-3-git-send-email-me@tobin.cc Signed-off-by: Tobin C. Harding Cc: Joe Perches Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- diff --git a/scripts/checkpatch.pl b/scripts/checkpatch.pl index a0808e46c6fe..ea6d0f3fc057 100755 --- a/scripts/checkpatch.pl +++ b/scripts/checkpatch.pl @@ -6096,7 +6096,6 @@ sub process { } if ($r1 !~ /^sizeof\b/ && $r2 =~ /^sizeof\s*\S/ && !($r1 =~ /^$Constant$/ || $r1 =~ /^[A-Z_][A-Z0-9_]*$/)) { - my $ctx = ''; my $herectx = $here . "\n"; my $cnt = statement_rawlines($stat); for (my $n = 0; $n < $cnt; $n++) { @@ -6184,7 +6183,6 @@ sub process { if ($^V && $^V ge 5.10.0 && defined $stat && $stat =~ /^\+[$;\s]*(?:case[$;\s]+\w+[$;\s]*:[$;\s]*|)*[$;\s]*\bdefault[$;\s]*:[$;\s]*;/g) { - my $ctx = ''; my $herectx = $here . "\n"; my $cnt = statement_rawlines($stat); for (my $n = 0; $n < $cnt; $n++) {