Re: [Announce] Linux-tiny project revival

Arnd Bergmann
2007-09-27T22:35:47Z

On Thursday 27 September 2007, you wrote:
> > 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 problem is, how do you know whether to print a continued printk or not?
> It depends on the loglevel of the first printk.

Those need to be looked at individually. You can normally see easily from
the context whether the missing log level was an accident, or the author
actually has multiple printk statements for a single line. In one case,
you would add a log level, in the other case, you can add PRINTK_CONTINUED,
or something similar. An alternative to PRINTK_CONTINUED might be a new
function, e.g. printk_continued() or similar that does not expect a log
level.

> So besides compile-time parsing of the source code, replacing printk with
> loglevel specific alternatives (one way or the other) seems the only option.

That would mean replacing all of them, not just those that currently lack
a loglevel.