[PATCH available] Re: printk() without KERN_ prefixes? (in 2.5.59)

Ph. Marek (philipp.marek@bmlv.gv.at)
Fri, 24 Jan 2003 12:32:28 +0100


> >Should they be fixed to KERN_INFO or some such? I'm willing to contribute
> > a patch (which will be done by script, of course). Or am I missing
> > something and they shall stay as they are?
>
> Do not blindly add KERN_*. Some prints are done with multiple calls to
> printk(), only the first call should have KERN_*, otherwise you get
> lines like this, with embedded '<n>' strings.

Well, I wrote a perl-script (available on request) which searches for missing
KERN_ values.
It does this by reading filenames from STDIN, reading the files, extracting
every function from there and checking if after \n is a KERN_-value (assuming
that every function starts from a fresh line). If there is one missing,
KERN_DEBUG is inserted.

my simple script was unable to do some files in the arch/ia64 tree and some
others because using #if with mis-aligned { and }. example from
sound/isa/opti9xx/opti92x-ad1848.c
#ifdef __ISAPNP__
if (isapnp && (hw = snd_card_opti9xx_isapnp(chip)) > 0) {
...
} else {
#endif /* __ISAPNP__ */
...
#ifdef __ISAPNP__
}
#endif /* __ISAPNP__ */
and it just doesn't check such constructs.

Furthermore it destroys some files (don't know why atm), but these are
manually excluded from the patch, which is 3933078 bytes (bzipped2 699170).

This patch has NOT all occurances fixed!

from diffstat:
1908 files changed, 13568 insertions(+), 13567 deletions(-)

So I think it not really useful to just post this patch to the list.

I think I'll cut it at subdirectory levels in pieces (ie arch/ia64, arch/i386,
drivers/net, drivers/scsi ...).
I should have them available some time monday for the interested.

Comments?

Regards,

Phil

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