linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] kdb: Get rid of broken attempt to print CCVERSION in kdb summary
@ 2019-03-23  1:52 Douglas Anderson
  2019-03-30 12:14 ` Masahiro Yamada
  2019-04-11  9:06 ` Masahiro Yamada
  0 siblings, 2 replies; 12+ messages in thread
From: Douglas Anderson @ 2019-03-23  1:52 UTC (permalink / raw)
  To: Daniel Thompson, Masahiro Yamada
  Cc: Douglas Anderson, Jason Wessel, Christophe Leroy,
	Peter Zijlstra (Intel),
	Kees Cook, kgdb-bugreport, Johannes Weiner, linux-kernel,
	Gustavo A. R. Silva, Nicholas Mc Guire, Andrew Morton

If you drop into kdb and type "summary", it prints out a line that
says this:

  ccversion  CCVERSION

...and I don't mean that it actually prints out the version of the C
compiler.  It literally prints out the string "CCVERSION".

The version of the C Compiler is already printed at boot up and it
doesn't seem useful to replicate this in kdb.  Let's just delete it.
We can also delete the bit of the Makefile that called the C compiler
in an attempt to pass this into kdb.  This will remove one extra call
to the C compiler at Makefile parse time and (very slightly) speed up
builds.

Signed-off-by: Douglas Anderson <dianders@chromium.org>
---

 kernel/debug/kdb/Makefile   | 1 -
 kernel/debug/kdb/kdb_main.c | 1 -
 2 files changed, 2 deletions(-)

diff --git a/kernel/debug/kdb/Makefile b/kernel/debug/kdb/Makefile
index d4fc58f4b88d..efac857c5511 100644
--- a/kernel/debug/kdb/Makefile
+++ b/kernel/debug/kdb/Makefile
@@ -6,7 +6,6 @@
 # Copyright (c) 2009 Wind River Systems, Inc. All Rights Reserved.
 #
 
-CCVERSION	:= $(shell $(CC) -v 2>&1 | sed -ne '$$p')
 obj-y := kdb_io.o kdb_main.o kdb_support.o kdb_bt.o gen-kdb_cmds.o kdb_bp.o kdb_debugger.o
 obj-$(CONFIG_KDB_KEYBOARD)    += kdb_keyboard.o
 
diff --git a/kernel/debug/kdb/kdb_main.c b/kernel/debug/kdb/kdb_main.c
index 82a3b32a7cfc..fc96dbf8d9de 100644
--- a/kernel/debug/kdb/kdb_main.c
+++ b/kernel/debug/kdb/kdb_main.c
@@ -2522,7 +2522,6 @@ static int kdb_summary(int argc, const char **argv)
 	kdb_printf("machine    %s\n", init_uts_ns.name.machine);
 	kdb_printf("nodename   %s\n", init_uts_ns.name.nodename);
 	kdb_printf("domainname %s\n", init_uts_ns.name.domainname);
-	kdb_printf("ccversion  %s\n", __stringify(CCVERSION));
 
 	now = __ktime_get_real_seconds();
 	time64_to_tm(now, 0, &tm);
-- 
2.21.0.392.gf8f6787159e-goog


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

* Re: [PATCH] kdb: Get rid of broken attempt to print CCVERSION in kdb summary
  2019-03-23  1:52 [PATCH] kdb: Get rid of broken attempt to print CCVERSION in kdb summary Douglas Anderson
@ 2019-03-30 12:14 ` Masahiro Yamada
  2019-04-11  9:06 ` Masahiro Yamada
  1 sibling, 0 replies; 12+ messages in thread
From: Masahiro Yamada @ 2019-03-30 12:14 UTC (permalink / raw)
  To: Douglas Anderson
  Cc: Daniel Thompson, Jason Wessel, Christophe Leroy,
	Peter Zijlstra (Intel),
	Kees Cook, kgdb-bugreport, Johannes Weiner,
	Linux Kernel Mailing List, Gustavo A. R. Silva,
	Nicholas Mc Guire, Andrew Morton

On Sat, Mar 23, 2019 at 10:55 AM Douglas Anderson <dianders@chromium.org> wrote:
>
> If you drop into kdb and type "summary", it prints out a line that
> says this:
>
>   ccversion  CCVERSION
>
> ...and I don't mean that it actually prints out the version of the C
> compiler.  It literally prints out the string "CCVERSION".
>
> The version of the C Compiler is already printed at boot up and it
> doesn't seem useful to replicate this in kdb.  Let's just delete it.
> We can also delete the bit of the Makefile that called the C compiler
> in an attempt to pass this into kdb.  This will remove one extra call
> to the C compiler at Makefile parse time and (very slightly) speed up
> builds.
>
> Signed-off-by: Douglas Anderson <dianders@chromium.org>
> ---

Reviewed-by: Masahiro Yamada <yamada.masahiro@socionext.com>



>  kernel/debug/kdb/Makefile   | 1 -
>  kernel/debug/kdb/kdb_main.c | 1 -
>  2 files changed, 2 deletions(-)
>
> diff --git a/kernel/debug/kdb/Makefile b/kernel/debug/kdb/Makefile
> index d4fc58f4b88d..efac857c5511 100644
> --- a/kernel/debug/kdb/Makefile
> +++ b/kernel/debug/kdb/Makefile
> @@ -6,7 +6,6 @@
>  # Copyright (c) 2009 Wind River Systems, Inc. All Rights Reserved.
>  #
>
> -CCVERSION      := $(shell $(CC) -v 2>&1 | sed -ne '$$p')
>  obj-y := kdb_io.o kdb_main.o kdb_support.o kdb_bt.o gen-kdb_cmds.o kdb_bp.o kdb_debugger.o
>  obj-$(CONFIG_KDB_KEYBOARD)    += kdb_keyboard.o
>
> diff --git a/kernel/debug/kdb/kdb_main.c b/kernel/debug/kdb/kdb_main.c
> index 82a3b32a7cfc..fc96dbf8d9de 100644
> --- a/kernel/debug/kdb/kdb_main.c
> +++ b/kernel/debug/kdb/kdb_main.c
> @@ -2522,7 +2522,6 @@ static int kdb_summary(int argc, const char **argv)
>         kdb_printf("machine    %s\n", init_uts_ns.name.machine);
>         kdb_printf("nodename   %s\n", init_uts_ns.name.nodename);
>         kdb_printf("domainname %s\n", init_uts_ns.name.domainname);
> -       kdb_printf("ccversion  %s\n", __stringify(CCVERSION));
>
>         now = __ktime_get_real_seconds();
>         time64_to_tm(now, 0, &tm);
> --
> 2.21.0.392.gf8f6787159e-goog
>


-- 
Best Regards
Masahiro Yamada

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

* Re: [PATCH] kdb: Get rid of broken attempt to print CCVERSION in kdb summary
  2019-03-23  1:52 [PATCH] kdb: Get rid of broken attempt to print CCVERSION in kdb summary Douglas Anderson
  2019-03-30 12:14 ` Masahiro Yamada
@ 2019-04-11  9:06 ` Masahiro Yamada
  2019-04-16 23:30   ` Andrew Morton
  1 sibling, 1 reply; 12+ messages in thread
From: Masahiro Yamada @ 2019-04-11  9:06 UTC (permalink / raw)
  To: Douglas Anderson, Andrew Morton
  Cc: Daniel Thompson, Jason Wessel, Christophe Leroy,
	Peter Zijlstra (Intel),
	Kees Cook, kgdb-bugreport, Johannes Weiner,
	Linux Kernel Mailing List, Gustavo A. R. Silva,
	Nicholas Mc Guire

Hi Andrew,


On Sat, Mar 23, 2019 at 10:55 AM Douglas Anderson <dianders@chromium.org> wrote:
>
> If you drop into kdb and type "summary", it prints out a line that
> says this:
>
>   ccversion  CCVERSION
>
> ...and I don't mean that it actually prints out the version of the C
> compiler.  It literally prints out the string "CCVERSION".
>
> The version of the C Compiler is already printed at boot up and it
> doesn't seem useful to replicate this in kdb.  Let's just delete it.
> We can also delete the bit of the Makefile that called the C compiler
> in an attempt to pass this into kdb.  This will remove one extra call
> to the C compiler at Makefile parse time and (very slightly) speed up
> builds.
>
> Signed-off-by: Douglas Anderson <dianders@chromium.org>


I know you add lots of Cc: lines
when you pick up patches, but I think
your script can be improved.

You added "Cc: Douglas Anderson <dianders@chromium.org>",
but Douglas is the author.
I think the author should be excluded from Cc.




This commit looks as follows in linux-next:

commit 685dc1264544c947d26963dcf1ac982d3408f444
Author: Douglas Anderson <dianders@chromium.org>
Date:   Wed Apr 10 11:02:35 2019 +1000

    kdb: det rid of broken attempt to print CCVERSION in kdb summary

    If you drop into kdb and type "summary", it prints out a line that says
    this:

      ccversion  CCVERSION

    ...and I don't mean that it actually prints out the version of the C
    compiler.  It literally prints out the string "CCVERSION".

    The version of the C Compiler is already printed at boot up and it doesn't
    seem useful to replicate this in kdb.  Let's just delete it.  We can also
    delete the bit of the Makefile that called the C compiler in an attempt to
    pass this into kdb.  This will remove one extra call to the C compiler at
    Makefile parse time and (very slightly) speed up builds.

    Link: http://lkml.kernel.org/r/20190323015227.245455-1-dianders@chromium.org
    Signed-off-by: Douglas Anderson <dianders@chromium.org>
    Reviewed-by: Masahiro Yamada <yamada.masahiro@socionext.com>
    Cc: Douglas Anderson <dianders@chromium.org>
    Cc: Jason Wessel <jason.wessel@windriver.com>
    Cc: Christophe Leroy <christophe.leroy@c-s.fr>
    Cc: "Peter Zijlstra (Intel)" <peterz@infradead.org>
    Cc: Kees Cook <keescook@chromium.org>
    Cc: Johannes Weiner <hannes@cmpxchg.org>
    Cc: "Gustavo A. R. Silva" <gustavo@embeddedor.com>
    Cc: Nicholas Mc Guire <hofrat@osadl.org>,
    Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
    Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au>



> ---
>
>  kernel/debug/kdb/Makefile   | 1 -
>  kernel/debug/kdb/kdb_main.c | 1 -
>  2 files changed, 2 deletions(-)
>
> diff --git a/kernel/debug/kdb/Makefile b/kernel/debug/kdb/Makefile
> index d4fc58f4b88d..efac857c5511 100644
> --- a/kernel/debug/kdb/Makefile
> +++ b/kernel/debug/kdb/Makefile
> @@ -6,7 +6,6 @@
>  # Copyright (c) 2009 Wind River Systems, Inc. All Rights Reserved.
>  #
>
> -CCVERSION      := $(shell $(CC) -v 2>&1 | sed -ne '$$p')
>  obj-y := kdb_io.o kdb_main.o kdb_support.o kdb_bt.o gen-kdb_cmds.o kdb_bp.o kdb_debugger.o
>  obj-$(CONFIG_KDB_KEYBOARD)    += kdb_keyboard.o
>
> diff --git a/kernel/debug/kdb/kdb_main.c b/kernel/debug/kdb/kdb_main.c
> index 82a3b32a7cfc..fc96dbf8d9de 100644
> --- a/kernel/debug/kdb/kdb_main.c
> +++ b/kernel/debug/kdb/kdb_main.c
> @@ -2522,7 +2522,6 @@ static int kdb_summary(int argc, const char **argv)
>         kdb_printf("machine    %s\n", init_uts_ns.name.machine);
>         kdb_printf("nodename   %s\n", init_uts_ns.name.nodename);
>         kdb_printf("domainname %s\n", init_uts_ns.name.domainname);
> -       kdb_printf("ccversion  %s\n", __stringify(CCVERSION));
>
>         now = __ktime_get_real_seconds();
>         time64_to_tm(now, 0, &tm);
> --
> 2.21.0.392.gf8f6787159e-goog
>


-- 
Best Regards
Masahiro Yamada

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

* Re: [PATCH] kdb: Get rid of broken attempt to print CCVERSION in kdb summary
  2019-04-11  9:06 ` Masahiro Yamada
@ 2019-04-16 23:30   ` Andrew Morton
  2019-04-17  6:37     ` Masahiro Yamada
  0 siblings, 1 reply; 12+ messages in thread
From: Andrew Morton @ 2019-04-16 23:30 UTC (permalink / raw)
  To: Masahiro Yamada
  Cc: Douglas Anderson, Daniel Thompson, Jason Wessel,
	Christophe Leroy, Peter Zijlstra (Intel),
	Kees Cook, kgdb-bugreport, Johannes Weiner,
	Linux Kernel Mailing List, Gustavo A. R. Silva,
	Nicholas Mc Guire, Joe Perches

On Thu, 11 Apr 2019 18:06:23 +0900 Masahiro Yamada <yamada.masahiro@socionext.com> wrote:

> On Sat, Mar 23, 2019 at 10:55 AM Douglas Anderson <dianders@chromium.org> wrote:
> >
> > If you drop into kdb and type "summary", it prints out a line that
> > says this:
> >
> >   ccversion  CCVERSION
> >
> > ...and I don't mean that it actually prints out the version of the C
> > compiler.  It literally prints out the string "CCVERSION".
> >
> > The version of the C Compiler is already printed at boot up and it
> > doesn't seem useful to replicate this in kdb.  Let's just delete it.
> > We can also delete the bit of the Makefile that called the C compiler
> > in an attempt to pass this into kdb.  This will remove one extra call
> > to the C compiler at Makefile parse time and (very slightly) speed up
> > builds.
> >
> > Signed-off-by: Douglas Anderson <dianders@chromium.org>
> 
> 
> I know you add lots of Cc: lines
> when you pick up patches, but I think
> your script can be improved.
> 
> You added "Cc: Douglas Anderson <dianders@chromium.org>",
> but Douglas is the author.
> I think the author should be excluded from Cc.

Whoops.

It's pretty benign: Doug will still only get a single email.


checkpatch checks for duplicates cc's but I think it assumes that
things like

Reported-by: fred
Tested-by: fred

were intentional.

It would perhaps be better for checkpatch to special-case the "Cc:
fred" tag and report a duplicated Cc: if fred was also mentioned in any
other tag.


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

* Re: [PATCH] kdb: Get rid of broken attempt to print CCVERSION in kdb summary
  2019-04-16 23:30   ` Andrew Morton
@ 2019-04-17  6:37     ` Masahiro Yamada
  2019-04-18 23:06       ` Andrew Morton
  0 siblings, 1 reply; 12+ messages in thread
From: Masahiro Yamada @ 2019-04-17  6:37 UTC (permalink / raw)
  To: Andrew Morton
  Cc: Douglas Anderson, Daniel Thompson, Jason Wessel,
	Christophe Leroy, Peter Zijlstra (Intel),
	Kees Cook, kgdb-bugreport, Johannes Weiner,
	Linux Kernel Mailing List, Gustavo A. R. Silva,
	Nicholas Mc Guire, Joe Perches

Hi Andrew,

On Wed, Apr 17, 2019 at 8:31 AM Andrew Morton <akpm@linux-foundation.org> wrote:
>
> On Thu, 11 Apr 2019 18:06:23 +0900 Masahiro Yamada <yamada.masahiro@socionext.com> wrote:
>
> > On Sat, Mar 23, 2019 at 10:55 AM Douglas Anderson <dianders@chromium.org> wrote:
> > >
> > > If you drop into kdb and type "summary", it prints out a line that
> > > says this:
> > >
> > >   ccversion  CCVERSION
> > >
> > > ...and I don't mean that it actually prints out the version of the C
> > > compiler.  It literally prints out the string "CCVERSION".
> > >
> > > The version of the C Compiler is already printed at boot up and it
> > > doesn't seem useful to replicate this in kdb.  Let's just delete it.
> > > We can also delete the bit of the Makefile that called the C compiler
> > > in an attempt to pass this into kdb.  This will remove one extra call
> > > to the C compiler at Makefile parse time and (very slightly) speed up
> > > builds.
> > >
> > > Signed-off-by: Douglas Anderson <dianders@chromium.org>
> >
> >
> > I know you add lots of Cc: lines
> > when you pick up patches, but I think
> > your script can be improved.
> >
> > You added "Cc: Douglas Anderson <dianders@chromium.org>",
> > but Douglas is the author.
> > I think the author should be excluded from Cc.
>
> Whoops.
>
> It's pretty benign: Doug will still only get a single email.
>
>
> checkpatch checks for duplicates cc's but I think it assumes that
> things like
>
> Reported-by: fred
> Tested-by: fred
>
> were intentional.
>
> It would perhaps be better for checkpatch to special-case the "Cc:
> fred" tag and report a duplicated Cc: if fred was also mentioned in any
> other tag.

Sorry, I do not understand what you mean.


Douglas did not add any Cc: tag at all
in his original patch:
https://lore.kernel.org/patchwork/patch/1053953/


It's you who added the Cc: tags
(and I am guessing you did it by scripting.)

Why is this topic related to checkpatch?

-- 
Best Regards
Masahiro Yamada

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

* Re: [PATCH] kdb: Get rid of broken attempt to print CCVERSION in kdb summary
  2019-04-17  6:37     ` Masahiro Yamada
@ 2019-04-18 23:06       ` Andrew Morton
  2019-04-19  3:28         ` Masahiro Yamada
  0 siblings, 1 reply; 12+ messages in thread
From: Andrew Morton @ 2019-04-18 23:06 UTC (permalink / raw)
  To: Masahiro Yamada
  Cc: Douglas Anderson, Daniel Thompson, Jason Wessel,
	Christophe Leroy, Peter Zijlstra (Intel),
	Kees Cook, kgdb-bugreport, Johannes Weiner,
	Linux Kernel Mailing List, Gustavo A. R. Silva,
	Nicholas Mc Guire, Joe Perches

On Wed, 17 Apr 2019 15:37:49 +0900 Masahiro Yamada <yamada.masahiro@socionext.com> wrote:

> > It's pretty benign: Doug will still only get a single email.
> >
> >
> > checkpatch checks for duplicates cc's but I think it assumes that
> > things like
> >
> > Reported-by: fred
> > Tested-by: fred
> >
> > were intentional.
> >
> > It would perhaps be better for checkpatch to special-case the "Cc:
> > fred" tag and report a duplicated Cc: if fred was also mentioned in any
> > other tag.
> 
> Sorry, I do not understand what you mean.
> 
> 
> Douglas did not add any Cc: tag at all
> in his original patch:
> https://lore.kernel.org/patchwork/patch/1053953/
> 
> 
> It's you who added the Cc: tags
> (and I am guessing you did it by scripting.)
> 
> Why is this topic related to checkpatch?

Because I regularly check all patches with checkpatch but checkpatch
failed to detect that I had

Signed-off-by: Douglas Anderson <dianders@chromium.org>
...
Cc: Douglas Anderson <dianders@chromium.org>

and I believe that checkpatch could and should have warned about this
situation.


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

* Re: [PATCH] kdb: Get rid of broken attempt to print CCVERSION in kdb summary
  2019-04-18 23:06       ` Andrew Morton
@ 2019-04-19  3:28         ` Masahiro Yamada
  2019-04-19 11:14           ` Joe Perches
  0 siblings, 1 reply; 12+ messages in thread
From: Masahiro Yamada @ 2019-04-19  3:28 UTC (permalink / raw)
  To: Joe Perches
  Cc: Douglas Anderson, Daniel Thompson, Jason Wessel,
	Christophe Leroy, Peter Zijlstra (Intel),
	Kees Cook, kgdb-bugreport, Johannes Weiner,
	Linux Kernel Mailing List, Gustavo A. R. Silva,
	Nicholas Mc Guire, Andrew Morton

Hi Joe,

Can you detect redundant Cc: by checkpatch?

Please see below in details.
Thanks.


On Fri, Apr 19, 2019 at 8:07 AM Andrew Morton <akpm@linux-foundation.org> wrote:
>
> On Wed, 17 Apr 2019 15:37:49 +0900 Masahiro Yamada <yamada.masahiro@socionext.com> wrote:
>
> > > It's pretty benign: Doug will still only get a single email.
> > >
> > >
> > > checkpatch checks for duplicates cc's but I think it assumes that
> > > things like
> > >
> > > Reported-by: fred
> > > Tested-by: fred
> > >
> > > were intentional.
> > >
> > > It would perhaps be better for checkpatch to special-case the "Cc:
> > > fred" tag and report a duplicated Cc: if fred was also mentioned in any
> > > other tag.
> >
> > Sorry, I do not understand what you mean.
> >
> >
> > Douglas did not add any Cc: tag at all
> > in his original patch:
> > https://lore.kernel.org/patchwork/patch/1053953/
> >
> >
> > It's you who added the Cc: tags
> > (and I am guessing you did it by scripting.)
> >
> > Why is this topic related to checkpatch?
>
> Because I regularly check all patches with checkpatch but checkpatch
> failed to detect that I had
>
> Signed-off-by: Douglas Anderson <dianders@chromium.org>
> ...
> Cc: Douglas Anderson <dianders@chromium.org>
>
> and I believe that checkpatch could and should have warned about this
> situation.
>


-- 
Best Regards
Masahiro Yamada

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

* Re: [PATCH] kdb: Get rid of broken attempt to print CCVERSION in kdb summary
  2019-04-19  3:28         ` Masahiro Yamada
@ 2019-04-19 11:14           ` Joe Perches
  2019-04-19 20:58             ` Andrew Morton
  2019-05-06 14:28             ` Masahiro Yamada
  0 siblings, 2 replies; 12+ messages in thread
From: Joe Perches @ 2019-04-19 11:14 UTC (permalink / raw)
  To: Masahiro Yamada
  Cc: Douglas Anderson, Daniel Thompson, Jason Wessel,
	Christophe Leroy, Peter Zijlstra (Intel),
	Kees Cook, kgdb-bugreport, Johannes Weiner,
	Linux Kernel Mailing List, Gustavo A. R. Silva,
	Nicholas Mc Guire, Andrew Morton

On Fri, 2019-04-19 at 12:28 +0900, Masahiro Yamada wrote:
> Hi Joe,
> 
> Can you detect redundant Cc: by checkpatch?
> 
> Please see below in details.
> Thanks.

Yes, but I'm not sure why it's useful or necessary.
git send-email using some scripts elides duplicate email addresses
---
 scripts/checkpatch.pl | 13 +++++++++++++
 1 file changed, 13 insertions(+)

diff --git a/scripts/checkpatch.pl b/scripts/checkpatch.pl
index 1c421ac42b07..bedec83cb797 100755
--- a/scripts/checkpatch.pl
+++ b/scripts/checkpatch.pl
@@ -2688,6 +2688,19 @@ sub process {
 				$signatures{$sig_nospace} = 1;
 			}
 
+# Check for a cc: line with another signature -by: by the same author
+			if ($sig_nospace =~ /^cc:/) {
+				my $sig_email = substr($sig_nospace, 3);
+				foreach my $sig (sort keys %signatures) {
+					next if ($sig =~ /^cc:/);
+					$sig =~ s/^[^:]+://;
+					if ($sig eq $sig_email) {
+						WARN("BAD_SIGN_OFF",
+						     "Unnecessary CC: as there is another signature with the same name/email address\n" . $herecurr);
+					}
+				}
+			}
+
 # Check Co-developed-by: immediately followed by Signed-off-by: with same name and email
 			if ($sign_off =~ /^co-developed-by:$/i) {
 				if ($email eq $author) {



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

* Re: [PATCH] kdb: Get rid of broken attempt to print CCVERSION in kdb summary
  2019-04-19 11:14           ` Joe Perches
@ 2019-04-19 20:58             ` Andrew Morton
  2019-04-20  3:57               ` Joe Perches
  2019-05-06 14:28             ` Masahiro Yamada
  1 sibling, 1 reply; 12+ messages in thread
From: Andrew Morton @ 2019-04-19 20:58 UTC (permalink / raw)
  To: Joe Perches
  Cc: Masahiro Yamada, Douglas Anderson, Daniel Thompson, Jason Wessel,
	Christophe Leroy, Peter Zijlstra (Intel),
	Kees Cook, kgdb-bugreport, Johannes Weiner,
	Linux Kernel Mailing List, Gustavo A. R. Silva,
	Nicholas Mc Guire

On Fri, 19 Apr 2019 04:14:27 -0700 Joe Perches <joe@perches.com> wrote:

> On Fri, 2019-04-19 at 12:28 +0900, Masahiro Yamada wrote:
> > Hi Joe,
> > 
> > Can you detect redundant Cc: by checkpatch?
> > 
> > Please see below in details.
> > Thanks.
> 
> Yes, but I'm not sure why it's useful or necessary.
> git send-email using some scripts elides duplicate email addresses

Other (all?) MUAs will avoid addressing an email to a recipient more
than once.  The issue here is redundant Cc: lines in the changelog.

> --- a/scripts/checkpatch.pl
> +++ b/scripts/checkpatch.pl
> @@ -2688,6 +2688,19 @@ sub process {
>  				$signatures{$sig_nospace} = 1;
>  			}
>  
> +# Check for a cc: line with another signature -by: by the same author
> +			if ($sig_nospace =~ /^cc:/) {
> +				my $sig_email = substr($sig_nospace, 3);
> +				foreach my $sig (sort keys %signatures) {
> +					next if ($sig =~ /^cc:/);
> +					$sig =~ s/^[^:]+://;
> +					if ($sig eq $sig_email) {
> +						WARN("BAD_SIGN_OFF",
> +						     "Unnecessary CC: as there is another signature with the same name/email address\n" . $herecurr);
> +					}
> +				}
> +			}
> +
>  # Check Co-developed-by: immediately followed by Signed-off-by: with same name and email
>  			if ($sign_off =~ /^co-developed-by:$/i) {
>  				if ($email eq $author) {

Thanks.  But my checkpatch.pl is different from yours.

q:/usr/src/25> grep "immediately followed by" scripts/checkpatch.pl
q:/usr/src/25> 


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

* Re: [PATCH] kdb: Get rid of broken attempt to print CCVERSION in kdb summary
  2019-04-19 20:58             ` Andrew Morton
@ 2019-04-20  3:57               ` Joe Perches
  0 siblings, 0 replies; 12+ messages in thread
From: Joe Perches @ 2019-04-20  3:57 UTC (permalink / raw)
  To: Andrew Morton
  Cc: Masahiro Yamada, Douglas Anderson, Daniel Thompson, Jason Wessel,
	Christophe Leroy, Peter Zijlstra (Intel),
	Kees Cook, kgdb-bugreport, Johannes Weiner,
	Linux Kernel Mailing List, Gustavo A. R. Silva,
	Nicholas Mc Guire

On Fri, 2019-04-19 at 13:58 -0700, Andrew Morton wrote:
> On Fri, 19 Apr 2019 04:14:27 -0700 Joe Perches <joe@perches.com> wrote:
> > On Fri, 2019-04-19 at 12:28 +0900, Masahiro Yamada wrote:
> > > Can you detect redundant Cc: by checkpatch?
[]
> > I'm not sure why it's useful or necessary.
[]
> The issue here is redundant Cc: lines in the changelog.

CC: entries have very little actual value in a changelog anyway.

> > --- a/scripts/checkpatch.pl
[]
> > @@ -2688,6 +2688,19 @@ sub process {
> >  				$signatures{$sig_nospace} = 1;
> >  			}
> >  
> > +# Check for a cc: line with another signature -by: by the same author
> > +			if ($sig_nospace =~ /^cc:/) {
> > +				my $sig_email = substr($sig_nospace, 3);
> > +				foreach my $sig (sort keys %signatures) {
> > +					next if ($sig =~ /^cc:/);
> > +					$sig =~ s/^[^:]+://;
> > +					if ($sig eq $sig_email) {
> > +						WARN("BAD_SIGN_OFF",
> > +						     "Unnecessary CC: as there is another signature with the same name/email address\n" . $herecurr);
> > +					}
> > +				}
> > +			}
> > +
> >  # Check Co-developed-by: immediately followed by Signed-off-by: with same name and email
> >  			if ($sign_off =~ /^co-developed-by:$/i) {
> >  				if ($email eq $author) {
> 
> Thanks.  But my checkpatch.pl is different from yours.
> 
> q:/usr/src/25> grep "immediately followed by" scripts/checkpatch.pl
> q:/usr/src/25> 

I almost always write patches against -next

$ git grep "immediately followed by" next-20190418 -- scripts/checkpatch.pl
next-20190418:scripts/checkpatch.pl:# Check Co-developed-by: immediately followed by Signed-off-by: with same name and email
next-20190418:scripts/checkpatch.pl:                                             "Co-developed-by: must be immediately followed by Signed-off-by:\n" . "$here\n" . $rawline);
next-20190418:scripts/checkpatch.pl:                                         "Co-developed-by: must be immediately followed by Signed-off-by:\n" . "$here\n" . $rawline . "\n" .$rawlines[$linenr]);

You seem to be missing

commit 6c5d24eef7be7adfcb608f2852ab69b58935133b
Author: Sean Christopherson <sean.j.christopherson@intel.com>
Date:   Fri Mar 22 14:11:37 2019 -0700

    checkpatch: Warn on improper usage of Co-developed-by
    
    The purpose of Co-developed-by: is to give attribution to authors who
    aren't already attributed by the From: tag, i.e. who aren't the nominal
    patch author.  Because Co-developed-by: is essentially a variation of
    From:, it must be accompanied by a Signed-off-by: of the associated
    co-author.  To ease the burden of determining whether or not co-authors
    have signed off, Co-developed-by and Signed-off-by: must be explicitly
    paired, i.e. on consecutive lines for a given co-author.
    
    Suggested-by: Joe Perches <joe@perches.com>
    Signed-off-by: Sean Christopherson <sean.j.christopherson@intel.com>
    Signed-off-by: Jonathan Corbet <corbet@lwn.net>



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

* Re: [PATCH] kdb: Get rid of broken attempt to print CCVERSION in kdb summary
  2019-04-19 11:14           ` Joe Perches
  2019-04-19 20:58             ` Andrew Morton
@ 2019-05-06 14:28             ` Masahiro Yamada
  2019-05-07 13:55               ` Daniel Thompson
  1 sibling, 1 reply; 12+ messages in thread
From: Masahiro Yamada @ 2019-05-06 14:28 UTC (permalink / raw)
  To: Daniel Thompson
  Cc: Douglas Anderson, Jason Wessel, Christophe Leroy,
	Peter Zijlstra (Intel),
	Kees Cook, kgdb-bugreport, Johannes Weiner,
	Linux Kernel Mailing List, Gustavo A. R. Silva,
	Nicholas Mc Guire, Andrew Morton, Joe Perches

This patch is technically super easy,
but shows how difficult to apply a
single patch in a correct manner.


The following showed up in today's linux-next,
doubling
"Signed-off-by: Douglas Anderson <dianders@chromium.org>"

This is obviously caused by the committer.

Do we need some check script for maintainers
before "git push" ?





commit 51fee3389d71bfd281df02c55546a6103779e145
Author:     Douglas Anderson <dianders@chromium.org>
AuthorDate: Fri Mar 22 18:52:27 2019 -0700
Commit:     Daniel Thompson <daniel.thompson@linaro.org>
CommitDate: Thu May 2 14:55:07 2019 +0100

    kdb: Get rid of broken attempt to print CCVERSION in kdb summary

    If you drop into kdb and type "summary", it prints out a line that
    says this:

      ccversion  CCVERSION

    ...and I don't mean that it actually prints out the version of the C
    compiler.  It literally prints out the string "CCVERSION".

    The version of the C Compiler is already printed at boot up and it
    doesn't seem useful to replicate this in kdb.  Let's just delete it.
    We can also delete the bit of the Makefile that called the C compiler
    in an attempt to pass this into kdb.  This will remove one extra call
    to the C compiler at Makefile parse time and (very slightly) speed up
    builds.

    Signed-off-by: Douglas Anderson <dianders@chromium.org>
    Reviewed-by: Masahiro Yamada <yamada.masahiro@socionext.com>
    Signed-off-by: Douglas Anderson <dianders@chromium.org>
    Signed-off-by: Daniel Thompson <daniel.thompson@linaro.org>








On Sat, Apr 20, 2019 at 3:24 AM Joe Perches <joe@perches.com> wrote:
>
> On Fri, 2019-04-19 at 12:28 +0900, Masahiro Yamada wrote:
> > Hi Joe,
> >
> > Can you detect redundant Cc: by checkpatch?
> >
> > Please see below in details.
> > Thanks.
>
> Yes, but I'm not sure why it's useful or necessary.
> git send-email using some scripts elides duplicate email addresses
> ---
>  scripts/checkpatch.pl | 13 +++++++++++++
>  1 file changed, 13 insertions(+)
>
> diff --git a/scripts/checkpatch.pl b/scripts/checkpatch.pl
> index 1c421ac42b07..bedec83cb797 100755
> --- a/scripts/checkpatch.pl
> +++ b/scripts/checkpatch.pl
> @@ -2688,6 +2688,19 @@ sub process {
>                                 $signatures{$sig_nospace} = 1;
>                         }
>
> +# Check for a cc: line with another signature -by: by the same author
> +                       if ($sig_nospace =~ /^cc:/) {
> +                               my $sig_email = substr($sig_nospace, 3);
> +                               foreach my $sig (sort keys %signatures) {
> +                                       next if ($sig =~ /^cc:/);
> +                                       $sig =~ s/^[^:]+://;
> +                                       if ($sig eq $sig_email) {
> +                                               WARN("BAD_SIGN_OFF",
> +                                                    "Unnecessary CC: as there is another signature with the same name/email address\n" . $herecurr);
> +                                       }
> +                               }
> +                       }
> +
>  # Check Co-developed-by: immediately followed by Signed-off-by: with same name and email
>                         if ($sign_off =~ /^co-developed-by:$/i) {
>                                 if ($email eq $author) {
>
>


-- 
Best Regards
Masahiro Yamada

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

* Re: [PATCH] kdb: Get rid of broken attempt to print CCVERSION in kdb summary
  2019-05-06 14:28             ` Masahiro Yamada
@ 2019-05-07 13:55               ` Daniel Thompson
  0 siblings, 0 replies; 12+ messages in thread
From: Daniel Thompson @ 2019-05-07 13:55 UTC (permalink / raw)
  To: Masahiro Yamada
  Cc: Douglas Anderson, Jason Wessel, Christophe Leroy,
	Peter Zijlstra (Intel),
	Kees Cook, kgdb-bugreport, Johannes Weiner,
	Linux Kernel Mailing List, Gustavo A. R. Silva,
	Nicholas Mc Guire, Andrew Morton, Joe Perches

On Mon, May 06, 2019 at 11:28:17PM +0900, Masahiro Yamada wrote:
> This patch is technically super easy,
> but shows how difficult to apply a
> single patch in a correct manner.
> 
> 
> The following showed up in today's linux-next,
> doubling
> "Signed-off-by: Douglas Anderson <dianders@chromium.org>"
> 
> This is obviously caused by the committer.

Quite so. Thanks for pointing it out.


> Do we need some check script for maintainers
> before "git push" ?

I have to admit that I think this was just a checkpatch mistake on
my part.

This thread is a bit unusual in that patchwork has collected up
all the example Tested-by: Fred stuff that arose during the earlier
tools conversation. It looks like I was sufficiently distracted by
those to overlook the duplicated sign off...


Daniel.

 
> commit 51fee3389d71bfd281df02c55546a6103779e145
> Author:     Douglas Anderson <dianders@chromium.org>
> AuthorDate: Fri Mar 22 18:52:27 2019 -0700
> Commit:     Daniel Thompson <daniel.thompson@linaro.org>
> CommitDate: Thu May 2 14:55:07 2019 +0100
> 
>     kdb: Get rid of broken attempt to print CCVERSION in kdb summary
> 
>     If you drop into kdb and type "summary", it prints out a line that
>     says this:
> 
>       ccversion  CCVERSION
> 
>     ...and I don't mean that it actually prints out the version of the C
>     compiler.  It literally prints out the string "CCVERSION".
> 
>     The version of the C Compiler is already printed at boot up and it
>     doesn't seem useful to replicate this in kdb.  Let's just delete it.
>     We can also delete the bit of the Makefile that called the C compiler
>     in an attempt to pass this into kdb.  This will remove one extra call
>     to the C compiler at Makefile parse time and (very slightly) speed up
>     builds.
> 
>     Signed-off-by: Douglas Anderson <dianders@chromium.org>
>     Reviewed-by: Masahiro Yamada <yamada.masahiro@socionext.com>
>     Signed-off-by: Douglas Anderson <dianders@chromium.org>
>     Signed-off-by: Daniel Thompson <daniel.thompson@linaro.org>
> 
> 
> 
> 
> 
> 
> 
> 
> On Sat, Apr 20, 2019 at 3:24 AM Joe Perches <joe@perches.com> wrote:
> >
> > On Fri, 2019-04-19 at 12:28 +0900, Masahiro Yamada wrote:
> > > Hi Joe,
> > >
> > > Can you detect redundant Cc: by checkpatch?
> > >
> > > Please see below in details.
> > > Thanks.
> >
> > Yes, but I'm not sure why it's useful or necessary.
> > git send-email using some scripts elides duplicate email addresses
> > ---
> >  scripts/checkpatch.pl | 13 +++++++++++++
> >  1 file changed, 13 insertions(+)
> >
> > diff --git a/scripts/checkpatch.pl b/scripts/checkpatch.pl
> > index 1c421ac42b07..bedec83cb797 100755
> > --- a/scripts/checkpatch.pl
> > +++ b/scripts/checkpatch.pl
> > @@ -2688,6 +2688,19 @@ sub process {
> >                                 $signatures{$sig_nospace} = 1;
> >                         }
> >
> > +# Check for a cc: line with another signature -by: by the same author
> > +                       if ($sig_nospace =~ /^cc:/) {
> > +                               my $sig_email = substr($sig_nospace, 3);
> > +                               foreach my $sig (sort keys %signatures) {
> > +                                       next if ($sig =~ /^cc:/);
> > +                                       $sig =~ s/^[^:]+://;
> > +                                       if ($sig eq $sig_email) {
> > +                                               WARN("BAD_SIGN_OFF",
> > +                                                    "Unnecessary CC: as there is another signature with the same name/email address\n" . $herecurr);
> > +                                       }
> > +                               }
> > +                       }
> > +
> >  # Check Co-developed-by: immediately followed by Signed-off-by: with same name and email
> >                         if ($sign_off =~ /^co-developed-by:$/i) {
> >                                 if ($email eq $author) {
> >
> >
> 
> 
> -- 
> Best Regards
> Masahiro Yamada

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

end of thread, other threads:[~2019-05-07 13:55 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-03-23  1:52 [PATCH] kdb: Get rid of broken attempt to print CCVERSION in kdb summary Douglas Anderson
2019-03-30 12:14 ` Masahiro Yamada
2019-04-11  9:06 ` Masahiro Yamada
2019-04-16 23:30   ` Andrew Morton
2019-04-17  6:37     ` Masahiro Yamada
2019-04-18 23:06       ` Andrew Morton
2019-04-19  3:28         ` Masahiro Yamada
2019-04-19 11:14           ` Joe Perches
2019-04-19 20:58             ` Andrew Morton
2019-04-20  3:57               ` Joe Perches
2019-05-06 14:28             ` Masahiro Yamada
2019-05-07 13:55               ` Daniel Thompson

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