[lkml]   [2011]   [Sep]   [27]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
SubjectRe: [PATCH 25/26] dynamic_debug: add pr_fmt_dbg() for dynamic_pr_debug
On Thu, Sep 22, 2011 at 2:57 PM, Joe Perches <> wrote:
> On Wed, 2011-09-21 at 15:55 -0600, wrote:
>> dynamic_pr_debug can add module, function, file, and line selectively,
> []
>> diff --git a/include/linux/dynamic_debug.h b/include/linux/dynamic_debug.h
> []
>> +#ifndef pr_fmt_dbg
>> +#define pr_fmt_dbg(fmt) fmt
>> +#endif
> []
>> +#ifndef pr_fmt_dbg
>> +#define pr_fmt_dbg(fmt) pr_fmt(fmt)
>> +#endif
> This might better be placed in printk.h just
> once.

yes. it seems to work smoothly.
Only minor annoyance is having to put local defns
above the #includes, but thats no different than previously.

> I think pr_fmt_debug is better than pr_fmt_dbg
> because the function/macro is named pr_debug.

Ok. Done.

> Maybe add all the pr_<level> variants too because
> some like to prefix __func__ to pr_err but not pr_info
> etc.

Done. Only wrinkle is wrt pr_warning() vs pr_warn()
I added to your suggestion:
+#define pr_fmt_warn pr_fmt_warning

the imperfection is that user has 4 combos of warn/warning
rather than 2 pairs, but the latter seems less defensible.

revised patch forthcoming shortly
seems I havent mastered reply-to with git send-email :-}

 \ /
  Last update: 2011-09-27 22:39    [W:0.060 / U:5.676 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site