Staging: hp: Use netdev_warn().
PATCH v5 1/1 Staging: hp: Use netdev_warn().
This replaces printk(KERN_WARNING ..) with netdev_warn(), as the use of printk() isn't preferred when
a struct net_device is available.
---
Changes in v5:
- Reformat the first netdev_warn() by moving ioaddr to a seperate line to prevent line over 80.
Changes in v4:
- Make log message more clear.
Changes in v3:
- Update subject line and log message to be more descriptive.
Changes in v2:
- Remove " : " from the printing message, netdev_warn() doesn't need it.
drivers/staging/hp/hp100.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-)
drivers/staging/hp/hp100.c +5 -5
@@ -469,8 +469,8 @@ static int hp100_probe1(struct net_device *dev, int ioaddr, u_char bus, eid =hp100_read_id (ioaddr);if (eid ==NULL ) {/* bad checksum? */ -printk (KERN_WARNING "%s: bad ID checksum at base port 0x%x\n" , - __func__, ioaddr); +netdev_warn (dev,"bad ID checksum at base port 0x%x\n" , + ioaddr); goto out2; }
@@ -478,9 +478,9 @@ static int hp100_probe1(struct net_device *dev, int ioaddr, u_char bus,for (i = uc =0 ; i <7 ; i++) uc +=hp100_inb (LAN_ADDR + i);if (uc !=0xff ) { -printk (KERN_WARNING -"%s: bad lan address checksum at port 0x%x)\n" , - __func__, ioaddr); +netdev_warn (dev, +"bad lan address checksum at port 0x%x)\n" , + ioaddr); err = -EIO ; goto out2; }
---
2.20.1
Quoted 3 lines · Sam Muhammed
This replaces
printk(KERN_WARNING ..)withnetdev_warn(), as the use ofprintk()isn't preferred when
a structnet_deviceis available.
Quoted 55 lines
Signed-off-by Sam Muhammed <[email protected]>---
Changes in v5:
- Reformat the firstnetdev_warn()by moving ioaddr to a seperate line to prevent line over 80.Changes in v4:
- Make log message more clear.Changes in v3:
- Update subject line and log message to be more descriptive.Changes in v2:
- Remove " : " from the printing message,netdev_warn()doesn't need it.drivers/staging/hp/hp100.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-)drivers/staging/hp/hp100.c +5
-6@@ -469,8 +469,8 @@ static int hp100_probe1(struct net_device *dev, int ioaddr, u_char bus, eid =hp100_read_id (ioaddr);if (eid ==NULL ) {/* bad checksum? */ -printk (KERN_WARNING "%s: bad ID checksum at base port 0x%x\n" , - __func__, ioaddr); +netdev_warn (dev,"bad ID checksum at base port 0x%x\n" , + ioaddr); goto out2; }@@ -478,9 +478,9 @@ static int hp100_probe1(struct net_device *dev, int ioaddr, u_char bus,for (i = uc =0 ; i <7 ; i++) uc +=hp100_inb (LAN_ADDR + i);if (uc !=0xff ) { -printk (KERN_WARNING -"%s: bad lan address checksum at port 0x%x)\n" , - __func__, ioaddr); +netdev_warn (dev, +"bad lan address checksum at port 0x%x)\n" , + ioaddr); err = -EIO ; goto out2; } ---2.20.1
--
You received this message because you are subscribed to the Google Groups "outreachy-kernel" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/outreachy-kernel/20200322115051.2767-1-jane.pnx9%40gmail.com.