* [PATCH] Use a format string for linux_banner
@ 2009-02-25 9:04 Alex Riesen
2009-02-28 12:01 ` Stefan Richter
0 siblings, 1 reply; 5+ messages in thread
From: Alex Riesen @ 2009-02-25 9:04 UTC (permalink / raw)
To: Linux Kernel Mailing List; +Cc: Linus Torvalds, Andrew Morton, trivial
[-- Attachment #1: Type: text/plain, Size: 219 bytes --]
There is no format specifiers left in the linux_banner,
and gcc complains seeing the printk.
Signed-off-by: Alex Riesen <raa.lkml@gmail.com>
---
init/main.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
[-- Attachment #2: 0001-Use-a-format-for-linux_banner.diff --]
[-- Type: application/octet-stream, Size: 840 bytes --]
From e7b44c4c1d7d0f182f0100b0dc31c20fb3dfe8ea Mon Sep 17 00:00:00 2001
From: Alex Riesen <raa.lkml@gmail.com>
Date: Wed, 25 Feb 2009 09:53:15 +0100
Subject: [PATCH] Use a format string for linux_banner
There is no format specifiers left in the linux_banner,
and gcc complains seeing the printk.
Signed-off-by: Alex Riesen <raa.lkml@gmail.com>
---
init/main.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/init/main.c b/init/main.c
index 8442094..78fc0d8 100644
--- a/init/main.c
+++ b/init/main.c
@@ -554,7 +554,7 @@ asmlinkage void __init start_kernel(void)
boot_cpu_init();
page_address_init();
printk(KERN_NOTICE);
- printk(linux_banner);
+ printk("%s", linux_banner);
setup_arch(&command_line);
mm_init_owner(&init_mm, &init_task);
setup_command_line(command_line);
--
1.6.2.rc1.46.gb3ec84f
^ permalink raw reply related [flat|nested] 5+ messages in thread
* Re: [PATCH] Use a format string for linux_banner
2009-02-25 9:04 [PATCH] Use a format string for linux_banner Alex Riesen
@ 2009-02-28 12:01 ` Stefan Richter
2009-02-28 13:36 ` Alex Riesen, Alex Riesen
0 siblings, 1 reply; 5+ messages in thread
From: Stefan Richter @ 2009-02-28 12:01 UTC (permalink / raw)
To: Alex Riesen
Cc: Linux Kernel Mailing List, Linus Torvalds, Andrew Morton, trivial
Alex Riesen wrote:
> There is no format specifiers left in the linux_banner,
> and gcc complains seeing the printk.
>
> Signed-off-by: Alex Riesen <raa.lkml@gmail.com>
> ---
> init/main.c | 2 +-
> 1 files changed, 1 insertions(+), 1 deletions(-)
[+ application/octet-stream attachment, base64 encoded]
Please send patches as inline text or at least as plaintext attachment
in ascii encoding. linux/Documentation/email-clients.txt has help.
> --- a/init/main.c
> +++ b/init/main.c
> @@ -554,7 +554,7 @@ asmlinkage void __init start_kernel(void)
> boot_cpu_init();
> page_address_init();
> printk(KERN_NOTICE);
> - printk(linux_banner);
> + printk("%s", linux_banner);
> setup_arch(&command_line);
> mm_init_owner(&init_mm, &init_task);
> setup_command_line(command_line);
Better than that:
- printk(KERN_NOTICE);
- printk(linux_banner);
+ printk(KERN_NOTICE "%s", linux_banner);
--
Stefan Richter
-=====-==--= --=- ===--
http://arcgraph.de/sr/
^ permalink raw reply [flat|nested] 5+ messages in thread
* [PATCH] Use a format string for linux_banner
2009-02-28 12:01 ` Stefan Richter
@ 2009-02-28 13:36 ` Alex Riesen, Alex Riesen
2009-02-28 17:27 ` Linus Torvalds
0 siblings, 1 reply; 5+ messages in thread
From: Alex Riesen, Alex Riesen @ 2009-02-28 13:36 UTC (permalink / raw)
To: trivial; +Cc: Stefan Richter, Linus Torvalds, Andrew Morton, linux-kernel
Signed-off-by: Alex Riesen <raa.lkml@gmail.com>
---
Stefan Richter, Sat, Feb 28, 2009 13:01:07 +0100:
> [+ application/octet-stream attachment, base64 encoded]
>
> Please send patches as inline text or at least as plaintext attachment
> in ascii encoding. linux/Documentation/email-clients.txt has help.
Couldn't. Had to either choose the corporate firewal and gmail, or the
Exchange-thing. Both will corrupt patches, unless send as attachment.
Decided not to expose the corporate mail address.
Anyway, resending from home now (back then couldn't send from home
either: was changing providers and had no usable link for a week.
Tell about coincidences...)
> > - printk(linux_banner);
> > + printk("%s", linux_banner);
>
> Better than that:
>
> - printk(KERN_NOTICE);
> - printk(linux_banner);
> + printk(KERN_NOTICE "%s", linux_banner);
>
Missed the line before. Poor blind me.
init/main.c | 3 +--
1 files changed, 1 insertions(+), 2 deletions(-)
diff --git a/init/main.c b/init/main.c
index 8442094..77fc028 100644
--- a/init/main.c
+++ b/init/main.c
@@ -553,8 +553,7 @@ asmlinkage void __init start_kernel(void)
tick_init();
boot_cpu_init();
page_address_init();
- printk(KERN_NOTICE);
- printk(linux_banner);
+ printk(KERN_NOTICE "%s", linux_banner);
setup_arch(&command_line);
mm_init_owner(&init_mm, &init_task);
setup_command_line(command_line);
--
1.6.2.rc2.31.gce6e3
^ permalink raw reply related [flat|nested] 5+ messages in thread
* Re: [PATCH] Use a format string for linux_banner
2009-02-28 13:36 ` Alex Riesen, Alex Riesen
@ 2009-02-28 17:27 ` Linus Torvalds
2009-05-24 13:30 ` [PATCH] Use a format " Alex Riesen
0 siblings, 1 reply; 5+ messages in thread
From: Linus Torvalds @ 2009-02-28 17:27 UTC (permalink / raw)
To: Alex Riesen; +Cc: trivial, Stefan Richter, Andrew Morton, linux-kernel
On Sat, 28 Feb 2009, Alex Riesen wrote:
> >
> > Please send patches as inline text or at least as plaintext attachment
> > in ascii encoding. linux/Documentation/email-clients.txt has help.
>
> Couldn't. Had to either choose the corporate firewal and gmail, or the
> Exchange-thing. Both will corrupt patches, unless send as attachment.
> Decided not to expose the corporate mail address.
Well, I _can_ tell you that I just ignore patches that I can't see
directly in my email reader. Others may pick them up, but for me it's an
issue of "ok, I can't easily even see the patch, and the person didn't
bother to do it right - it's not worth my time".
What people _can_ do is to send it both as a crazy attachment _and_ as
plaintext. If they plaintext gets corrupted, the attachment still works,
and the plaintext is at least somethign I can see and thus in my mail
reader decide whether it's worth my time to save the attachment and look
at it outside the mail reader.
Linus
^ permalink raw reply [flat|nested] 5+ messages in thread
* [PATCH] Use a format for linux_banner
2009-02-28 17:27 ` Linus Torvalds
@ 2009-05-24 13:30 ` Alex Riesen
0 siblings, 0 replies; 5+ messages in thread
From: Alex Riesen @ 2009-05-24 13:30 UTC (permalink / raw)
To: linux-kernel; +Cc: trivial, Stefan Richter, Andrew Morton, Linus Torvalds
There is no format specifiers left in the linux_banner, and gcc-4.3
complains seeing the printk.
Signed-off-by: Alex Riesen <raa.lkml@gmail.com>
---
Linus Torvalds, Sat, Feb 28, 2009 18:27:07 +0100:
> What people _can_ do is to send it both as a crazy attachment _and_ as
> plaintext. If they plaintext gets corrupted, the attachment still works,
> and the plaintext is at least somethign I can see and thus in my mail
> reader decide whether it's worth my time to save the attachment and look
> at it outside the mail reader.
Resent properly. Sorry, took me a while.
init/main.c | 3 +--
1 files changed, 1 insertions(+), 2 deletions(-)
diff --git a/init/main.c b/init/main.c
index 3bbf93b..d721dad 100644
--- a/init/main.c
+++ b/init/main.c
@@ -566,8 +566,7 @@ asmlinkage void __init start_kernel(void)
tick_init();
boot_cpu_init();
page_address_init();
- printk(KERN_NOTICE);
- printk(linux_banner);
+ printk(KERN_NOTICE "%s", linux_banner);
setup_arch(&command_line);
mm_init_owner(&init_mm, &init_task);
setup_command_line(command_line);
--
1.6.3.1.171.ge2f07
^ permalink raw reply related [flat|nested] 5+ messages in thread
end of thread, other threads:[~2009-05-24 13:31 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-02-25 9:04 [PATCH] Use a format string for linux_banner Alex Riesen
2009-02-28 12:01 ` Stefan Richter
2009-02-28 13:36 ` Alex Riesen, Alex Riesen
2009-02-28 17:27 ` Linus Torvalds
2009-05-24 13:30 ` [PATCH] Use a format " Alex Riesen
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox