netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Fabio Estevam <fabio.estevam@freescale.com>
To: <davem@davemloft.net>
Cc: <steve.glendinning@shawell.net>, <netdev@vger.kernel.org>,
	Fabio Estevam <fabio.estevam@freescale.com>,
	Sergei Shtylyov <sergei.shtylyov@cogentembedded.com>
Subject: [PATCH 1/2] smsc911x: Do not use netdev_dbg() when device is not registered
Date: Mon, 24 Mar 2014 12:57:25 -0300	[thread overview]
Message-ID: <1395676646-14178-1-git-send-email-fabio.estevam@freescale.com> (raw)

With debug enabled we get the following message:

smsc911x smsc911x (unregistered net_device): couldn't get clock -2

As the device has not been registered at this point, it is better to use 
dev_dbg() instead of netdev_dbg().

CC: Sergei Shtylyov <sergei.shtylyov@cogentembedded.com>

Suggested-by: Sergei Shtylyov <sergei.shtylyov@cogentembedded.com>
Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com>
---
 drivers/net/ethernet/smsc/smsc911x.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/drivers/net/ethernet/smsc/smsc911x.c b/drivers/net/ethernet/smsc/smsc911x.c
index 95e2b9a..c6a5e89 100644
--- a/drivers/net/ethernet/smsc/smsc911x.c
+++ b/drivers/net/ethernet/smsc/smsc911x.c
@@ -439,7 +439,8 @@ static int smsc911x_request_resources(struct platform_device *pdev)
 	/* Request clock */
 	pdata->clk = clk_get(&pdev->dev, NULL);
 	if (IS_ERR(pdata->clk))
-		netdev_dbg(ndev, "couldn't get clock %li\n", PTR_ERR(pdata->clk));
+		dev_dbg(&pdev->dev, "couldn't get clock %li\n",
+			PTR_ERR(pdata->clk));
 
 	return ret;
 }
-- 
1.8.1.2

             reply	other threads:[~2014-03-24 15:57 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-03-24 15:57 Fabio Estevam [this message]
2014-03-24 15:57 ` [PATCH 2/2] smsc911x: No need to print driver version Fabio Estevam
2014-03-26 19:46   ` David Miller
2014-03-26 19:46 ` [PATCH 1/2] smsc911x: Do not use netdev_dbg() when device is not registered David Miller
  -- strict thread matches above, loose matches on Subject: below --
2014-03-24 15:34 Fabio Estevam

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=1395676646-14178-1-git-send-email-fabio.estevam@freescale.com \
    --to=fabio.estevam@freescale.com \
    --cc=davem@davemloft.net \
    --cc=netdev@vger.kernel.org \
    --cc=sergei.shtylyov@cogentembedded.com \
    --cc=steve.glendinning@shawell.net \
    /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;
as well as URLs for NNTP newsgroup(s).