Re: [PATCH] rtlwifi: Convert printks to pr_<level>

From: Joe Perches
Date: Wed Jul 20 2011 - 18:04:47 EST


On Wed, 2011-07-20 at 11:38 -0500, Larry Finger wrote:
> On 07/20/2011 10:51 AM, Joe Perches wrote:
> > Use the current logging styles.
> > Add pr_fmt where appropriate.
> > Remove now unnecessary prefixes from printks.
> > Convert hard coded prefix to __func__.
> > Add a missing "\n" to a format.
[]
> In general these look good, but why not define pr_fmt in rtlwifi/wifi.h. That
> header is used by every source file, and you only need the define once.

Because that's not the first #include in every file.

The #define pr_fmt has to be before anything that
includes kernel.h so it's safest/best to have it
be the first thing in the file.

At some point in the next year or so, all of the
uses of:

#define pr_fmt(fmt) KBUILD_MODNAME ": " fmt

should be removed and that should become the default.

cheers, Joe

--
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/