Re: [PATCH] kmemleak: use pr_fmt

From: Catalin Marinas
Date: Mon Jun 22 2009 - 05:56:46 EST


On Fri, 2009-06-19 at 12:49 -0700, Joe Perches wrote:
> On Fri, 2009-06-19 at 10:53 +0100, Catalin Marinas wrote:
> > Thanks for the patch. It missed one pr_info case (actually invoked via
> > the pr_helper macro).
>
> This change will affect the seq_printf uses.
> Some think the seq output should be immutable.
> Perhaps that's important to you or others.

My point was that with your patch, the kmemleak kernel messages with
pr_info were something like:

kmemleak: kmemleak: unreferenced object ...
kmemleak: comm ...
kmemleak: backtrace:

After dropping "kmemleak: " in the print_helper() call, kernel messages
become (which I find nicer):

kmemleak: unreferenced object ...
kmemleak: comm ...
kmemleak: backtrace:

For the seq_printf() we really don't need the "kmemleak: " prefix since
you read a kmemleak-specific file anyway. With my modification, the seq
output becomes:

unreferenced object ...
comm ...
backtrace:

i.e. without the "kmemleak: " prefix on the "unreferenced ..." line.

--
Catalin

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/