Re: [PATCH] xen-blkback: define pr_fmt macro to avoid the duplication of DRV_PFX

From: Joe Perches
Date: Tue Mar 31 2015 - 12:53:22 EST


On Tue, 2015-03-31 at 16:57 +0200, Roger Pau Monné wrote:
> El 31/03/15 a les 23.14, Tao Chen ha escrit:
> > Define pr_fmt macro with {xen-blkback: } prefix, then remove all use
> > of DRV_PFX in the pr and DPRINTK sentences. It will simplify the code.
[]
> > diff --git a/drivers/block/xen-blkback/xenbus.c b/drivers/block/xen-blkback/xenbus.c
[]
> > @@ -14,6 +14,11 @@
> >
> > */
> >
> > +#define pr_fmt(fmt) "xen-blkback: " fmt
> > +#define DPRINTK(fmt, args...) \
> > + pr_debug("(%s:%d) " fmt ".\n", \
> > + __func__, __LINE__, ##args)

As dynamic debug can emit __func__ and __LINE__
I suggest converting DPRINTK to pr_debug.


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