Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1523767

[PATCH 2/3] net: stmmac: replace hardcoded function name by __func__

From Corentin Labbe <clabbe.montjoie@gmail.com>
Newsgroups linux.kernel
Subject [PATCH 2/3] net: stmmac: replace hardcoded function name by __func__
Date 2016-11-16 20:20 +0100
Message-ID <sEdUt-70N-23@gated-at.bofh.it> (permalink)
References <sEdUt-70N-5@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


From: LABBE Corentin <clabbe.montjoie@gmail.com>

Some printing have the function name hardcoded.
It is better to use __func__ instead.

Signed-off-by: Corentin Labbe <clabbe.montjoie@gmail.com>
---
 drivers/net/ethernet/stmicro/stmmac/stmmac_main.c | 7 +++----
 1 file changed, 3 insertions(+), 4 deletions(-)

diff --git a/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c b/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c
index 791daf4..d160bdb 100644
--- a/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c
+++ b/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c
@@ -849,7 +849,7 @@ static int stmmac_init_phy(struct net_device *dev)
 
 		snprintf(phy_id_fmt, MII_BUS_ID_SIZE + 3, PHY_ID_FMT, bus_id,
 			 priv->plat->phy_addr);
-		netdev_dbg(priv->dev, "stmmac_init_phy: trying to attach to %s\n",
+		netdev_dbg(priv->dev, "%s: trying to attach to %s\n", __func__,
 			   phy_id_fmt);
 
 		phydev = phy_connect(dev, phy_id_fmt, &stmmac_adjust_link,
@@ -890,9 +890,8 @@ static int stmmac_init_phy(struct net_device *dev)
 	if (phydev->is_pseudo_fixed_link)
 		phydev->irq = PHY_POLL;
 
-	netdev_dbg(priv->dev,
-		   "stmmac_init_phy: attached to PHY (UID 0x%x) Link = %d\n",
-		   phydev->phy_id, phydev->link);
+	netdev_dbg(priv->dev, "%s: attached to PHY (UID 0x%x) Link = %d\n",
+		   __func__, phydev->phy_id, phydev->link);
 
 	return 0;
 }
-- 
2.7.3

Back to linux.kernel | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

[PATCH 1/3] net: stmmac: replace all pr_xxx by their netdev_xxx counterpart Corentin Labbe <clabbe.montjoie@gmail.com> - 2016-11-16 20:20 +0100
  [PATCH 3/3] net: stmmac: replace if (netif_msg_type) by their netif_xxx counterpart Corentin Labbe <clabbe.montjoie@gmail.com> - 2016-11-16 20:20 +0100
    Re: [PATCH 3/3] net: stmmac: replace if (netif_msg_type) by their  netif_xxx counterpart David Miller <davem@davemloft.net> - 2016-11-17 19:40 +0100
  [PATCH 2/3] net: stmmac: replace hardcoded function name by __func__ Corentin Labbe <clabbe.montjoie@gmail.com> - 2016-11-16 20:20 +0100
    Re: [PATCH 2/3] net: stmmac: replace hardcoded function name by  __func__ David Miller <davem@davemloft.net> - 2016-11-17 19:40 +0100
  Re: [PATCH 1/3] net: stmmac: replace all pr_xxx by their netdev_xxx  counterpart Giuseppe CAVALLARO <peppe.cavallaro@st.com> - 2016-11-17 18:50 +0100
  Re: [PATCH 1/3] net: stmmac: replace all pr_xxx by their  netdev_xxx counterpart David Miller <davem@davemloft.net> - 2016-11-17 19:40 +0100

csiph-web