linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Finn Thain <fthain@telegraphics.com.au>
To: "David S. Miller" <davem@davemloft.net>
Cc: netdev@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: [PATCH net v3 07/12] net/mac89x0: Fix and modernize log messages
Date: Sat, 11 Nov 2017 01:20:59 -0500 (EST)	[thread overview]
Message-ID: <e22828b0546b069d0ab34e60ed9dd80233ef86f1.1510377340.git.fthain@telegraphics.com.au> (raw)
In-Reply-To: <cover.1510377340.git.fthain@telegraphics.com.au>

Fix log message fragments which no longer produce the desired output
(since the behaviour of printk() was changed).
Add missing printk severity levels.
Drop deprecated "out of memory" message as per checkpatch advice.

Signed-off-by: Finn Thain <fthain@telegraphics.com.au>
---
 drivers/net/ethernet/cirrus/mac89x0.c | 19 +++++++++----------
 1 file changed, 9 insertions(+), 10 deletions(-)

diff --git a/drivers/net/ethernet/cirrus/mac89x0.c b/drivers/net/ethernet/cirrus/mac89x0.c
index c1a3d1aed037..4575370d57db 100644
--- a/drivers/net/ethernet/cirrus/mac89x0.c
+++ b/drivers/net/ethernet/cirrus/mac89x0.c
@@ -56,6 +56,8 @@
   local_irq_{dis,en}able()
 */
 
+#define pr_fmt(fmt) KBUILD_MODNAME ": " fmt
+
 static const char version[] =
 "cs89x0.c:v1.02 11/26/96 Russell Nelson <nelson@crynwr.com>\n";
 
@@ -244,16 +246,14 @@ static int mac89x0_device_probe(struct platform_device *pdev)
 	if (net_debug && version_printed++ == 0)
 		printk(version);
 
-	printk(KERN_INFO "%s: cs89%c0%s rev %c found at %#8lx",
-	       dev->name,
-	       lp->chip_type==CS8900?'0':'2',
-	       lp->chip_type==CS8920M?"M":"",
-	       lp->chip_revision,
-	       dev->base_addr);
+	pr_info("CS89%c0%s rev %c found at %#8lx\n",
+	        lp->chip_type == CS8900 ? '0' : '2',
+	        lp->chip_type == CS8920M ? "M" : "",
+	        lp->chip_revision, dev->base_addr);
 
 	/* Try to read the MAC address */
 	if ((readreg(dev, PP_SelfST) & (EEPROM_PRESENT | EEPROM_OK)) == 0) {
-		printk("\nmac89x0: No EEPROM, giving up now.\n");
+		pr_info("No EEPROM, giving up now\n");
 		goto out1;
         } else {
                 for (i = 0; i < ETH_ALEN; i += 2) {
@@ -268,7 +268,7 @@ static int mac89x0_device_probe(struct platform_device *pdev)
 
 	/* print the IRQ and ethernet address. */
 
-	printk(" IRQ %d ADDR %pM\n", dev->irq, dev->dev_addr);
+	pr_info("MAC %pM, IRQ %d\n", dev->dev_addr, dev->irq);
 
 	dev->netdev_ops		= &mac89x0_netdev_ops;
 
@@ -471,7 +471,6 @@ net_rx(struct net_device *dev)
 	/* Malloc up new buffer. */
 	skb = alloc_skb(length, GFP_ATOMIC);
 	if (skb == NULL) {
-		printk("%s: Memory squeeze, dropping packet.\n", dev->name);
 		dev->stats.rx_dropped++;
 		return;
 	}
@@ -559,7 +558,7 @@ static int set_mac_address(struct net_device *dev, void *addr)
 		return -EADDRNOTAVAIL;
 
 	memcpy(dev->dev_addr, saddr->sa_data, ETH_ALEN);
-	printk("%s: Setting MAC address to %pM\n", dev->name, dev->dev_addr);
+	netdev_info(dev, "Setting MAC address to %pM\n", dev->dev_addr);
 
 	/* set the Ethernet address */
 	for (i=0; i < ETH_ALEN/2; i++)
-- 
2.13.6

  parent reply	other threads:[~2017-11-11  6:22 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-11-11  6:20 [PATCH net v3 00/12] Fixes, cleanup and modernization for some legacy ethernet NIC drivers Finn Thain
2017-11-11  6:20 ` [PATCH net v3 01/12] net/macsonic: Convert to nubus_driver Finn Thain
2017-11-11  6:20 ` [PATCH net v3 04/12] net/sonic: Clean up and modernize log messages Finn Thain
2017-11-11  6:20 ` [PATCH net v3 03/12] net/mac8390: Convert to nubus_driver Finn Thain
2017-11-11  6:20 ` [PATCH net v3 02/12] net/mac89x0: Convert to platform_driver Finn Thain
2017-11-11  6:20 ` [PATCH net v3 08/12] net/mac89x0: Replace custom debug logging with netif_* calls Finn Thain
2017-11-11  6:20 ` [PATCH net v3 05/12] net/sonic: " Finn Thain
2017-11-11  6:20 ` [PATCH net v3 10/12] net/mac8390: Fix log messages Finn Thain
2017-11-11  6:20 ` [PATCH net v3 09/12] net/8390: Fix redundant code Finn Thain
2017-11-11  6:20 ` [PATCH net v3 12/12] net/smc9194: Remove bogus CONFIG_MAC reference Finn Thain
2017-11-11  6:20 ` Finn Thain [this message]
2017-11-11  6:20 ` [PATCH net v3 11/12] net/macmace: Fix and clean up log messages Finn Thain
2017-11-11  6:20 ` [PATCH net v3 06/12] net/mac89x0: Remove dead or unreachable code Finn Thain
2017-11-11 12:39 ` [PATCH net v3 00/12] Fixes, cleanup and modernization for some legacy ethernet NIC drivers David Miller

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=e22828b0546b069d0ab34e60ed9dd80233ef86f1.1510377340.git.fthain@telegraphics.com.au \
    --to=fthain@telegraphics.com.au \
    --cc=davem@davemloft.net \
    --cc=linux-kernel@vger.kernel.org \
    --cc=netdev@vger.kernel.org \
    /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).