linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 1/2] checkpatch: Don't interpret stack dumps as commit IDs
@ 2019-07-19 22:31 Joe Perches
  2019-07-19 22:31 ` [PATCH 2/2] checkpatch: Improve SPDX license checking Joe Perches
  2019-07-20  2:20 ` [PATCH 1/2] checkpatch: Don't interpret stack dumps as commit IDs Stephen Rothwell
  0 siblings, 2 replies; 6+ messages in thread
From: Joe Perches @ 2019-07-19 22:31 UTC (permalink / raw)
  To: Andrew Morton, Andy Whitcroft; +Cc: Stephen Rothwell, linux-kernel

Add more types of lines that appear to be stack dumps that also include
hex lines that might otherwise be interpreted as commit IDs.

Link: http://lkml.kernel.org/r/ff00208289224f0ca4eaf4ff7c9c6e087dad0a63.camel@perches.com

Signed-off-by: Joe Perches <joe@perches.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au>
---

This replaces the unsigned patch with an incomplete commit description
in -next.

 scripts/checkpatch.pl | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/scripts/checkpatch.pl b/scripts/checkpatch.pl
index 93a7edfe0f05..3c0ee0dde850 100755
--- a/scripts/checkpatch.pl
+++ b/scripts/checkpatch.pl
@@ -2725,8 +2725,10 @@ sub process {
 		    ($line =~ /^\s*(?:WARNING:|BUG:)/ ||
 		     $line =~ /^\s*\[\s*\d+\.\d{6,6}\s*\]/ ||
 					# timestamp
-		     $line =~ /^\s*\[\<[0-9a-fA-F]{8,}\>\]/)) {
-					# stack dump address
+		     $line =~ /^\s*\[\<[0-9a-fA-F]{8,}\>\]/) ||
+		     $line =~ /^(?:\s+\w+:\s+[0-9a-fA-F]+){3,3}/ ||
+		     $line =~ /^\s*\#\d+\s*\[[0-9a-fA-F]+\]\s*\w+ at [0-9a-fA-F]+/) {
+					# stack dump address styles
 			$commit_log_possible_stack_dump = 1;
 		}
 
-- 
2.15.0


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

* [PATCH 2/2] checkpatch: Improve SPDX license checking
  2019-07-19 22:31 [PATCH 1/2] checkpatch: Don't interpret stack dumps as commit IDs Joe Perches
@ 2019-07-19 22:31 ` Joe Perches
  2019-07-20  2:22   ` Stephen Rothwell
  2019-07-20  2:20 ` [PATCH 1/2] checkpatch: Don't interpret stack dumps as commit IDs Stephen Rothwell
  1 sibling, 1 reply; 6+ messages in thread
From: Joe Perches @ 2019-07-19 22:31 UTC (permalink / raw)
  To: Andrew Morton, Andy Whitcroft; +Cc: Stephen Rothwell, linux-kernel

Use perl's m@<match>@ match and not /<match>/ comparisons to avoid
an error using c90's // comment style.

Miscellanea:

o Use normal tab indentation and alignment

Link: http://lkml.kernel.org/r/5e4a8fa7901148fbcd77ab391e6dd0e6bf95777f.camel@perches.com

Signed-off-by: Joe Perches <joe@perches.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au>
---

This replaces the unsigned patch with an incomplete commit description
in -next.

scripts/checkpatch.pl | 18 +++++++++---------
 1 file changed, 9 insertions(+), 9 deletions(-)

diff --git a/scripts/checkpatch.pl b/scripts/checkpatch.pl
index 3c0ee0dde850..6cb99ec62000 100755
--- a/scripts/checkpatch.pl
+++ b/scripts/checkpatch.pl
@@ -3071,21 +3071,21 @@ sub process {
 # check SPDX comment style for .[chsS] files
 				if ($realfile =~ /\.[chsS]$/ &&
 				    $rawline =~ /SPDX-License-Identifier:/ &&
-				    $rawline !~ /^\+\s*\Q$comment\E\s*/) {
+				    $rawline !~ m@^\+\s*\Q$comment\E\s*@) {
 					WARN("SPDX_LICENSE_TAG",
 					     "Improper SPDX comment style for '$realfile', please use '$comment' instead\n" . $herecurr);
 				}
 
 				if ($comment !~ /^$/ &&
-				    $rawline !~ /^\+\Q$comment\E SPDX-License-Identifier: /) {
-					 WARN("SPDX_LICENSE_TAG",
-					      "Missing or malformed SPDX-License-Identifier tag in line $checklicenseline\n" . $herecurr);
+				    $rawline !~ m@^\+\Q$comment\E SPDX-License-Identifier: @) {
+					WARN("SPDX_LICENSE_TAG",
+					     "Missing or malformed SPDX-License-Identifier tag in line $checklicenseline\n" . $herecurr);
 				} elsif ($rawline =~ /(SPDX-License-Identifier: .*)/) {
-					 my $spdx_license = $1;
-					 if (!is_SPDX_License_valid($spdx_license)) {
-						  WARN("SPDX_LICENSE_TAG",
-						       "'$spdx_license' is not supported in LICENSES/...\n" . $herecurr);
-					 }
+					my $spdx_license = $1;
+					if (!is_SPDX_License_valid($spdx_license)) {
+						WARN("SPDX_LICENSE_TAG",
+						     "'$spdx_license' is not supported in LICENSES/...\n" . $herecurr);
+					}
 				}
 			}
 		}
-- 
2.15.0


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

* Re: [PATCH 1/2] checkpatch: Don't interpret stack dumps as commit IDs
  2019-07-19 22:31 [PATCH 1/2] checkpatch: Don't interpret stack dumps as commit IDs Joe Perches
  2019-07-19 22:31 ` [PATCH 2/2] checkpatch: Improve SPDX license checking Joe Perches
@ 2019-07-20  2:20 ` Stephen Rothwell
  1 sibling, 0 replies; 6+ messages in thread
From: Stephen Rothwell @ 2019-07-20  2:20 UTC (permalink / raw)
  To: Joe Perches; +Cc: Andrew Morton, Andy Whitcroft, linux-kernel

[-- Attachment #1: Type: text/plain, Size: 753 bytes --]

Hi Joe,

On Fri, 19 Jul 2019 15:31:32 -0700 Joe Perches <joe@perches.com> wrote:
>
> Add more types of lines that appear to be stack dumps that also include
> hex lines that might otherwise be interpreted as commit IDs.
> 
> Link: http://lkml.kernel.org/r/ff00208289224f0ca4eaf4ff7c9c6e087dad0a63.camel@perches.com

That lnk gives me "404 not found"

> Signed-off-by: Joe Perches <joe@perches.com>
> Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
> Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au>

You really should not add Andrew and my SOB lines (since we did not
write this patch).  Those were there in -next because we handled the
patch along it way.  Thanks for your SOB though.

-- 
Cheers,
Stephen Rothwell

[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 488 bytes --]

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

* Re: [PATCH 2/2] checkpatch: Improve SPDX license checking
  2019-07-19 22:31 ` [PATCH 2/2] checkpatch: Improve SPDX license checking Joe Perches
@ 2019-07-20  2:22   ` Stephen Rothwell
  2019-07-20  3:09     ` Joe Perches
  0 siblings, 1 reply; 6+ messages in thread
From: Stephen Rothwell @ 2019-07-20  2:22 UTC (permalink / raw)
  To: Joe Perches; +Cc: Andrew Morton, Andy Whitcroft, linux-kernel

[-- Attachment #1: Type: text/plain, Size: 628 bytes --]

Hi Joe,

On Fri, 19 Jul 2019 15:31:33 -0700 Joe Perches <joe@perches.com> wrote:
>
> Use perl's m@<match>@ match and not /<match>/ comparisons to avoid
> an error using c90's // comment style.
> 
> Miscellanea:
> 
> o Use normal tab indentation and alignment
> 
> Link: http://lkml.kernel.org/r/5e4a8fa7901148fbcd77ab391e6dd0e6bf95777f.camel@perches.com
> 
> Signed-off-by: Joe Perches <joe@perches.com>
> Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
> Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au>

Again, don't include other's (non author's) SOB lines.

-- 
Cheers,
Stephen Rothwell

[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 488 bytes --]

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

* Re: [PATCH 2/2] checkpatch: Improve SPDX license checking
  2019-07-20  2:22   ` Stephen Rothwell
@ 2019-07-20  3:09     ` Joe Perches
  2019-07-20  3:17       ` Stephen Rothwell
  0 siblings, 1 reply; 6+ messages in thread
From: Joe Perches @ 2019-07-20  3:09 UTC (permalink / raw)
  To: Stephen Rothwell; +Cc: Andrew Morton, Andy Whitcroft, linux-kernel

On Sat, 2019-07-20 at 12:22 +1000, Stephen Rothwell wrote:
> Hi Joe,
> 
> On Fri, 19 Jul 2019 15:31:33 -0700 Joe Perches <joe@perches.com> wrote:
> > Use perl's m@<match>@ match and not /<match>/ comparisons to avoid
> > an error using c90's // comment style.
> > 
> > Miscellanea:
> > 
> > o Use normal tab indentation and alignment
> > 
> > Link: http://lkml.kernel.org/r/5e4a8fa7901148fbcd77ab391e6dd0e6bf95777f.camel@perches.com
> > 
> > Signed-off-by: Joe Perches <joe@perches.com>
> > Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
> > Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au>
> 
> Again, don't include other's (non author's) SOB lines.

Nope.
You _already_ signed-off this patch.
I'm simply reproducing it.



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

* Re: [PATCH 2/2] checkpatch: Improve SPDX license checking
  2019-07-20  3:09     ` Joe Perches
@ 2019-07-20  3:17       ` Stephen Rothwell
  0 siblings, 0 replies; 6+ messages in thread
From: Stephen Rothwell @ 2019-07-20  3:17 UTC (permalink / raw)
  To: Joe Perches; +Cc: Andrew Morton, Andy Whitcroft, linux-kernel

[-- Attachment #1: Type: text/plain, Size: 1302 bytes --]

Hi Joe,

On Fri, 19 Jul 2019 20:09:19 -0700 Joe Perches <joe@perches.com> wrote:
>
> On Sat, 2019-07-20 at 12:22 +1000, Stephen Rothwell wrote:
> > Hi Joe,
> > 
> > On Fri, 19 Jul 2019 15:31:33 -0700 Joe Perches <joe@perches.com> wrote:  
> > > Use perl's m@<match>@ match and not /<match>/ comparisons to avoid
> > > an error using c90's // comment style.
> > > 
> > > Miscellanea:
> > > 
> > > o Use normal tab indentation and alignment
> > > 
> > > Link: http://lkml.kernel.org/r/5e4a8fa7901148fbcd77ab391e6dd0e6bf95777f.camel@perches.com
> > > 
> > > Signed-off-by: Joe Perches <joe@perches.com>
> > > Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
> > > Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au>  
> > 
> > Again, don't include other's (non author's) SOB lines.  
> 
> Nope.
> You _already_ signed-off this patch.
> I'm simply reproducing it.

My SOB line is *only* there because I am publishing that patch in
linux-next.  When Andrew sends that patch to Linus, my SOB should not
be there (since I will no longer be in the handling path).  My SOB does
not say anything about the correctness or otherwise of the patch.

Equally, if you sent that patch to Linus, Andrew's SOB should
(probably) not be there.

-- 
Cheers,
Stephen Rothwell

[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 488 bytes --]

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

end of thread, other threads:[~2019-07-20  3:17 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-07-19 22:31 [PATCH 1/2] checkpatch: Don't interpret stack dumps as commit IDs Joe Perches
2019-07-19 22:31 ` [PATCH 2/2] checkpatch: Improve SPDX license checking Joe Perches
2019-07-20  2:22   ` Stephen Rothwell
2019-07-20  3:09     ` Joe Perches
2019-07-20  3:17       ` Stephen Rothwell
2019-07-20  2:20 ` [PATCH 1/2] checkpatch: Don't interpret stack dumps as commit IDs Stephen Rothwell

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).