[<prev] [next>] [day] [month] [year] [list]
Message-ID: <1432262778.20840.79.camel@perches.com>
Date: Thu, 21 May 2015 19:46:18 -0700
From: Joe Perches <joe@...ches.com>
To: Michael Shuey <shuey@...due.edu>
Cc: Julia Lawall <julia.lawall@...6.fr>,
"Drokin, Oleg" <oleg.drokin@...el.com>, devel@...verdev.osuosl.org,
gregkh@...uxfoundation.org, kernel-janitors@...r.kernel.org,
linux-kernel@...r.kernel.org, HPDD-discuss@...1.01.org,
lustre-devel@...ts.lustre.org
Subject: Re: [PATCH v4 10/13] staging: lustre: lnet: lnet: checkpatch.pl
fixes
On Thu, 2015-05-21 at 18:04 -0400, 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?
Yes, many other bits of code use custom debugging macros.
A good general form is to add a either a generic level or bitmask
macro and use a single entry like:
my_dbg([optional_ptr,] <level|bitmap>, fmt, ...)
so that <level|bitmap> can be tested against some
variable set by MODULE_PARM_DESC controls.
So, CNETERR(...) might be lustre_dbg(ptr, NETERR, fmt, ...)
though I don't know what use the ptr might have.
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists