Re: [PATCH 1/2] skd: Replaced custom debug PRINTKs with pr_debug

From: Joe Perches
Date: Thu Oct 03 2013 - 12:14:53 EST


On Thu, 2013-10-03 at 10:09 +0000, Ramprasad Chinthekindi wrote:
> > -----Original Message-----
> > On Tue, 2013-10-01 at 12:25 +0000, OS Engineering wrote:
> > > Hi Jens,
> > > I'm sending a patch to replace custom debug macros with pr_debug().
> > Kindly please review the patch.
> > > Thanking you.
> >
> > I think that this doesn't differentiate between
> > the 2 debugging levels currently implemented.
> >
> > I'd do something like this:
> >
> > Add pr_fmt to prefix pr_<level> uses with "skd: "
> > Add skd_<level> convenience logging macros
> > Convert VPRINTK/DPRINTK to skd_dbg(level, skdev, fmt, ...)
> > Convert pr_<level>("(%s): ...", skd_name(skdev), ...) uses to
> > skd_<level>(skdev, ...)
> > Use kcalloc not kzalloc with multiply
> > Remove a couple unnecessary pr_err function logging uses
> > Add missing newline to logging
[]
> Jens Axboe and other community members suggested us to remove the custom PRINTK macros from driver and replace them with pr_* macros directly.
> From driver's perspective, it's perfectly fine not to distinguish VPRINTs and DPRINTs. Hence, both have been replaced with pr_debug().

The initial patch net adds ~120 line of code,
the suggested patch net removes ~50 and
consolidates a few different output styles.

Also, please don't quote the entire patch
without commenting on it. Delete the
quoted stuff that's not relevant please.

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