Re: [PATCH v4 10/13] staging: lustre: lnet: lnet: checkpatch.pl fixes

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Sat, 2015-05-23 at 00:07 +0000, Drokin, Oleg wrote:
> On May 22, 2015, at 7:57 PM, Joe Perches wrote:
> > On Fri, 2015-05-22 at 21:16 +0000, Drokin, Oleg wrote:
> >> On May 22, 2015, at 11:42 AM, Joe Perches wrote:
> >>> On Fri, 2015-05-22 at 08:08 +0000, Drokin, Oleg wrote:
> >>>> On May 22, 2015, at 1:06 AM, Julia Lawall wrote:
> >>>>> On Thu, 21 May 2015, Michael Shuey wrote:
> >>>>> 
> >>>>>> That's a task (of many) I've been putting on the back burner until the code
> >>>>>> is cleaner.  It's also a HUGE change, since there are debug macros
> >>>>>> everywhere, and they all check a #define'd mask to see if they should fire,
> >>>>>> and the behavior is likely governed by parts of the lustre user land tools
> >>>>>> as well.
> >>>>>> 
> >>>>>> Suggestions are welcome.  Do other parts of the linux kernel define complex
> >>>>>> debugging macros like these, or is this a lustre-ism?  Any suggestions on
> >>>>>> how to handle this more in line with existing drivers?
> >>>>> 
> >>>>> Once you decide what to do, you can use Coccinelle to make the changes for
> >>>>> you.  So you shouldn't be put off by the number of code sites to change.
> >>>>> 
> >>>>> The normal functions are pr_err, pr_warn, etc.  Perhaps you can follow
> >>>>> Joe's suggestions if you really need something more complicated.
> >>>> 
> >>>> Ideally leaving CERROR/CDEBUG in Lustre would be desirable from my perspective.
> >>> 
> >>> My issue with CERROR is the name is little misleading.
> >>> It's actually a debugging message.
> >>> #define CERROR(format, ...)  CDEBUG_LIMIT(D_ERROR, format, ## __VA_ARGS__)
> >> 
> >> Except it's not a debugging message.
> >> There is a clear distinction.
> > 
> > Not really.  If the first reading shows that the mechanism it
> > goes through is called CDEBUG, a reasonable expectation should
> > be that it's a debugging message.
> 
> Well, various pr_err/pr_dbg for example, go through printk in the end too.
> Do that make them the same?

No, because each is labeled with the KERN_<level> that it uses.

[]

> >> I wonder what is more clear about that in your opinion ve
> >> lustre_error/lustre_debug?
> > 
> > The fact that you have to explain this shows that it's
> > at least misleading unless you completely understand the
> > code.
> 
> Or you know, you might take the function name at the face value
> and assume that CERROR means it's an error and CDEBUG means it's a debug message?

Maybe, but I think that it'd be better if the mechanism
it uses was more plainly named something like lustre_log.



_______________________________________________
devel mailing list
devel@xxxxxxxxxxxxxxxxxxxxxx
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel




[Index of Archives]     [Linux Driver Backports]     [DMA Engine]     [Linux GPIO]     [Linux SPI]     [Video for Linux]     [Linux USB Devel]     [Linux Coverity]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Yosemite Backpacking]
  Powered by Linux