[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAJfuBxxZdNRZAix8ARUjqjNzrQeG2iVea_rMYKysOaX4c=Avig@mail.gmail.com>
Date: Tue, 27 Sep 2011 14:37:23 -0600
From: Jim Cromie <jim.cromie@...il.com>
To: Joe Perches <joe@...ches.com>
Cc: jbaron@...hat.com, bart.vanassche@...il.com, greg@...ah.com,
linux-kernel@...r.kernel.org
Subject: Re: [PATCH 25/26] dynamic_debug: add pr_fmt_dbg() for dynamic_pr_debug
On Thu, Sep 22, 2011 at 2:57 PM, Joe Perches <joe@...ches.com> wrote:
> On Wed, 2011-09-21 at 15:55 -0600, jim.cromie@...il.com 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 :-}
--
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