Re: [PATCH 09/33] aio: dprintk() -> pr_debug()

From: Joe Perches
Date: Thu Mar 21 2013 - 13:38:36 EST

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

To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at
Please read the FAQ at