Messages in this thread | | | Subject | Re: [PATCH] floppy: Neaten message logging | From | Joe Perches <> | Date | Wed, 18 Jun 2014 15:09:10 -0700 |
| |
On Wed, 2014-06-18 at 23:59 +0200, Jiri Kosina wrote: > On Wed, 18 Jun 2014, Joe Perches wrote: > > > Use a more current style to prefix "floppy: " on > > all messages. > > > > Convert DPRINT to emit at KERN_DEBUG. > > > > Other miscellaneous logging changes: > > > > o Add missing newline > > o Remove embedded "floppy" style prefixes > > Why is this a good change? > > [ ... ] > > if (!req) { > > - pr_info("floppy.c: no request in request_done\n"); > > + pr_info("no request in request_done\n"); > > I think that in cases like this (and elsewhere where you are changing it > in your patch) the prefix is actually useful.
Adding
#define pr_fmt(fmt) KBUILD_MODNAME ": " fmt
makes sure that all printks from this module are prefixed with "floppy: ".
Currently, only a very few actually are prefixed with anything and there are some prefix mixtures of "floppy: " and "floppy.c: "
| |