From: LABBE Corentin <clabbe.montjoie@gmail.com>
To: Joe Perches <joe@perches.com>
Cc: peppe.cavallaro@st.com, netdev@vger.kernel.org,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH 1/4] stmmac: replace all pr_xxx by their dev_xxx counterpart
Date: Thu, 10 Sep 2015 13:42:51 +0200 [thread overview]
Message-ID: <20150910114251.GA11036@Red> (raw)
In-Reply-To: <1441815282.17219.51.camel@perches.com>
On Wed, Sep 09, 2015 at 09:14:42AM -0700, Joe Perches wrote:
> On Wed, 2015-09-09 at 15:14 +0200, LABBE Corentin wrote:
> > The stmmac driver use lots of pr_xxx functions to print information.
> > This is bad since we cannot know which device logs the information.
> > (moreover if two stmmac device are present)
> []
> > So this patch replace all pr_xxx by their dev_xxx counterpart.
>
> Using
> netdev_<level>(priv->dev, ...
> instead of
> dev_<level>(priv->device,
>
> would be more consistent with other ethernet devices.
>
Ok
> > diff --git a/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c b/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c
> []
> > @@ -298,7 +298,7 @@ bool stmmac_eee_init(struct stmmac_priv *priv)
> > */
> > spin_lock_irqsave(&priv->lock, flags);
> > if (priv->eee_active) {
> > - pr_debug("stmmac: disable EEE\n");
> > + dev_dbg(priv->device, "disable EEE\n");
>
> netdev_dbg(priv->dev, ...)
>
> > @@ -657,10 +657,10 @@ static int stmmac_init_ptp(struct stmmac_priv *priv)
> > priv->adv_ts = 1;
> >
> > if (netif_msg_hw(priv) && priv->dma_cap.time_stamp)
> > - pr_debug("IEEE 1588-2002 Time Stamp supported\n");
> > + dev_dbg(priv->device, "IEEE 1588-2002 Time Stamp supported\n");
>
> And these netif_msg_<foo> could be
>
> if (priv->dma_cap.timestamp)
> netif_dbg(priv, hw, priv->dev, ...);
>
>
Thanks for the tip, I will add a patch for replacing that.
Regards
next prev parent reply other threads:[~2015-09-10 11:42 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-09-09 13:14 [PATCH 1/4] stmmac: replace all pr_xxx by their dev_xxx counterpart LABBE Corentin
2015-09-09 13:14 ` [PATCH 2/4] stmmac: replace hardcoded function name by __func__ LABBE Corentin
2015-09-09 13:14 ` [PATCH 3/4] stmmac: remove some __func__ printing LABBE Corentin
2015-09-09 13:14 ` [PATCH 4/4] stmmac: Fix simple style problem LABBE Corentin
2015-09-09 16:14 ` [PATCH 1/4] stmmac: replace all pr_xxx by their dev_xxx counterpart Joe Perches
2015-09-10 11:42 ` LABBE Corentin [this message]
2015-09-16 7:35 ` LABBE Corentin
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=20150910114251.GA11036@Red \
--to=clabbe.montjoie@gmail.com \
--cc=joe@perches.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;
as well as URLs for NNTP newsgroup(s).