Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1463814 > unrolled thread

[PATCH v2] ARM: Add missing newline terminators to kernel messages

Started byGeert Uytterhoeven <geert+renesas@glider.be>
First post2016-08-16 15:50 +0200
Last post2016-08-16 22:30 +0200
Articles 7 — 4 participants

Back to article view | Back to linux.kernel


Contents

  [PATCH v2] ARM: Add missing newline terminators to kernel messages Geert Uytterhoeven <geert+renesas@glider.be> - 2016-08-16 15:50 +0200
    Re: [PATCH v2] ARM: Add missing newline terminators to kernel  messages Joe Perches <joe@perches.com> - 2016-08-16 19:10 +0200
      Re: [PATCH v2] ARM: Add missing newline terminators to kernel messages Geert Uytterhoeven <geert@linux-m68k.org> - 2016-08-16 20:00 +0200
        Re: [PATCH v2] ARM: Add missing newline terminators to kernel messages Geert Uytterhoeven <geert@linux-m68k.org> - 2016-08-16 20:10 +0200
        Re: [PATCH v2] ARM: Add missing newline terminators to kernel  messages Joe Perches <joe@perches.com> - 2016-08-16 20:10 +0200
    Re: [PATCH v2] ARM: Add missing newline terminators to kernel  messages Russell King - ARM Linux <linux@armlinux.org.uk> - 2016-08-16 21:20 +0200
      Re: [PATCH v2] ARM: Add missing newline terminators to kernel messages Geert Uytterhoeven <geert@linux-m68k.org> - 2016-08-16 22:30 +0200

#1463814 — [PATCH v2] ARM: Add missing newline terminators to kernel messages

FromGeert Uytterhoeven <geert+renesas@glider.be>
Date2016-08-16 15:50 +0200
Subject[PATCH v2] ARM: Add missing newline terminators to kernel messages
Message-ID<s6MUG-3Kl-15@gated-at.bofh.it>
Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
---
Before commit 874f9c7da9a4acbc ("printk: create pr_<level> functions"),
pr_*() calls without a trailing newline characters would be printed with
a newline character appended, both on the console and in the output of
the dmesg command.

After that commit, no new line character is appended, and the output of
the next pr_*() call of the same type may be appended:

    - Truncating RAM at 0x0000000040000000-0x00000000c0000000 to -0x0000000070000000
    - Ignoring RAM at 0x0000000200000000-0x0000000240000000 (!CONFIG_HIGHMEM)
    + Truncating RAM at 0x0000000040000000-0x00000000c0000000 to -0x0000000070000000Ignoring RAM at 0x0000000200000000-0x0000000240000000 (!CONFIG_HIGHMEM)

and:

    -No ATAGs?
    -hw-breakpoint: found 5 (+1 reserved) breakpoint and 4 watchpoint registers.
    +No ATAGs?hw-breakpoint: found 5 (+1 reserved) breakpoint and 4 watchpoint registers.

While this commit has been reverted in commit a0cba2179ea4c182 ("Revert
"printk: create pr_<level> functions""), it's still good practice to
terminate kernel messages with newlines.

v2:
  - Rebased
---
 arch/arm/kernel/atags_proc.c | 2 +-
 arch/arm/mm/mmu.c            | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/arch/arm/kernel/atags_proc.c b/arch/arm/kernel/atags_proc.c
index 5a3379055f553167..d7af7b84a4ca32c5 100644
--- a/arch/arm/kernel/atags_proc.c
+++ b/arch/arm/kernel/atags_proc.c
@@ -41,7 +41,7 @@ static int __init init_atags_procfs(void)
 	size_t size;
 
 	if (tag->hdr.tag != ATAG_CORE) {
-		pr_info("No ATAGs?");
+		pr_info("No ATAGs?\n");
 		return -EINVAL;
 	}
 
diff --git a/arch/arm/mm/mmu.c b/arch/arm/mm/mmu.c
index 724d6be4b83225ee..7dbdad64a1ac5fd3 100644
--- a/arch/arm/mm/mmu.c
+++ b/arch/arm/mm/mmu.c
@@ -1196,7 +1196,7 @@ void __init sanity_check_meminfo(void)
 				pr_notice("Truncating RAM at %pa-%pa",
 					  &block_start, &block_end);
 				block_end = vmalloc_limit;
-				pr_cont(" to -%pa", &block_end);
+				pr_cont(" to -%pa\n", &block_end);
 				memblock_remove(vmalloc_limit, overlap_size);
 				should_use_highmem = true;
 			}
-- 
1.9.1

[toc] | [next] | [standalone]


#1463943 — Re: [PATCH v2] ARM: Add missing newline terminators to kernel messages

FromJoe Perches <joe@perches.com>
Date2016-08-16 19:10 +0200
SubjectRe: [PATCH v2] ARM: Add missing newline terminators to kernel messages
Message-ID<s6Q2d-5Qh-5@gated-at.bofh.it>
In reply to#1463814
On Tue, 2016-08-16 at 15:40 +0200, Geert Uytterhoeven wrote:
> Before commit 874f9c7da9a4acbc ("printk: create pr_<level> functions"),
> pr_*() calls without a trailing newline characters would be printed with
> a newline character appended, both on the console and in the output of
> the dmesg command.

Hey Geert.

This doesn't apply to -next as the pr_notice/pr_cont below is
properly changed to a single pr_notice.

> diff --git a/arch/arm/mm/mmu.c b/arch/arm/mm/mmu.c
[]
> @@ -1196,7 +1196,7 @@ void __init sanity_check_meminfo(void)
>  				pr_notice("Truncating RAM at %pa-%pa",
>  					  &block_start, &block_end);
>  				block_end = vmalloc_limit;
> -				pr_cont(" to -%pa", &block_end);
> +				pr_cont(" to -%pa\n", &block_end);
>  				memblock_remove(vmalloc_limit, overlap_size);
>  				should_use_highmem = true;
>  			}

[toc] | [prev] | [next] | [standalone]


#1463974

FromGeert Uytterhoeven <geert@linux-m68k.org>
Date2016-08-16 20:00 +0200
Message-ID<s6QOB-686-1@gated-at.bofh.it>
In reply to#1463943
Hi Joe,

On Tue, Aug 16, 2016 at 7:08 PM, Joe Perches <joe@perches.com> wrote:
> On Tue, 2016-08-16 at 15:40 +0200, Geert Uytterhoeven wrote:
>> Before commit 874f9c7da9a4acbc ("printk: create pr_<level> functions"),
>> pr_*() calls without a trailing newline characters would be printed with
>> a newline character appended, both on the console and in the output of
>> the dmesg command.
>
> Hey Geert.
>
> This doesn't apply to -next as the pr_notice/pr_cont below is
> properly changed to a single pr_notice.

In which -next?

Not in next-20160816, where the patch applies cleanly.
Also not in arm/for-next.

>> diff --git a/arch/arm/mm/mmu.c b/arch/arm/mm/mmu.c
>
> []
>> @@ -1196,7 +1196,7 @@ void __init sanity_check_meminfo(void)
>>                               pr_notice("Truncating RAM at %pa-%pa",
>>                                         &block_start, &block_end);
>>                               block_end = vmalloc_limit;
>> -                             pr_cont(" to -%pa", &block_end);
>> +                             pr_cont(" to -%pa\n", &block_end);
>>                               memblock_remove(vmalloc_limit, overlap_size);
>>                               should_use_highmem = true;

Gr{oetje,eeting}s,

                        Geert

--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org

In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
                                -- Linus Torvalds

[toc] | [prev] | [next] | [standalone]


#1463985

FromGeert Uytterhoeven <geert@linux-m68k.org>
Date2016-08-16 20:10 +0200
Message-ID<s6QYi-6qv-25@gated-at.bofh.it>
In reply to#1463974
Hi Joe,

On Tue, Aug 16, 2016 at 8:01 PM, Joe Perches <joe@perches.com> wrote:
> On Tue, 2016-08-16 at 19:50 +0200, Geert Uytterhoeven wrote:
>> On Tue, Aug 16, 2016 at 7:08 PM, Joe Perches <joe@perches.com> wrote:
>> > On Tue, 2016-08-16 at 15:40 +0200, Geert Uytterhoeven wrote:
>> > > Before commit 874f9c7da9a4acbc ("printk: create pr_<level>
>> > > functions"),
>> > > pr_*() calls without a trailing newline characters would be
>> > > printed with
>> > > a newline character appended, both on the console and in the
>> > > output of
>> > > the dmesg command.
>> > Hey Geert.
>> >
>> > This doesn't apply to -next as the pr_notice/pr_cont below is
>> > properly changed to a single pr_notice.
>> In which -next?
>>
>> Not in next-20160816, where the patch applies cleanly.
>> Also not in arm/for-next.
>
> My mistake, I was in the wrong directory.
> It doesn't apply to Linus' tree.

It's meant for the arm tree.

> Still, it'd be slightly nicer to use a single
> pr_notice than the pr_notice/pr_cont.

Indeed. The code was recently changed to split the message, hence
my v2...

Gr{oetje,eeting}s,

                        Geert

--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org

In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
                                -- Linus Torvalds

[toc] | [prev] | [next] | [standalone]


#1463986 — Re: [PATCH v2] ARM: Add missing newline terminators to kernel messages

FromJoe Perches <joe@perches.com>
Date2016-08-16 20:10 +0200
SubjectRe: [PATCH v2] ARM: Add missing newline terminators to kernel messages
Message-ID<s6QYi-6qv-27@gated-at.bofh.it>
In reply to#1463974
On Tue, 2016-08-16 at 19:50 +0200, Geert Uytterhoeven wrote:
> Hi Joe,
> 
> On Tue, Aug 16, 2016 at 7:08 PM, Joe Perches <joe@perches.com> wrote:
> > 
> > On Tue, 2016-08-16 at 15:40 +0200, Geert Uytterhoeven wrote:
> > > 
> > > Before commit 874f9c7da9a4acbc ("printk: create pr_<level>
> > > functions"),
> > > pr_*() calls without a trailing newline characters would be
> > > printed with
> > > a newline character appended, both on the console and in the
> > > output of
> > > the dmesg command.
> > Hey Geert.
> > 
> > This doesn't apply to -next as the pr_notice/pr_cont below is
> > properly changed to a single pr_notice.
> In which -next?
> 
> Not in next-20160816, where the patch applies cleanly.
> Also not in arm/for-next.

My mistake, I was in the wrong directory.
It doesn't apply to Linus' tree.

Still, it'd be slightly nicer to use a single
pr_notice than the pr_notice/pr_cont.

cheers, Joe

[toc] | [prev] | [next] | [standalone]


#1464020 — Re: [PATCH v2] ARM: Add missing newline terminators to kernel messages

FromRussell King - ARM Linux <linux@armlinux.org.uk>
Date2016-08-16 21:20 +0200
SubjectRe: [PATCH v2] ARM: Add missing newline terminators to kernel messages
Message-ID<s6S42-73X-19@gated-at.bofh.it>
In reply to#1463814
On Tue, Aug 16, 2016 at 03:40:32PM +0200, Geert Uytterhoeven wrote:
> Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
> ---
> Before commit 874f9c7da9a4acbc ("printk: create pr_<level> functions"),
> pr_*() calls without a trailing newline characters would be printed with
> a newline character appended, both on the console and in the output of
> the dmesg command.
> 
> After that commit, no new line character is appended, and the output of
> the next pr_*() call of the same type may be appended:
> 
>     - Truncating RAM at 0x0000000040000000-0x00000000c0000000 to -0x0000000070000000
>     - Ignoring RAM at 0x0000000200000000-0x0000000240000000 (!CONFIG_HIGHMEM)
>     + Truncating RAM at 0x0000000040000000-0x00000000c0000000 to -0x0000000070000000Ignoring RAM at 0x0000000200000000-0x0000000240000000 (!CONFIG_HIGHMEM)
> 
> and:
> 
>     -No ATAGs?
>     -hw-breakpoint: found 5 (+1 reserved) breakpoint and 4 watchpoint registers.
>     +No ATAGs?hw-breakpoint: found 5 (+1 reserved) breakpoint and 4 watchpoint registers.
> 
> While this commit has been reverted in commit a0cba2179ea4c182 ("Revert
> "printk: create pr_<level> functions""), it's still good practice to
> terminate kernel messages with newlines.

Shouldn't that be above the "---" line?

Other than that, patch looks fine, thanks.

-- 
RMK's Patch system: http://www.armlinux.org.uk/developer/patches/
FTTC broadband for 0.8mile line: currently at 9.6Mbps down 400kbps up
according to speedtest.net.

[toc] | [prev] | [next] | [standalone]


#1464104

FromGeert Uytterhoeven <geert@linux-m68k.org>
Date2016-08-16 22:30 +0200
Message-ID<s6T9O-7MR-93@gated-at.bofh.it>
In reply to#1464020
Hi Russell,

On Tue, Aug 16, 2016 at 9:13 PM, Russell King - ARM Linux
<linux@armlinux.org.uk> wrote:
> On Tue, Aug 16, 2016 at 03:40:32PM +0200, Geert Uytterhoeven wrote:
>> Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
>> ---
>> Before commit 874f9c7da9a4acbc ("printk: create pr_<level> functions"),
>> pr_*() calls without a trailing newline characters would be printed with
>> a newline character appended, both on the console and in the output of
>> the dmesg command.
>>
>> After that commit, no new line character is appended, and the output of
>> the next pr_*() call of the same type may be appended:
>>
>>     - Truncating RAM at 0x0000000040000000-0x00000000c0000000 to -0x0000000070000000
>>     - Ignoring RAM at 0x0000000200000000-0x0000000240000000 (!CONFIG_HIGHMEM)
>>     + Truncating RAM at 0x0000000040000000-0x00000000c0000000 to -0x0000000070000000Ignoring RAM at 0x0000000200000000-0x0000000240000000 (!CONFIG_HIGHMEM)
>>
>> and:
>>
>>     -No ATAGs?
>>     -hw-breakpoint: found 5 (+1 reserved) breakpoint and 4 watchpoint registers.
>>     +No ATAGs?hw-breakpoint: found 5 (+1 reserved) breakpoint and 4 watchpoint registers.
>>
>> While this commit has been reverted in commit a0cba2179ea4c182 ("Revert
>> "printk: create pr_<level> functions""), it's still good practice to
>> terminate kernel messages with newlines.
>
> Shouldn't that be above the "---" line?

I didn't put it there because commit 874f9c7da9a4acbc was reverted.

> Other than that, patch looks fine, thanks.

Thanks!

Gr{oetje,eeting}s,

                        Geert

--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org

In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
                                -- Linus Torvalds

[toc] | [prev] | [standalone]


Back to top | Article view | linux.kernel


csiph-web