Re: [PATCH 02/10] dpaa_eth: add support for DPAA Ethernet

From: Scott Wood
Date: Mon Jul 27 2015 - 14:59:40 EST


On Fri, 2015-07-24 at 10:45 -0500, Bucur Madalin-Cristian-B32716 wrote:
> > -----Original Message-----
> > From: Joe Perches [mailto:joe@xxxxxxxxxxx]
> > On Wed, 2015-07-22 at 19:16 +0300, Madalin Bucur wrote:
> > > +static int __init dpa_load(void)
> > > +{
> > []
> > > + err = platform_driver_register(&dpa_driver);
> > > + if (unlikely(err < 0)) {
> > > + pr_err(KBUILD_MODNAME
> > > + ": %s:%hu:%s(): platform_driver_register() = %d\n",
> > > + KBUILD_BASENAME ".c", __LINE__, __func__, err);
> > > + }
> > > +
> > > + pr_debug(KBUILD_MODNAME ": %s:%s() ->\n",
> > > + KBUILD_BASENAME ".c", __func__);
> >
> > Perhaps these should use pr_fmt
>
> Agree.

How about dropping all that complexity, and just using pr_debug("%s\n",
__func__), or dev_dbg where possible?

>
> > > +static void __exit dpa_unload(void)
> > > +{
> > > + pr_debug(KBUILD_MODNAME ": -> %s:%s()\n",
> > > + KBUILD_BASENAME ".c", __func__);
> >
> > dynamic debug has __func__ available and perhaps
> > the function tracer might be used instead.
> >
> > > diff --git a/drivers/net/ethernet/freescale/dpaa/dpaa_eth.h
> > b/drivers/net/ethernet/freescale/dpaa/dpaa_eth.h
> > []
> > > +#define __hot
> >
> > curious.
> >
> > Maybe it'd be good to add a real __hot to compiler.h
>
> They're mostly there to make readers aware the code is critical, any
> changes could mess performance.

Mostly or entirely? Why not just use a comment, which could also point out
specific things that were done for performance?

-Scott

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