On Wed, Oct 14, 2009 at 07:09:48PM -0700, Greg KH wrote: > On Wed, Oct 14, 2009 at 06:53:44PM -0700, Joe Perches wrote: > > Where appropriate: > > Use #define pr_fmt(fmt) KBUILD_MODNAME ": " fmt or > > #define pr_fmt(fmt) "some prefix: " fmt > > Remove prefixes > > Remove direct function names and use %s...__func__ > > Convert __FUNCTION__ to __func__ > > Convert some printks to pr_cont > > Convert printk(KERN_<LEVEL> to pr_<level>( > > Integrated long strings > > > > Did not do much conversions of bare printks > > > > Some of these are uncompiled and all of them > > are untested. > > > > Mostly done via a perl script and some emacs macros: > > > > $ for file in $(find drivers/staging -name "*.[ch]") ; do \ > > perl -i -e ' \ > > local $/; \ > > while (<>) { \ > > s@\bprintk\s*\(\s*KERN_(INFO|WARNING|ERR|ALERT|CRIT|EMERG|NOTICE)\s*@pr_\L$1\(@g; \ > > s@\b(pr_[^;]+)\"\s*\n\s*\"@$1@g; \ > > s@\b(pr_[^;]+)\"\s*\n\s*\"@$1@g; \ > > s@\b(pr_[^;]+)\"\s*\n\s*\"@$1@g; \ > > print; \ > > }' $file ; \ > > done > > I hate patches done by scripts, as they usually are wrong. Like these > :( Oh, they also don't apply, as stuff has changed in the linux-next tree (like the whole drivers/staging/android/ tree going away...) thanks, greg k-h _______________________________________________ devel mailing list devel@xxxxxxxxxxxxxxxxxxxxxx http://driverdev.linuxdriverproject.org/mailman/listinfo/devel