linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] checkpatch: always allow C99 SPDX License Identifer comments
@ 2020-03-11 19:11 Scott Branden
  2020-03-12  2:26 ` Joe Perches
  0 siblings, 1 reply; 6+ messages in thread
From: Scott Branden @ 2020-03-11 19:11 UTC (permalink / raw)
  To: Andy Whitcroft, Joe Perches, Greg Kroah-Hartman
  Cc: linux-kernel, bcm-kernel-feedback-list, Scott Branden

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@broadcom.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


^ permalink raw reply related	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2020-03-13  8:23 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-03-11 19:11 [PATCH] checkpatch: always allow C99 SPDX License Identifer comments Scott Branden
2020-03-12  2:26 ` Joe Perches
2020-03-12  2:48   ` Scott Branden
2020-03-12  4:42     ` Joe Perches
2020-03-13  2:47       ` Scott Branden
2020-03-13  8:21     ` [PATCH] checkpatch: No additional checking of SPDX License Identifier necessary Joe Perches

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).