Re: [PATCH] Use a format string for linux_banner

From: Stefan Richter
Date: Sat Feb 28 2009 - 07:02:18 EST


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@xxxxxxxxx>
> ---
> 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/
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/