lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <1441902284.17219.165.camel@perches.com>
Date:	Thu, 10 Sep 2015 09:24:44 -0700
From:	Joe Perches <joe@...ches.com>
To:	LABBE Corentin <clabbe.montjoie@...il.com>
Cc:	peppe.cavallaro@...com, netdev@...r.kernel.org,
	linux-kernel@...r.kernel.org
Subject: Re: [PATCH v2 5/5] stmmac: replace if (netif_msg_type) by their
 netif_xxx counterpart

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.


--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ