tulip/eeprom.c: Use dev_<level> and pr_<level>

Convert printks to dev_<level> where a dev is available
Convert printks to pr_<level> where not
Coalesce format strings
Change print formats with %d.dx to %0dx

Signed-off-by: Joe Perches <joe@perches.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
Joe Perches 2010-01-28 20:59:21 +00:00 committed by David S. Miller
parent dde7c8ef16
commit e9cd1cbcda

View file

@ -161,15 +161,15 @@ void __devinit tulip_parse_eeprom(struct net_device *dev)
if (ee_data[0] == 0xff) { if (ee_data[0] == 0xff) {
if (last_mediatable) { if (last_mediatable) {
controller_index++; controller_index++;
printk(KERN_INFO "%s: Controller %d of multiport board.\n", dev_info(&dev->dev,
dev->name, controller_index); "Controller %d of multiport board\n",
controller_index);
tp->mtable = last_mediatable; tp->mtable = last_mediatable;
ee_data = last_ee_data; ee_data = last_ee_data;
goto subsequent_board; goto subsequent_board;
} else } else
printk(KERN_INFO "%s: Missing EEPROM, this interface may " dev_info(&dev->dev,
"not work correctly!\n", "Missing EEPROM, this interface may not work correctly!\n");
dev->name);
return; return;
} }
/* Do a fix-up based on the vendor half of the station address prefix. */ /* Do a fix-up based on the vendor half of the station address prefix. */
@ -181,16 +181,15 @@ void __devinit tulip_parse_eeprom(struct net_device *dev)
i++; /* An Accton EN1207, not an outlaw Maxtech. */ i++; /* An Accton EN1207, not an outlaw Maxtech. */
memcpy(ee_data + 26, eeprom_fixups[i].newtable, memcpy(ee_data + 26, eeprom_fixups[i].newtable,
sizeof(eeprom_fixups[i].newtable)); sizeof(eeprom_fixups[i].newtable));
printk(KERN_INFO "%s: Old format EEPROM on '%s' board. Using" dev_info(&dev->dev,
" substitute media control info.\n", "Old format EEPROM on '%s' board. Using substitute media control info\n",
dev->name, eeprom_fixups[i].name); eeprom_fixups[i].name);
break; break;
} }
} }
if (eeprom_fixups[i].name == NULL) { /* No fixup found. */ if (eeprom_fixups[i].name == NULL) { /* No fixup found. */
printk(KERN_INFO "%s: Old style EEPROM with no media selection " dev_info(&dev->dev,
"information.\n", "Old style EEPROM with no media selection information\n");
dev->name);
return; return;
} }
} }
@ -218,7 +217,8 @@ void __devinit tulip_parse_eeprom(struct net_device *dev)
/* there is no phy information, don't even try to build mtable */ /* there is no phy information, don't even try to build mtable */
if (count == 0) { if (count == 0) {
if (tulip_debug > 0) if (tulip_debug > 0)
printk(KERN_WARNING "%s: no phy info, aborting mtable build\n", dev->name); dev_warn(&dev->dev,
"no phy info, aborting mtable build\n");
return; return;
} }
@ -234,8 +234,8 @@ void __devinit tulip_parse_eeprom(struct net_device *dev)
mtable->has_nonmii = mtable->has_mii = mtable->has_reset = 0; mtable->has_nonmii = mtable->has_mii = mtable->has_reset = 0;
mtable->csr15dir = mtable->csr15val = 0; mtable->csr15dir = mtable->csr15val = 0;
printk(KERN_INFO "%s: EEPROM default media type %s.\n", dev->name, dev_info(&dev->dev, "EEPROM default media type %s\n",
media & 0x0800 ? "Autosense" : medianame[media & MEDIA_MASK]); media & 0x0800 ? "Autosense" : medianame[media & MEDIA_MASK]);
for (i = 0; i < count; i++) { for (i = 0; i < count; i++) {
struct medialeaf *leaf = &mtable->mleaf[i]; struct medialeaf *leaf = &mtable->mleaf[i];
@ -298,16 +298,17 @@ void __devinit tulip_parse_eeprom(struct net_device *dev)
} }
if (tulip_debug > 1 && leaf->media == 11) { if (tulip_debug > 1 && leaf->media == 11) {
unsigned char *bp = leaf->leafdata; unsigned char *bp = leaf->leafdata;
printk(KERN_INFO "%s: MII interface PHY %d, setup/reset " dev_info(&dev->dev,
"sequences %d/%d long, capabilities %2.2x %2.2x.\n", "MII interface PHY %d, setup/reset sequences %d/%d long, capabilities %02x %02x\n",
dev->name, bp[0], bp[1], bp[2 + bp[1]*2], bp[0], bp[1], bp[2 + bp[1]*2],
bp[5 + bp[2 + bp[1]*2]*2], bp[4 + bp[2 + bp[1]*2]*2]); bp[5 + bp[2 + bp[1]*2]*2],
bp[4 + bp[2 + bp[1]*2]*2]);
} }
printk(KERN_INFO "%s: Index #%d - Media %s (#%d) described " dev_info(&dev->dev,
"by a %s (%d) block.\n", "Index #%d - Media %s (#%d) described by a %s (%d) block\n",
dev->name, i, medianame[leaf->media & 15], leaf->media, i, medianame[leaf->media & 15], leaf->media,
leaf->type < ARRAY_SIZE(block_name) ? block_name[leaf->type] : "<unknown>", leaf->type < ARRAY_SIZE(block_name) ? block_name[leaf->type] : "<unknown>",
leaf->type); leaf->type);
} }
if (new_advertise) if (new_advertise)
tp->sym_advertise = new_advertise; tp->sym_advertise = new_advertise;