lkml.org 
[lkml]   [2013]   [Mar]   [21]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [PATCH 09/33] aio: dprintk() -> pr_debug()
From
Date
On Thu, 2013-03-21 at 09:35 -0700, Kent Overstreet wrote:
[]
> diff --git a/fs/aio.c b/fs/aio.c

Hi Kent.

I generally prefer pr_debug but maybe here's
a couple of things you don't already know.

> +#define pr_fmt(fmt) "%s: " fmt, __func__

dynamic debug can add __func__ to each output
with +f so I think this prefixing with %s, __func__
is unnecessary.

I do think
#define pr_fmt(fmt) KBUILD_MODNAME ": " fmt
is fairly standard, (though that can be added by
dynamic_debug as well with -m)

For example, without dynamic debug enabled
but with DEBUG #defined and KBUILD_MODNAME
I could get in dmesg:
aio: ENOMEM: nr_events too high
instead of
ioctx_alloc: ENOMEM: nr_events too high
and I think that's more intelligible.

These messages are not emitted by default, only
when specifically enabled with dynamic_debug or
adding #define DEBUG to the sources or -DDEBUG
to the Makefile




\
 
 \ /
  Last update: 2013-03-21 19:01    [W:0.434 / U:0.684 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site