mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Joe Perches <joe@perches.com>
To: LABBE Corentin <clabbe.montjoie@gmail.com>
Cc: peppe.cavallaro@st.com, netdev@vger.kernel.org,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH v2 5/5] stmmac: replace if (netif_msg_type) by their netif_xxx counterpart
Date: Thu, 10 Sep 2015 09:24:44 -0700	[thread overview]
Message-ID: <1441902284.17219.165.camel@perches.com> (raw)
In-Reply-To: <1441888653-30535-6-git-send-email-clabbe.montjoie@gmail.com>

On Thu, 2015-09-10 at 14:37 +0200, LABBE Corentin wrote:
> replace all
> if (netif_msg_type(priv)) dev_xxx(priv->devices, ...)
> by the simplier macro netif_xxx(priv, hw, priv->dev, ...)

Thanks.  Trivia:

> diff --git a/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c b/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c
[]
> @@ -733,10 +735,9 @@ static void stmmac_adjust_link(struct net_device *dev)
>  				stmmac_hw_fix_mac_speed(priv);
>  				break;
>  			default:
> -				if (netif_msg_link(priv))
> -					netdev_warn(priv->dev,
> -						    "%s: Speed (%d) not 10/100\n",
> -						    dev->name, phydev->speed);
> +				netif_warn(priv, link, priv->dev,
> +					   "%s: Speed (%d) not 10/100\n",
> +					   dev->name, phydev->speed);

Maybe add another patch removing dev->name where used
in logging as it's likely redundant.

> @@ -1038,18 +1039,15 @@ static int init_dma_desc_rings(struct net_device *dev, gfp_t flags)
>  
>  	priv->dma_buf_sz = bfsize;
>  
> -	if (netif_msg_probe(priv))
> -		netdev_dbg(priv->dev, "%s: txsize %d, rxsize %d, bfsize %d\n",
> -			   __func__, txsize, rxsize, bfsize);
> +	netif_dbg(priv, probe, priv->dev, "%s: txsize %d, rxsize %d, bfsize %d\n",
> +		  __func__, txsize, rxsize, bfsize);

And another removing __func__ from the _dbg uses as
it's relatively low value and dynamic debug can add it.



  reply	other threads:[~2015-09-10 16:24 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-09-10 12:37 stmmac: improve logging LABBE Corentin
2015-09-10 12:37 ` [PATCH v2 1/5] stmmac: replace all pr_xxx by their netdev_xxx counterpart LABBE Corentin
2015-09-10 15:44   ` Joe Perches
2015-09-10 12:37 ` [PATCH v2 2/5] stmmac: replace hardcoded function name by __func__ LABBE Corentin
2015-09-10 12:37 ` [PATCH v2 3/5] stmmac: remove some __func__ printing LABBE Corentin
2015-09-10 12:37 ` [PATCH v2 4/5] stmmac: Fix simple style problem LABBE Corentin
2015-09-10 12:37 ` [PATCH v2 5/5] stmmac: replace if (netif_msg_type) by their netif_xxx counterpart LABBE Corentin
2015-09-10 16:24   ` Joe Perches [this message]
2015-09-15 20:31 ` stmmac: improve logging David Miller

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1441902284.17219.165.camel@perches.com \
    --to=joe@perches.com \
    --cc=clabbe.montjoie@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=peppe.cavallaro@st.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

Powered by JetHome