netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH net-next] ethernet: amd: use pr_info_once()
@ 2014-09-11  7:20 Varka Bhadram
  2014-09-12 22:03 ` David Miller
  0 siblings, 1 reply; 2+ messages in thread
From: Varka Bhadram @ 2014-09-11  7:20 UTC (permalink / raw)
  To: netdev; +Cc: davem, Thomas.Lendacky, Varka Bhadram

It will use pr_info_one() to print the version info of the
driver in probe function only once. No need to use the static
variable here.

Signed-off-by: Varka Bhadram <varkab@cdac.in>
---
 drivers/net/ethernet/amd/au1000_eth.c |    6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)

diff --git a/drivers/net/ethernet/amd/au1000_eth.c b/drivers/net/ethernet/amd/au1000_eth.c
index 31c48a7..6c323f4 100644
--- a/drivers/net/ethernet/amd/au1000_eth.c
+++ b/drivers/net/ethernet/amd/au1000_eth.c
@@ -1140,7 +1140,6 @@ static const struct net_device_ops au1000_netdev_ops = {
 
 static int au1000_probe(struct platform_device *pdev)
 {
-	static unsigned version_printed;
 	struct au1000_private *aup = NULL;
 	struct au1000_eth_platform_data *pd;
 	struct net_device *dev = NULL;
@@ -1371,9 +1370,8 @@ static int au1000_probe(struct platform_device *pdev)
 
 	netdev_info(dev, "Au1xx0 Ethernet found at 0x%lx, irq %d\n",
 			(unsigned long)base->start, irq);
-	if (version_printed++ == 0)
-		pr_info("%s version %s %s\n",
-					DRV_NAME, DRV_VERSION, DRV_AUTHOR);
+
+	pr_info_once("%s version %s %s\n", DRV_NAME, DRV_VERSION, DRV_AUTHOR);
 
 	return 0;
 
-- 
1.7.9.5

^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH net-next] ethernet: amd: use pr_info_once()
  2014-09-11  7:20 [PATCH net-next] ethernet: amd: use pr_info_once() Varka Bhadram
@ 2014-09-12 22:03 ` David Miller
  0 siblings, 0 replies; 2+ messages in thread
From: David Miller @ 2014-09-12 22:03 UTC (permalink / raw)
  To: varkabhadram; +Cc: netdev, Thomas.Lendacky, varkab

From: Varka Bhadram <varkabhadram@gmail.com>
Date: Thu, 11 Sep 2014 12:50:50 +0530

> It will use pr_info_one() to print the version info of the
> driver in probe function only once. No need to use the static
> variable here.
> 
> Signed-off-by: Varka Bhadram <varkab@cdac.in>

Applied, thank you.

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2014-09-12 22:03 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-09-11  7:20 [PATCH net-next] ethernet: amd: use pr_info_once() Varka Bhadram
2014-09-12 22:03 ` David Miller

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).