lkml.org 
[lkml]   [2011]   [Apr]   [13]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: Re-send (What else needs to be done to the sep driver (staging/sep))
On Wed, Apr 13, 2011 at 03:30:36PM -0700, Joe Perches wrote:
> On Wed, 2011-04-13 at 15:23 -0700, Greg KH wrote:
> > Ick, no, never use your own macros, just use the "real" things like is
> > done in this driver. If it's a pain to get to that pointer, then use a
> > temporary variable in the code and then use it.
> >
> > Otherwise, no, I don't like this patch at all, sorry.
>
> I think you're simply incorrect here.
>
> There are lots of other uses like netdev_<foo>
> where <foo>_<level> takes a particular pointer type.
>
> This is a structure that contains a pointer to
> another structure than contains a struct device.
>
> You might also look at the macros the USB subsystem
> uses for message logging.
>
> Hey, aren't you the USB maintainer?

Yes, and over time we have been moving away from using those macros. I
don't like seeing every individual driver have its own way of handling
debug macros, that's crazy.

For larger stuff like networking, yes, they can do that, and that's
fine. They also were doing this before the dev_* macros came along,
just like USB did, so there is historical precident there.

But again, not for a new driver, don't redefine the existing macros just
because you don't like typing a few extra characters...

thanks,

greg k-h


\
 
 \ /
  Last update: 2011-04-14 00:49    [W:0.039 / U:2.540 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site