lkml.org 
[lkml]   [2008]   [Aug]   [14]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [patch 1/3] kmsg: Kernel message catalog macros.
On Thu, Aug 14, 2008 at 08:08:59PM -0700, Joe Perches wrote:
> On Thu, 2008-08-14 at 11:50 -0700, Tim Hockin wrote:
> > // this is the actual implementation
> > extern void send_kmsg(int level, const char *fmt, ...);
> > // this is a convenience wrapper, maybe not needed as they get combinatoric
> > #define kmsg_err(fmt, ...) \
> > send_kmsg(KERN_ERROR, fmt, ##__VA_ARGS__)
> > inside a subsystem-specific header:
> > #define mysubsys_kmsg_err(fmt, ...) \
> > kmsg_err("mysubsys:" fmt "\n", ##__VA_ARGS__)
> > inside each subsystem-driver:
> > #define mydriver_kmsg_err(fmt, ...) \
> > mysubsys_kmsg_err("mydriver:" fmt, ##__VA_ARGS__)
> > then the driver just calls:
> > mydriver_kmsg_err("something happened");
>
> I think adding system/subsystem/driver prefixes
> to function names is not good.

Eeek!

What is wrong with what we have already agreed to standardise on here
people? dev_printk() for devices! It uniquely shows the device, what
driver is bound to it (if any), the bus id, and everything else.

It's in a parseable, standard format, that everyone agreed a few years
was going to be the way to go!

And now you want to create your own new one? Come on, please don't be
that foolish. Please work with what we already have. Extend it or
something to have these "magic tokens" that you all want to index off
of, that's fine, I really could care less (and I really think it's going
to be a pain in the end, does everyone forget how frickin fast this
body of software moves?)

But whatever you do, don't create yet-another-printk-macro that you are
going to want everyone to use in their drivers/modules. We've already
done that, and we are still slowly converting people over to them (I did
just that for a large number USB drivers just today...)

Work off of dev_printk() and friends, don't do something new.

thanks,

greg k-h


\
 
 \ /
  Last update: 2008-08-15 05:49    [W:0.092 / U:0.084 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site