Re: [tip:x86/cleanups] x86: Remove pr_fmt duplicate logging prefixes

2019-02-20 Thread Bjorn Helgaas
On Thu, May 17, 2018 at 11:45 AM Joe Perches  wrote:
>
> On Thu, 2018-05-17 at 20:27 +0200, Borislav Petkov wrote:
> > On Sun, May 13, 2018 at 12:27:45PM -0700, tip-bot for Joe Perches wrote:
> > > Commit-ID:  1de392f5d5e803663abbd8ed084233f154152bcd
> > > Gitweb: 
> > > https://git.kernel.org/tip/1de392f5d5e803663abbd8ed084233f154152bcd
> > > Author: Joe Perches 
> > > AuthorDate: Thu, 10 May 2018 08:45:30 -0700
> > > Committer:  Thomas Gleixner 
> > > CommitDate: Sun, 13 May 2018 21:25:18 +0200
> > >
> > > x86: Remove pr_fmt duplicate logging prefixes
> > >
> > > Converting pr_fmt from a default simple #define to use KBUILD_MODNAME
> > > added some duplicate prefixes.
> > >
> > > Remove the duplicate prefixes.
> []
> > Maybe I'm missing something but this dropped the prefixes now
> > completely:
> >
> > -e820: BIOS-provided physical RAM map:
> > +BIOS-provided physical RAM map:
> >
> > -e820: last_pfn = 0x43f000 max_arch_pfn = 0x4
> > +last_pfn = 0x43f000 max_arch_pfn = 0x4
> >
> > -e820: last_pfn = 0x9d000 max_arch_pfn = 0x4
> > +last_pfn = 0x9d000 max_arch_pfn = 0x4
> >
> > ...
> >
> > I don't think that was the intention.
>
> Hi Borislav
>
> It wasn't and isn't the intention.
>
> This is a patch _series_, and all of the patches
> from 4-18 depend on patch 3 which converts the
> generic define in include/linux/printk.h
>
> from
> #define pr_fmt(fmt) fmt
> to
> #define pr_fmt(fmt) KBUILD_MODNAME ": " fmt
>
> Perhaps a better option, which could be done in
> a v2 of the series, is to add a temporary
> #define pr_fmt(fmt) KBUILD_MODNAME ": " fmt
> to each file modified in patches 4-18 and then
> allow the follow-on script described in the 0/18
> cover letter to remove those #defines

Was there ever a v2?  What I see from 1de392f5d5e8 ("x86: Remove
pr_fmt duplicate logging prefixes") is exactly what Borislav noted.

For example, https://bugzilla.kernel.org/attachment.cgi?id=281007 is a
v4.20 dmesg log from
https://bugzilla.kernel.org/show_bug.cgi?id=202511 .  That bug also
has a v4.17 dmesg log
(https://bugzilla.kernel.org/attachment.cgi?id=281011).  Comparing
them shows:

-Linux version 4.17.19-gentoo (root@survivor) (gcc version 7.3.0
(Gentoo 7.3.0-r3 p1.4)) #2 SMP Sat Sep 22 09:53:01 EDT 2018
+Linux version 4.20.6-gentoo (root@survivor) (gcc version 7.3.0
(Gentoo 7.3.0-r3 p1.4)) #1 SMP Tue Feb 5 09:46:51 EST 2019
...
-e820: BIOS-provided physical RAM map:
+BIOS-provided physical RAM map:

Not a big deal as far as I'm concerned, but it is a minor annoyance.

Bjorn


Re: [tip:x86/cleanups] x86: Remove pr_fmt duplicate logging prefixes

2018-05-17 Thread Thomas Gleixner
On Thu, 17 May 2018, Joe Perches wrote:
> On Thu, 2018-05-17 at 20:27 +0200, Borislav Petkov wrote:
> > On Sun, May 13, 2018 at 12:27:45PM -0700, tip-bot for Joe Perches wrote:
> > > Commit-ID:  1de392f5d5e803663abbd8ed084233f154152bcd
> > > Gitweb: 
> > > https://git.kernel.org/tip/1de392f5d5e803663abbd8ed084233f154152bcd
> > > Author: Joe Perches 
> > > AuthorDate: Thu, 10 May 2018 08:45:30 -0700
> > > Committer:  Thomas Gleixner 
> > > CommitDate: Sun, 13 May 2018 21:25:18 +0200
> > > 
> > > x86: Remove pr_fmt duplicate logging prefixes
> > > 
> > > Converting pr_fmt from a default simple #define to use KBUILD_MODNAME
> > > added some duplicate prefixes.
> > > 
> > > Remove the duplicate prefixes.
> []
> > Maybe I'm missing something but this dropped the prefixes now
> > completely:
> > 
> > -e820: BIOS-provided physical RAM map:
> > +BIOS-provided physical RAM map:
> > 
> > -e820: last_pfn = 0x43f000 max_arch_pfn = 0x4
> > +last_pfn = 0x43f000 max_arch_pfn = 0x4
> > 
> > -e820: last_pfn = 0x9d000 max_arch_pfn = 0x4
> > +last_pfn = 0x9d000 max_arch_pfn = 0x4
> > 
> > ...
> > 
> > I don't think that was the intention.
> 
> Hi Borislav
> 
> It wasn't and isn't the intention.
> 
> This is a patch _series_, and all of the patches
> from 4-18 depend on patch 3 which converts the
> generic define in include/linux/printk.h
> 
> from
>   #define pr_fmt(fmt) fmt
> to
>   #define pr_fmt(fmt) KBUILD_MODNAME ": " fmt
> 
> Perhaps a better option, which could be done in
> a v2 of the series, is to add a temporary
> #define pr_fmt(fmt) KBUILD_MODNAME ": " fmt
> to each file modified in patches 4-18 and then
> allow the follow-on script described in the 0/18
> cover letter to remove those #defines

Yes, I think thats the right thing todo.

Thanks,

tglx


Re: [tip:x86/cleanups] x86: Remove pr_fmt duplicate logging prefixes

2018-05-17 Thread Joe Perches
On Thu, 2018-05-17 at 20:27 +0200, Borislav Petkov wrote:
> On Sun, May 13, 2018 at 12:27:45PM -0700, tip-bot for Joe Perches wrote:
> > Commit-ID:  1de392f5d5e803663abbd8ed084233f154152bcd
> > Gitweb: 
> > https://git.kernel.org/tip/1de392f5d5e803663abbd8ed084233f154152bcd
> > Author: Joe Perches 
> > AuthorDate: Thu, 10 May 2018 08:45:30 -0700
> > Committer:  Thomas Gleixner 
> > CommitDate: Sun, 13 May 2018 21:25:18 +0200
> > 
> > x86: Remove pr_fmt duplicate logging prefixes
> > 
> > Converting pr_fmt from a default simple #define to use KBUILD_MODNAME
> > added some duplicate prefixes.
> > 
> > Remove the duplicate prefixes.
[]
> Maybe I'm missing something but this dropped the prefixes now
> completely:
> 
> -e820: BIOS-provided physical RAM map:
> +BIOS-provided physical RAM map:
> 
> -e820: last_pfn = 0x43f000 max_arch_pfn = 0x4
> +last_pfn = 0x43f000 max_arch_pfn = 0x4
> 
> -e820: last_pfn = 0x9d000 max_arch_pfn = 0x4
> +last_pfn = 0x9d000 max_arch_pfn = 0x4
> 
> ...
> 
> I don't think that was the intention.

Hi Borislav

It wasn't and isn't the intention.

This is a patch _series_, and all of the patches
from 4-18 depend on patch 3 which converts the
generic define in include/linux/printk.h

from
#define pr_fmt(fmt) fmt
to
#define pr_fmt(fmt) KBUILD_MODNAME ": " fmt

Perhaps a better option, which could be done in
a v2 of the series, is to add a temporary
#define pr_fmt(fmt) KBUILD_MODNAME ": " fmt
to each file modified in patches 4-18 and then
allow the follow-on script described in the 0/18
cover letter to remove those #defines

cheers, Joe



Re: [tip:x86/cleanups] x86: Remove pr_fmt duplicate logging prefixes

2018-05-17 Thread Borislav Petkov
On Sun, May 13, 2018 at 12:27:45PM -0700, tip-bot for Joe Perches wrote:
> Commit-ID:  1de392f5d5e803663abbd8ed084233f154152bcd
> Gitweb: 
> https://git.kernel.org/tip/1de392f5d5e803663abbd8ed084233f154152bcd
> Author: Joe Perches 
> AuthorDate: Thu, 10 May 2018 08:45:30 -0700
> Committer:  Thomas Gleixner 
> CommitDate: Sun, 13 May 2018 21:25:18 +0200
> 
> x86: Remove pr_fmt duplicate logging prefixes
> 
> Converting pr_fmt from a default simple #define to use KBUILD_MODNAME
> added some duplicate prefixes.
> 
> Remove the duplicate prefixes.
> 
> Signed-off-by: Joe Perches 
> Signed-off-by: Thomas Gleixner 
> Cc: "H. Peter Anvin" 
> Link: 
> https://lkml.kernel.org/r/e7b709a2b040af7faa81b0aa2c3a125aed628a82.1525964383.git@perches.com
> 
> ---
>  arch/x86/events/amd/ibs.c |  2 +-
>  arch/x86/kernel/e820.c| 32 +---
>  arch/x86/kernel/hpet.c|  5 ++---
>  arch/x86/kernel/uprobes.c |  4 ++--
>  arch/x86/mm/numa.c| 22 +++---
>  5 files changed, 33 insertions(+), 32 deletions(-)

...

> @@ -830,8 +832,8 @@ static unsigned long __init e820_end_pfn(unsigned long 
> limit_pfn, enum e820_type
>   if (last_pfn > max_arch_pfn)
>   last_pfn = max_arch_pfn;
>  
> - pr_info("e820: last_pfn = %#lx max_arch_pfn = %#lx\n",
> -  last_pfn, max_arch_pfn);
> + pr_info("last_pfn = %#lx max_arch_pfn = %#lx\n",
> + last_pfn, max_arch_pfn);
>   return last_pfn;
>  }
>  
> @@ -1005,7 +1007,7 @@ void __init e820__finish_early_params(void)
>   if (e820__update_table(e820_table) < 0)
>   early_panic("Invalid user supplied memory map");
>  
> - pr_info("e820: user-defined physical RAM map:\n");
> + pr_info("user-defined physical RAM map:\n");
>   e820__print_table("user");
>   }
>  }
> @@ -1238,7 +1240,7 @@ void __init e820__memory_setup(void)
>   memcpy(e820_table_kexec, e820_table, sizeof(*e820_table_kexec));
>   memcpy(e820_table_firmware, e820_table, sizeof(*e820_table_firmware));
>  
> - pr_info("e820: BIOS-provided physical RAM map:\n");
> + pr_info("BIOS-provided physical RAM map:\n");
>   e820__print_table(who);
>  }

Maybe I'm missing something but this dropped the prefixes now
completely:

-e820: BIOS-provided physical RAM map:
+BIOS-provided physical RAM map:

-e820: last_pfn = 0x43f000 max_arch_pfn = 0x4
+last_pfn = 0x43f000 max_arch_pfn = 0x4

-e820: last_pfn = 0x9d000 max_arch_pfn = 0x4
+last_pfn = 0x9d000 max_arch_pfn = 0x4

...

I don't think that was the intention.

-- 
Regards/Gruss,
Boris.

Good mailing practices for 400: avoid top-posting and trim the reply.