Re: [PATCH 4/5 v2] x86 boot: show pfn addresses in hex not decimal in some kernel info printks

From: Denys Vlasenko
Date: Fri Jun 27 2008 - 16:43:59 EST


On Wednesday 25 June 2008 17:19, Linus Torvalds wrote:
> The problem is that right now we absolutely _do_ rely on gcc checking the
> string, and as such we're forced to use standard patterns, and standard
> patterns _only_.

Can we have alternative printk?

asmlinkage int printk(const char * fmt, ...)
__attribute__ ((format (printf, 1, 2))) __cold;
+asmlinkage int custom_printk(const char * fmt, ...) __cold asm ("printk");

There you go. custom_printk() will not be checked by gcc.
No runtime overhead.

> And that means that %M isn't an option, but also that if
> we want symbolic names we'd have to use %p, and not some extension.
>
> But once you drop the 'standard patterns' requirement, I do think you
> should drop it _entirely_, and not just extend it with some pissant
> single-character unreadable mess.

It still makes sense to have some more common ones as single char
for size reasons.
--
vda
--
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/