Re: [Announce] Linux-tiny project revival

From: Rob Landley
Date: Thu Sep 27 2007 - 19:07:24 EST

On Thursday 27 September 2007 2:00:36 am Arnd Bergmann wrote:
> #define KERN_NOTICE "<5>",
> #define PRINTK_CONTINUED "",
> #define printk(level, str, ...) \
> do { \
> if (sizeof(level) == 1) /* continued printk */\
> actual_printk(str, __VA_ARGS__); \
> else if ((level[1] - '0') < CONFIG_PRINTK_DOICARE) \
> actual_printk(level str, __VA_ARGS__); \
> } while(0);
> Then you don't have to change every single printk in the kernel, but
> only those that don't currently come with a log level. More importantly,
> you can do the conversion without a flag day, by spreading (an empty)
> PRINTK_CONTINUED in places that do need a printk without a log level.

The "change every printk in the kernel" suggestion came from me trying to
figure out how to get the printk() calls below a certain log level to
optimize out and not take up space in the binary.

The above doesn't address the original cause of the thread, as far as I can

> Arnd <><

"One of my most productive days was throwing away 1000 lines of code."
- Ken Thompson.
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at
Please read the FAQ at