[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <392eeae782302ee8812a3c932a602035deed1609.1535351453.git.christophe.leroy@c-s.fr>
Date: Mon, 27 Aug 2018 06:59:47 +0000 (UTC)
From: Christophe Leroy <christophe.leroy@....fr>
To: Andy Whitcroft <apw@...onical.com>, Joe Perches <joe@...ches.com>
Cc: linux-kernel@...r.kernel.org
Subject: [PATCH] checkpatch: remove GCC_BINARY_CONSTANT warning
This warning was there to avoid the use of 0bxxx values
as they are not supported by gcc prior to v4.3
Since commit cafa0010cd51f ("Raise the minimum required gcc
version to 4.6"), it's not an issue anymore and using
such values can increase readability of code.
Signed-off-by: Christophe Leroy <christophe.leroy@....fr>
---
scripts/checkpatch.pl | 11 -----------
1 file changed, 11 deletions(-)
diff --git a/scripts/checkpatch.pl b/scripts/checkpatch.pl
index 5219280bf7ff..d98650790722 100755
--- a/scripts/checkpatch.pl
+++ b/scripts/checkpatch.pl
@@ -4933,17 +4933,6 @@ sub process {
while ($line =~ m{($Constant|$Lval)}g) {
my $var = $1;
-#gcc binary extension
- if ($var =~ /^$Binary$/) {
- if (WARN("GCC_BINARY_CONSTANT",
- "Avoid gcc v4.3+ binary constant extension: <$var>\n" . $herecurr) &&
- $fix) {
- my $hexval = sprintf("0x%x", oct($var));
- $fixed[$fixlinenr] =~
- s/\b$var\b/$hexval/;
- }
- }
-
#CamelCase
if ($var !~ /^$Constant$/ &&
$var =~ /[A-Z][a-z]|[a-z][A-Z]/ &&
--
2.13.3
Powered by blists - more mailing lists