From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754602AbbIIQOr (ORCPT ); Wed, 9 Sep 2015 12:14:47 -0400 Received: from smtprelay0028.hostedemail.com ([216.40.44.28]:40791 "EHLO smtprelay.hostedemail.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1751390AbbIIQOp (ORCPT ); Wed, 9 Sep 2015 12:14:45 -0400 X-Session-Marker: 6A6F6540706572636865732E636F6D X-Spam-Summary: 2,0,0,,d41d8cd98f00b204,joe@perches.com,:::::::,RULES_HIT:41:355:379:541:599:960:973:988:989:1260:1277:1311:1313:1314:1345:1359:1373:1437:1515:1516:1518:1534:1541:1593:1594:1711:1730:1747:1777:1792:2393:2559:2562:2828:2892:3138:3139:3140:3141:3142:3352:3622:3865:3866:3867:3868:3871:4321:5007:6261:7901:7903:10004:10400:10848:11026:11232:11657:11658:11914:12043:12296:12517:12519:12740:13069:13311:13357:21063:21080,0,RBL:none,CacheIP:none,Bayesian:0.5,0.5,0.5,Netcheck:none,DomainCache:0,MSF:not bulk,SPF:fn,MSBL:0,DNSBL:none,Custom_rules:0:0:0 X-HE-Tag: wax32_293e363b50f4e X-Filterd-Recvd-Size: 2132 Message-ID: <1441815282.17219.51.camel@perches.com> Subject: Re: [PATCH 1/4] stmmac: replace all pr_xxx by their dev_xxx counterpart From: Joe Perches To: LABBE Corentin Cc: peppe.cavallaro@st.com, netdev@vger.kernel.org, linux-kernel@vger.kernel.org Date: Wed, 09 Sep 2015 09:14:42 -0700 In-Reply-To: <1441804456-15914-1-git-send-email-clabbe.montjoie@gmail.com> References: <1441804456-15914-1-git-send-email-clabbe.montjoie@gmail.com> Content-Type: text/plain; charset="ISO-8859-1" X-Mailer: Evolution 3.12.11-0ubuntu3 Mime-Version: 1.0 Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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_(priv->dev, ... instead of dev_(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_ could be if (priv->dma_cap.timestamp) netif_dbg(priv, hw, priv->dev, ...);