Skip to contentSkip to conversation

jazzsonic: printk() style fixes

PATCH In review Tom D'Alba 3 participants 3 messages Oct 24, 2013

Subsystems (2)
lore
Share & tools
lore

Tom D'Alba

author
#0 lore raw

PATCH 1/1 jazzsonic: printk() style fixes

From: Tom D'Alba <[email protected]>

Fixed printk() format by adding correct KERN_ statuses.

---
 drivers/net/ethernet/natsemi/jazzsonic.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)
drivers/net/ethernet/natsemi/jazzsonic.c +3 -3
index 79257f7..3a04d32 100644
@@ -135,7 +135,7 @@ static int sonic_probe1(struct net_device *dev)
 	 */
 	silicon_revision = SONIC_READ(SONIC_SR);
 	if (sonic_debug > 1)
-		printk("SONIC Silicon Revision = 0x%04x\n",silicon_revision);
+	  printk(KERN_INFO "SONIC Silicon Revision = 0x%04x\n",silicon_revision);
 
 	i = 0;
 	while (known_revisions[i] != 0xffff &&
@@ -143,13 +143,13 @@ static int sonic_probe1(struct net_device *dev)
 		i++;
 
 	if (known_revisions[i] == 0xffff) {
-		printk("SONIC ethernet controller not found (0x%4x)\n",
+		printk(KERN_ERR "SONIC ethernet controller not found (0x%4x)\n",
 		       silicon_revision);
 		goto out;
 	}
 
 	if (sonic_debug  &&  version_printed++ == 0)
-		printk(version);
+	      printk(KERN_INFO version);
 
 	printk(KERN_INFO "%s: Sonic ethernet found at 0x%08lx, ",
 	       dev_name(lp->device), dev->base_addr);
Signature · 1 line
1.8.1.2
#1 lore raw

Hello.

Quoted 17 lines · Tom D'Alba

From: Tom D'Alba <[email protected]>

Fixed printk() format by adding correct KERN_ statuses.

---
  drivers/net/ethernet/natsemi/jazzsonic.c | 6 +++---
  1 file changed, 3 insertions(+), 3 deletions(-)
drivers/net/ethernet/natsemi/jazzsonic.c +0 -0
index 79257f7..3a04d32 100644

drivers/net/ethernet/natsemi/jazzsonic.c static int sonic_probe1(struct net_device *dev) · line 138

Quoted 5 lines
drivers/net/ethernet/natsemi/jazzsonic.c +1 -1
@@ -135,7 +135,7 @@ static int sonic_probe1(struct net_device *dev)
  	 */
  	silicon_revision = SONIC_READ(SONIC_SR);
  	if (sonic_debug > 1)
-		printk("SONIC Silicon Revision = 0x%04x\n",silicon_revision);
+	  printk(KERN_INFO "SONIC Silicon Revision = 0x%04x\n",silicon_revision);

Please don't change the indentation.

drivers/net/ethernet/natsemi/jazzsonic.c static int sonic_probe1(struct net_device *dev) · line 152

Quoted 13 lines
drivers/net/ethernet/natsemi/jazzsonic.c +2 -2
@@ -143,13 +143,13 @@ static int sonic_probe1(struct net_device *dev)
  		i++;
 
  	if (known_revisions[i] == 0xffff) {
-		printk("SONIC ethernet controller not found (0x%4x)\n",
+		printk(KERN_ERR "SONIC ethernet controller not found (0x%4x)\n",
  		       silicon_revision);
  		goto out;
  	}
 
  	if (sonic_debug  &&  version_printed++ == 0)
-		printk(version);
+	      printk(KERN_INFO version);

Same here.

WBR, Sergei

#2 lore raw
In reply to Tom D'Alba

Hi Tom,

Quoted 17 lines · Tom D'Alba

From: Tom D'Alba <[email protected]>

Fixed printk() format by adding correct KERN_ statuses.

---
 drivers/net/ethernet/natsemi/jazzsonic.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)
drivers/net/ethernet/natsemi/jazzsonic.c +0 -0
index 79257f7..3a04d32 100644

drivers/net/ethernet/natsemi/jazzsonic.c static int sonic_probe1(struct net_device *dev) · line 138

Quoted 5 lines
drivers/net/ethernet/natsemi/jazzsonic.c +1 -1
@@ -135,7 +135,7 @@ static int sonic_probe1(struct net_device *dev)
         */
        silicon_revision = SONIC_READ(SONIC_SR);
        if (sonic_debug > 1)
-               printk("SONIC Silicon Revision = 0x%04x\n",silicon_revision);
+         printk(KERN_INFO "SONIC Silicon Revision = 0x%04x\n",silicon_revision);

You could use netdev_info here instead.

drivers/net/ethernet/natsemi/jazzsonic.c static int sonic_probe1(struct net_device *dev) · line 146

Quoted 9 lines
drivers/net/ethernet/natsemi/jazzsonic.c +1 -1
        i = 0;
        while (known_revisions[i] != 0xffff &&
@@ -143,13 +143,13 @@ static int sonic_probe1(struct net_device *dev)
                i++;
 
        if (known_revisions[i] == 0xffff) {
-               printk("SONIC ethernet controller not found (0x%4x)\n",
+               printk(KERN_ERR "SONIC ethernet controller not found (0x%4x)\n",

You could use netdev_err here instead.

drivers/net/ethernet/natsemi/jazzsonic.c static int sonic_probe1(struct net_device *dev) · line 152

Quoted 7 lines
drivers/net/ethernet/natsemi/jazzsonic.c +1 -1
                       silicon_revision);
                goto out;
        }
 
        if (sonic_debug  &&  version_printed++ == 0)
-               printk(version);
+             printk(KERN_INFO version);

You could use netdev_info here instead.