From patchwork Tue Jun 19 05:38:33 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Joel Stanley X-Patchwork-Id: 139082 Delivered-To: patch@linaro.org Received: by 2002:a2e:970d:0:0:0:0:0 with SMTP id r13-v6csp4781739lji; Mon, 18 Jun 2018 22:39:08 -0700 (PDT) X-Google-Smtp-Source: ADUXVKLlserP+X+Lp5VnlERSqvFLIkRH5nNW4IVNDr5RLCT0sStURJRJ/KPel0JFbQkID21BkiUM X-Received: by 2002:a62:1013:: with SMTP id y19-v6mr16369011pfi.166.1529386748420; Mon, 18 Jun 2018 22:39:08 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1529386748; cv=none; d=google.com; s=arc-20160816; b=gVK8MoCjixlGQoxli0ys0gzChPLdsNfOCx9W0ARxsQfokEO2Mo49wBrMxia3NTRf8b kKBhR0WoYrAGFlDd10/4g7/ZJ79rGr5WBTEQNPx28HrxFLkfJYRwYf8QL/H9ysdQVbXZ BUv5uxHDXFUTqAuZxs2OvQTqRxS2tb5cYoDxS6uhNqlHV2JpF+OFQhps7eNf02BBIZ2u zpd3ceovDCIrJk9YOeoRr0G+tS8A5pNXfsXi+P+R9CrSa6hjUd+Dt6Qhow9ftSUJE25A WdJxsISTD8wOnrs/nQIiCYb4A5WaOa9BKo01IVHH21ST6YcO2r7/0zvr92ePbo7V1j0v 2DEQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:references:in-reply-to:message-id:date :subject:cc:to:from:dkim-signature:arc-authentication-results; bh=FSRWV5pEe4omU1efDh/B4B7SCOem+b2sDOWX/vm5dLg=; b=hdKvei2QbNCOn4BSILJe3C3u56bTJAJlQtc+XjU1ZxbkkwgF1lyLgi0JpxMvPh98or 5pqwnus0cYN4w8aY14xPR0R1HRV01jEilHBAzSIW7ABnf0X7Sa6x/bEuSag94luSV9vm t8l3R7IWOg+6ilbTIvCKbqtcQEis9zCLn/mPwevgvvu6s1lnJxjKHWctiK4yZKCnuRKV PuiAHZWxDohPtNDgnDRSL2Qv5vUKTwmSKPyYObMb3LUqdhKRfCoGZmtn3VpTEmDbpank OpOMKWewNg5KUFvOUOqVAI2uk5p5QlqDfJmkW6d+uEQ1JUWm+XdwK88WwTP/PJrbvo/h yfdA== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@gmail.com header.s=20161025 header.b=ZXDJhvRl; spf=pass (google.com: best guess record for domain of netdev-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=netdev-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id r28-v6si17130533pfe.168.2018.06.18.22.39.08; Mon, 18 Jun 2018 22:39:08 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of netdev-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=fail header.i=@gmail.com header.s=20161025 header.b=ZXDJhvRl; spf=pass (google.com: best guess record for domain of netdev-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=netdev-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755940AbeFSFjG (ORCPT + 9 others); Tue, 19 Jun 2018 01:39:06 -0400 Received: from mail-pg0-f68.google.com ([74.125.83.68]:34351 "EHLO mail-pg0-f68.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755840AbeFSFjF (ORCPT ); Tue, 19 Jun 2018 01:39:05 -0400 Received: by mail-pg0-f68.google.com with SMTP id q4-v6so8628363pgr.1 for ; Mon, 18 Jun 2018 22:39:05 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:from:to:cc:subject:date:message-id:in-reply-to:references; bh=FSRWV5pEe4omU1efDh/B4B7SCOem+b2sDOWX/vm5dLg=; b=ZXDJhvRlCus0kLFHwVxhI/Ig+2v3GzQuF3fSqMiY9D5wvrTjU/N/R5gV88sbDm/h5i wij6G+la199VJ1W0f8zlsGdC8mm5UA3QnBVcwJ8N0sjD6OxiNSR3fli2VfD4Uj4Yv1u1 M/TkZlkzfea28s0BEOO2nWAQ5qSuizZ/2Hez6X6LEOpHnGbqnOyiBbC4DYuD0gCcVT/6 rrCQcLjDuThzb03Vzhb0qPSd1A/uS+y3LCIHlOeLvgCejONnYwKCY+6+1yAMKVHYWuYo C6g7booNdKz9VyEsEY4iUCn9ILh0uuWjAQTmn8wTAD8ZBKRLjVeawCBh4i+rGtesBPRr GBtQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:from:to:cc:subject:date:message-id :in-reply-to:references; bh=FSRWV5pEe4omU1efDh/B4B7SCOem+b2sDOWX/vm5dLg=; b=VO7yUoLopazoERUWP/vd2Yn5Z2g5aezuCa6QtoZn3XV2kJXZ7Aq4p0nW43wB+/VB1h k21vOOINhKOsuniIApc5U05gleNqv8q6EFQ6WeZt/wAUrjhca6k2cFZIhAYx8ccpJjKH i3v4OvtYzLcmlaqpjuvtXEQt3Li27HX78ipfWxR1E4DyylWaXR44J3S04N3kuXU3O+1m KyMDvDEU1upZDmf+Dx4vIsmeAOwl4X9RzaNs3bTSyjsGPK3q6GNO7DXLaSU4nMzC3p+U NJ1uS1WfKLkgj4BDQk/g5duuRz7za6Is1UCeuXAspn6wwSinrBOFpedk22PjHw17zfdp P/5Q== X-Gm-Message-State: APt69E02pPH97sXW9y4DYNvn8MqyY2E55psKUKU6LOLl8F02k2n4sBd1 4A6ngmmytZvGkvz9GVxP3l0= X-Received: by 2002:a63:7f4f:: with SMTP id p15-v6mr13622513pgn.312.1529386744720; Mon, 18 Jun 2018 22:39:04 -0700 (PDT) Received: from aurora.jms.id.au ([58.175.208.48]) by smtp.gmail.com with ESMTPSA id x124-v6sm22025094pgb.53.2018.06.18.22.39.01 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Mon, 18 Jun 2018 22:39:04 -0700 (PDT) Received: by aurora.jms.id.au (sSMTP sendmail emulation); Tue, 19 Jun 2018 15:08:58 +0930 From: Joel Stanley To: Samuel Mendoza-Jonas , "David S . Miller" Cc: netdev@vger.kernel.org, Joe Perches Subject: [PATCH v2 3/4] net/ncsi: Use netdev_dbg for debug messages Date: Tue, 19 Jun 2018 15:08:33 +0930 Message-Id: <20180619053834.12257-4-joel@jms.id.au> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20180619053834.12257-1-joel@jms.id.au> References: <20180619053834.12257-1-joel@jms.id.au> Sender: netdev-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org This moves all of the netdev_printk(KERN_DEBUG, ...) messages over to netdev_dbg. As Joe explains: > netdev_dbg is not included in object code unless > DEBUG is defined or CONFIG_DYNAMIC_DEBUG is set. > And then, it is not emitted into the log unless > DEBUG is set or this specific netdev_dbg is enabled > via the dynamic debug control file. Which is what we're after in this case. Acked-by: Samuel Mendoza-Jonas Signed-off-by: Joel Stanley --- v2: update commit message net/ncsi/ncsi-aen.c | 6 +++--- net/ncsi/ncsi-manage.c | 33 +++++++++++++++------------------ 2 files changed, 18 insertions(+), 21 deletions(-) -- 2.17.1 diff --git a/net/ncsi/ncsi-aen.c b/net/ncsi/ncsi-aen.c index f899ed61bb57..25e483e8278b 100644 --- a/net/ncsi/ncsi-aen.c +++ b/net/ncsi/ncsi-aen.c @@ -148,9 +148,9 @@ static int ncsi_aen_handler_hncdsc(struct ncsi_dev_priv *ndp, hncdsc = (struct ncsi_aen_hncdsc_pkt *)h; ncm->data[3] = ntohl(hncdsc->status); spin_unlock_irqrestore(&nc->lock, flags); - netdev_printk(KERN_DEBUG, ndp->ndev.dev, - "NCSI: host driver %srunning on channel %u\n", - ncm->data[3] & 0x1 ? "" : "not ", nc->id); + netdev_dbg(ndp->ndev.dev, + "NCSI: host driver %srunning on channel %u\n", + ncm->data[3] & 0x1 ? "" : "not ", nc->id); return 0; } diff --git a/net/ncsi/ncsi-manage.c b/net/ncsi/ncsi-manage.c index 716493a61ba6..091284760d21 100644 --- a/net/ncsi/ncsi-manage.c +++ b/net/ncsi/ncsi-manage.c @@ -788,8 +788,8 @@ static void ncsi_configure_channel(struct ncsi_dev_priv *ndp) } break; case ncsi_dev_state_config_done: - netdev_printk(KERN_DEBUG, ndp->ndev.dev, - "NCSI: channel %u config done\n", nc->id); + netdev_dbg(ndp->ndev.dev, "NCSI: channel %u config done\n", + nc->id); spin_lock_irqsave(&nc->lock, flags); if (nc->reconfigure_needed) { /* This channel's configuration has been updated @@ -804,8 +804,7 @@ static void ncsi_configure_channel(struct ncsi_dev_priv *ndp) list_add_tail_rcu(&nc->link, &ndp->channel_queue); spin_unlock_irqrestore(&ndp->lock, flags); - netdev_printk(KERN_DEBUG, dev, - "Dirty NCSI channel state reset\n"); + netdev_dbg(dev, "Dirty NCSI channel state reset\n"); ncsi_process_next_channel(ndp); break; } @@ -908,9 +907,9 @@ static int ncsi_choose_active_channel(struct ncsi_dev_priv *ndp) } ncm = &found->modes[NCSI_MODE_LINK]; - netdev_printk(KERN_DEBUG, ndp->ndev.dev, - "NCSI: Channel %u added to queue (link %s)\n", - found->id, ncm->data[2] & 0x1 ? "up" : "down"); + netdev_dbg(ndp->ndev.dev, + "NCSI: Channel %u added to queue (link %s)\n", + found->id, ncm->data[2] & 0x1 ? "up" : "down"); out: spin_lock_irqsave(&ndp->lock, flags); @@ -1316,9 +1315,9 @@ static int ncsi_kick_channels(struct ncsi_dev_priv *ndp) if ((ndp->ndev.state & 0xff00) == ncsi_dev_state_config || !list_empty(&nc->link)) { - netdev_printk(KERN_DEBUG, nd->dev, - "NCSI: channel %p marked dirty\n", - nc); + netdev_dbg(nd->dev, + "NCSI: channel %p marked dirty\n", + nc); nc->reconfigure_needed = true; } spin_unlock_irqrestore(&nc->lock, flags); @@ -1336,8 +1335,7 @@ static int ncsi_kick_channels(struct ncsi_dev_priv *ndp) list_add_tail_rcu(&nc->link, &ndp->channel_queue); spin_unlock_irqrestore(&ndp->lock, flags); - netdev_printk(KERN_DEBUG, nd->dev, - "NCSI: kicked channel %p\n", nc); + netdev_dbg(nd->dev, "NCSI: kicked channel %p\n", nc); n++; } } @@ -1368,8 +1366,8 @@ int ncsi_vlan_rx_add_vid(struct net_device *dev, __be16 proto, u16 vid) list_for_each_entry_rcu(vlan, &ndp->vlan_vids, list) { n_vids++; if (vlan->vid == vid) { - netdev_printk(KERN_DEBUG, dev, - "NCSI: vid %u already registered\n", vid); + netdev_dbg(dev, "NCSI: vid %u already registered\n", + vid); return 0; } } @@ -1388,7 +1386,7 @@ int ncsi_vlan_rx_add_vid(struct net_device *dev, __be16 proto, u16 vid) vlan->vid = vid; list_add_rcu(&vlan->list, &ndp->vlan_vids); - netdev_printk(KERN_DEBUG, dev, "NCSI: Added new vid %u\n", vid); + netdev_dbg(dev, "NCSI: Added new vid %u\n", vid); found = ncsi_kick_channels(ndp) != 0; @@ -1417,8 +1415,7 @@ int ncsi_vlan_rx_kill_vid(struct net_device *dev, __be16 proto, u16 vid) /* Remove the VLAN id from our internal list */ list_for_each_entry_safe(vlan, tmp, &ndp->vlan_vids, list) if (vlan->vid == vid) { - netdev_printk(KERN_DEBUG, dev, - "NCSI: vid %u found, removing\n", vid); + netdev_dbg(dev, "NCSI: vid %u found, removing\n", vid); list_del_rcu(&vlan->list); found = true; kfree(vlan); @@ -1545,7 +1542,7 @@ void ncsi_stop_dev(struct ncsi_dev *nd) } } - netdev_printk(KERN_DEBUG, ndp->ndev.dev, "NCSI: Stopping device\n"); + netdev_dbg(ndp->ndev.dev, "NCSI: Stopping device\n"); ncsi_report_link(ndp, true); } EXPORT_SYMBOL_GPL(ncsi_stop_dev);