[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <20200311191128.7896-1-scott.branden@broadcom.com>
Date: Wed, 11 Mar 2020 12:11:28 -0700
From: Scott Branden <scott.branden@...adcom.com>
To: Andy Whitcroft <apw@...onical.com>, Joe Perches <joe@...ches.com>,
Greg Kroah-Hartman <gregkh@...uxfoundation.org>
Cc: linux-kernel@...r.kernel.org,
bcm-kernel-feedback-list@...adcom.com,
Scott Branden <scott.branden@...adcom.com>
Subject: [PATCH] checkpatch: always allow C99 SPDX License Identifer comments
Always allow C99 comment styles if SPDK-License-Identifier is in comment
even if C99_COMMENT_TOLERANCE is specified in the --ignore options.
Signed-off-by: Scott Branden <scott.branden@...adcom.com>
---
scripts/checkpatch.pl | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/scripts/checkpatch.pl b/scripts/checkpatch.pl
index a63380c6b0d2..c8b429dd6b51 100755
--- a/scripts/checkpatch.pl
+++ b/scripts/checkpatch.pl
@@ -3852,8 +3852,8 @@ sub process {
}
}
-# no C99 // comments
- if ($line =~ m{//}) {
+# no C99 // comments except for SPDX-License-Identifier
+ if ($line =~ m{//} && $rawline !~ /SPDX-License-Identifier:/) {
if (ERROR("C99_COMMENTS",
"do not use C99 // comments\n" . $herecurr) &&
$fix) {
--
2.17.1
Powered by blists - more mailing lists