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

From: Scott Wood <[email-masked]>
Date: Mon, 27 Jul 2015 13:59:25 -0500

On Fri, 2015-07-24 at 10:45 -0500, Bucur Madalin-Cristian-B32716 wrote:
> > -----Original Message-----
> > From: Joe Perches [mailto:[email-masked]]
> > 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