lkml.org 
[lkml]   [2020]   [Oct]   [31]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [PATCH] checkpatch: improve handling of email comments
From
Date

> Try this git log grep:
>
> $ git log --format=email -100000 | \
> grep -P '^(?:[\w\-]+-by:|cc:|CC:|Cc:)' | \
> grep -v 'stable\@' | \
> grep -P '\>.+'
>
> This finds any signature/cc line with content after an
> email address that end with a close angle bracket that
> doesn't go to the stable address.
>
> Think about what content after that close angle bracket
> should and shoud not be allowed.
>
> There are a few variants here:
>
> o comments (optional whitespace, followed by '#' or '[' or '(' or c89)
> o misuse of quote (around the whole name and address)
> o Odd commas after '>' likely from defective cut'n'paste use
>
> Then add this to the first grep to avoid the comments as above
>
> $ git log --format=email -100000 | \
> grep -P '^(?:[\w\-]+-by:|cc:|CC:|Cc:)' | \
> grep -v 'stable\@' | \
> grep -P '\>.+' | \
> grep -vP '\>\s*(?:\#|\(|/\*|\[)'
>
> Shouldn't all these be reported?
> Are they if your patch is applied?
>
> Then look at the addresses that do not have a close angle
> bracket and also have more content after the email address.
>
> $ git log --format=email -100000 | \
> grep -P '^(?:[\w\-]+-by:|cc:|CC:|Cc:)' | \
> grep -v 'stable@' | \
> grep -vP '<[\w\.\@\+\-]+>' | \
> grep -vP '[\w\.\@\+\-]+$'
>
> What of all of these should be reported?
>
> Happy testing...
>
Hi,
So I ran the tests and there are some interesting results.

The warnings were the same before and after this patch
was applied.

For illegal elements after the closing braces, there were
several errors for which no warnings were reported. These
are:

      6 Cc: Peter Zijlstra <peterz@infradead.org>,
      5 Reviewed-by: "Dietmar Eggemann <dietmar.eggemann@arm.com>"
      1 Suggested-by: Julia Lawall <julia.lawall@lip6.fr>.
      1 Signed-off-by: Vishal Kulkarni <vishal@chelsio.com>"
      1 Signed-off-by: Vishal Kulkarni <vishal@chelsio.com>"
      1 Signed-off-by: Vishal Kulkarni <vishal@chelsio.com>"
      1 Signed-off-by: Veerabhadrarao Badiganti
<vbadigan@codeaurora.org> Link:
      1 Signed-off-by: Jingle Wu <jingle.wu@emc.com.tw>.
      1 Reviewed-by: Tvrtko Ursulin <tvrtko.ursulin@linux.intel.com>,
      1 Reviewed-by: Max Gurtovoy <maxg@mellanox.com
<mailto:maxg@mellanox.com>>
      1 Reviewed-by: Maulik Shah <mkshah@codeaurora.org> Thanks, Maulik
      1 Reviewed-by: Marc Zyngier <maz@kernel.org> Link:
https://lore.kernel.org/r/20200826112331.047917603@linutronix.de
      1 Reviewed-by: David Sterba <dsterba@suse.com>i
      1 Reviewed-by: David Sterba <dsterba@suse.com>c
      1 Reviewed-by: David Sterba <dsterba@suse.com>3
      1 Reviewed-by: Christoph Hellwig <hch@lst.de>,
      1 Reviewed-by: Christian König <christian.koenig@amd.com> for both.
      1 Reviewed-by: Christian König <christian.koenig@amd.com>.
      1 Reported-by: Randy Dunlap <rdunlap@infradead.org>>
      1 Reported-by: Qian Cai <cai@redhat.com>>
      1 Reported-by: Qian Cai <cai@lca.pw> writes:
      1 Reported-by: kernel test robot <lkp@intel.com> for missing #include
      1 Reported-by: "kernelci.org bot" <bot@kernelci.org>"
      1 Reported-by: kbuild test robot <lkp@intel.com>]
      1 Reported-by: Bob Sanders <bob.sanders@hpe.com> and the LTP
testsuite
      1 Cc: Wolfram Sang <wsa@kernel.org>,
      1 Cc: Valdis Kletnieks <valdis.kletnieks@vt.edu>,
      1 Cc: Tvrtko Ursulin <tvrtko.ursulin@linux.intel.com>,
      1 CC: Stephen Rothwell <sfr@canb.auug.org.au>,
      1 Cc: Sia, Jee Heng <jee.heng.sia@intel.com>;
alsa-devel@alsa-project.org; linux-kernel@vger.kernel.org;
clang-built-linux@googlegroups.com; Nathan Chancellor
<natechancellor@gmail.com>
      1 Cc: Robert Sesek <rsesek@google.com>,
      1 CC: Peter Zijlstra <peterz@infradead.org>,
      1 Cc: Omar Sandoval <osandov@fb.com>,
      1 Cc: Michael Neuling <mikey@neuling.org> <mikey@neuling.org>
      1 Cc: Maxime Ripard <mripard@kernel.org>,
      1 Cc: "Martin K. Petersen" <martin.petersen@oracle.com>,
      1 Cc: Mark Scott <mscott@forcepoint.com>,
      1 Cc: Mark Rutland <mark.rutland@arm.com>.
      1 Cc: Mark Rutland <mark.rutland@arm.com>,
      1 Cc: Mark Rutland <mark.rutland@arm.com>,
      1 Cc: Laurent Pinchart <Laurent.pinchart@ideasonboard.com>,
      1 Cc: Kees Cook <keescook@google.com>,
      1 Cc: Jonas Karlman <jonas@kwiboo.se>,
      1 Cc: Jernej Skrabec <jernej.skrabec@siol.net>,
      1 Cc: Jason Wang <jasowang@redhat.com>; Parav Pandit
<parav@mellanox.com>; virtualization@lists.linux-foundation.org;
linux-kernel@vger.kernel.org; kernel-janitors@vger.kernel.org
      1 Cc: Jann Horn <jannh@google.com>,
      1 Cc: James Bottomley <james.bottomley@hansenpartnership.com>,
      1 Cc: Icenowy Zheng <icenowy@aosc.io>,
      1 Cc: Dan Murphy <dmurphy@ti.com>A
      1 Cc: Daniel Vetter <daniel@ffwll.ch>,
      1 Cc: Christoph Lameter <cl@linux.com>Cc: Pekka Enberg
<penberg@kernel.org>
      1 Cc: Christoph Hellwig <hch@lst.de>,
      1 Cc: Christian König <christian.koenig@amd.com>.
      1 CC: "Chang S. Bae" <chang.seok.bae@intel.com>,
      1 Cc: Al Viro <viro@zeniv.linux.org.uk>e
      1 Acked-by: Thomas Bogendoerfer <tsbogend@alpha.franken.de>A
      1 Acked-by: Geert Uytterhoeven <geert@linux-m68k.org>A


For cases with no closing '>', following cases were not
reported by checkpatch:

      6 Cc: linux-arm-kernel@lists.infradead.org,
      1 Reviewed-by: Max Gurtovoy <maxg@mellanox.com
<mailto:maxg@mellanox.com>>
      1 Cc: rostedt@goodmis.org,
      1 Cc: linux-wireless@vger.kernel.org,
      1 Cc: dri-devel@lists.freedesktop.org,

So it's mostly extra commas at the end. But other
illegal characters were also there. Also in one or two
cases, multiple addresses were stacked together.
I think these all deserve to be reported.

Thanks,
Dwaipayan.

\
 
 \ /
  Last update: 2020-10-31 22:10    [W:0.045 / U:2.316 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site