Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1221551
| From | Joe Perches <joe@perches.com> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | Re: [PATCH 1/4] stmmac: replace all pr_xxx by their dev_xxx counterpart |
| Date | 2015-09-09 18:20 +0200 |
| Message-ID | <q6Qgi-8b1-21@gated-at.bofh.it> (permalink) |
| References | <q6Ns6-48j-3@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
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.
> 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, ...);
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Back to linux.kernel | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
[PATCH 1/4] stmmac: replace all pr_xxx by their dev_xxx counterpart LABBE Corentin <clabbe.montjoie@gmail.com> - 2015-09-09 15:20 +0200
[PATCH 3/4] stmmac: remove some __func__ printing LABBE Corentin <clabbe.montjoie@gmail.com> - 2015-09-09 15:20 +0200
[PATCH 4/4] stmmac: Fix simple style problem LABBE Corentin <clabbe.montjoie@gmail.com> - 2015-09-09 15:20 +0200
Re: [PATCH 1/4] stmmac: replace all pr_xxx by their dev_xxx counterpart Joe Perches <joe@perches.com> - 2015-09-09 18:20 +0200
Re: [PATCH 1/4] stmmac: replace all pr_xxx by their dev_xxx counterpart LABBE Corentin <clabbe.montjoie@gmail.com> - 2015-09-10 13:50 +0200
Re: [PATCH 1/4] stmmac: replace all pr_xxx by their dev_xxx counterpart LABBE Corentin <clabbe.montjoie@gmail.com> - 2015-09-16 09:40 +0200
csiph-web