aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorFinn Thain <fthain@telegraphics.com.au>2018-03-01 18:29:28 -0500
committerDavid S. Miller <davem@davemloft.net>2018-03-01 21:21:36 -0500
commit86c2666eac0e68f0cd21659c7888c95b029761d1 (patch)
tree4f3af40baa6aa2a2036bbcdd7f9df7eaf08e6456
parent43bf2e6d69dd6c2cea7a28763893a3dff34b7873 (diff)
net/mac89x0: Fix and modernize log messages
Fix log message fragments that 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> Signed-off-by: David S. Miller <davem@davemloft.net>
-rw-r--r--drivers/net/ethernet/cirrus/mac89x0.c19
1 files changed, 9 insertions, 10 deletions
diff --git a/drivers/net/ethernet/cirrus/mac89x0.c b/drivers/net/ethernet/cirrus/mac89x0.c
index 911139abbe20..9a266496a538 100644
--- a/drivers/net/ethernet/cirrus/mac89x0.c
+++ b/drivers/net/ethernet/cirrus/mac89x0.c
@@ -56,6 +56,8 @@
56 local_irq_{dis,en}able() 56 local_irq_{dis,en}able()
57*/ 57*/
58 58
59#define pr_fmt(fmt) KBUILD_MODNAME ": " fmt
60
59static const char version[] = 61static const char version[] =
60"cs89x0.c:v1.02 11/26/96 Russell Nelson <nelson@crynwr.com>\n"; 62"cs89x0.c:v1.02 11/26/96 Russell Nelson <nelson@crynwr.com>\n";
61 63
@@ -245,16 +247,14 @@ static int mac89x0_device_probe(struct platform_device *pdev)
245 if (net_debug && version_printed++ == 0) 247 if (net_debug && version_printed++ == 0)
246 printk(version); 248 printk(version);
247 249
248 printk(KERN_INFO "%s: cs89%c0%s rev %c found at %#8lx", 250 pr_info("cs89%c0%s rev %c found at %#8lx\n",
249 dev->name, 251 lp->chip_type == CS8900 ? '0' : '2',
250 lp->chip_type==CS8900?'0':'2', 252 lp->chip_type == CS8920M ? "M" : "",
251 lp->chip_type==CS8920M?"M":"", 253 lp->chip_revision, dev->base_addr);
252 lp->chip_revision,
253 dev->base_addr);
254 254
255 /* Try to read the MAC address */ 255 /* Try to read the MAC address */
256 if ((readreg(dev, PP_SelfST) & (EEPROM_PRESENT | EEPROM_OK)) == 0) { 256 if ((readreg(dev, PP_SelfST) & (EEPROM_PRESENT | EEPROM_OK)) == 0) {
257 printk("\nmac89x0: No EEPROM, giving up now.\n"); 257 pr_info("No EEPROM, giving up now.\n");
258 goto out1; 258 goto out1;
259 } else { 259 } else {
260 for (i = 0; i < ETH_ALEN; i += 2) { 260 for (i = 0; i < ETH_ALEN; i += 2) {
@@ -269,7 +269,7 @@ static int mac89x0_device_probe(struct platform_device *pdev)
269 269
270 /* print the IRQ and ethernet address. */ 270 /* print the IRQ and ethernet address. */
271 271
272 printk(" IRQ %d ADDR %pM\n", dev->irq, dev->dev_addr); 272 pr_info("MAC %pM, IRQ %d\n", dev->dev_addr, dev->irq);
273 273
274 dev->netdev_ops = &mac89x0_netdev_ops; 274 dev->netdev_ops = &mac89x0_netdev_ops;
275 275
@@ -472,7 +472,6 @@ net_rx(struct net_device *dev)
472 /* Malloc up new buffer. */ 472 /* Malloc up new buffer. */
473 skb = alloc_skb(length, GFP_ATOMIC); 473 skb = alloc_skb(length, GFP_ATOMIC);
474 if (skb == NULL) { 474 if (skb == NULL) {
475 printk("%s: Memory squeeze, dropping packet.\n", dev->name);
476 dev->stats.rx_dropped++; 475 dev->stats.rx_dropped++;
477 return; 476 return;
478 } 477 }
@@ -560,7 +559,7 @@ static int set_mac_address(struct net_device *dev, void *addr)
560 return -EADDRNOTAVAIL; 559 return -EADDRNOTAVAIL;
561 560
562 memcpy(dev->dev_addr, saddr->sa_data, ETH_ALEN); 561 memcpy(dev->dev_addr, saddr->sa_data, ETH_ALEN);
563 printk("%s: Setting MAC address to %pM\n", dev->name, dev->dev_addr); 562 netdev_info(dev, "Setting MAC address to %pM\n", dev->dev_addr);
564 563
565 /* set the Ethernet address */ 564 /* set the Ethernet address */
566 for (i=0; i < ETH_ALEN/2; i++) 565 for (i=0; i < ETH_ALEN/2; i++)