aboutsummaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
authorJoe Perches <joe@perches.com>2010-11-29 02:42:00 -0500
committerDavid S. Miller <davem@davemloft.net>2010-11-29 14:44:55 -0500
commitb2ba08e606dfd106a394c3ac7a56c497b4c8f230 (patch)
tree3a736ee4e4e4042840af7745c115ec973ca45442 /drivers
parentcd66328bdab782ee40d17b573a3067a591cb7b4f (diff)
forcedeth: Convert dev_printk(<level> to dev_<level>(
Use vsprintf extension %pM for a mac address in one instance. Signed-off-by: Joe Perches <joe@perches.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/net/forcedeth.c64
1 files changed, 26 insertions, 38 deletions
diff --git a/drivers/net/forcedeth.c b/drivers/net/forcedeth.c
index 0b1d562ec4a..60edf0185b1 100644
--- a/drivers/net/forcedeth.c
+++ b/drivers/net/forcedeth.c
@@ -5442,8 +5442,7 @@ static int __devinit nv_probe(struct pci_dev *pci_dev, const struct pci_device_i
5442 } 5442 }
5443 } 5443 }
5444 if (i == DEVICE_COUNT_RESOURCE) { 5444 if (i == DEVICE_COUNT_RESOURCE) {
5445 dev_printk(KERN_INFO, &pci_dev->dev, 5445 dev_info(&pci_dev->dev, "Couldn't find register window\n");
5446 "Couldn't find register window\n");
5447 goto out_relreg; 5446 goto out_relreg;
5448 } 5447 }
5449 5448
@@ -5459,13 +5458,13 @@ static int __devinit nv_probe(struct pci_dev *pci_dev, const struct pci_device_i
5459 np->txrxctl_bits = NVREG_TXRXCTL_DESC_3; 5458 np->txrxctl_bits = NVREG_TXRXCTL_DESC_3;
5460 if (dma_64bit) { 5459 if (dma_64bit) {
5461 if (pci_set_dma_mask(pci_dev, DMA_BIT_MASK(39))) 5460 if (pci_set_dma_mask(pci_dev, DMA_BIT_MASK(39)))
5462 dev_printk(KERN_INFO, &pci_dev->dev, 5461 dev_info(&pci_dev->dev,
5463 "64-bit DMA failed, using 32-bit addressing\n"); 5462 "64-bit DMA failed, using 32-bit addressing\n");
5464 else 5463 else
5465 dev->features |= NETIF_F_HIGHDMA; 5464 dev->features |= NETIF_F_HIGHDMA;
5466 if (pci_set_consistent_dma_mask(pci_dev, DMA_BIT_MASK(39))) { 5465 if (pci_set_consistent_dma_mask(pci_dev, DMA_BIT_MASK(39))) {
5467 dev_printk(KERN_INFO, &pci_dev->dev, 5466 dev_info(&pci_dev->dev,
5468 "64-bit DMA (consistent) failed, using 32-bit ring buffers\n"); 5467 "64-bit DMA (consistent) failed, using 32-bit ring buffers\n");
5469 } 5468 }
5470 } 5469 }
5471 } else if (id->driver_data & DEV_HAS_LARGEDESC) { 5470 } else if (id->driver_data & DEV_HAS_LARGEDESC) {
@@ -5595,11 +5594,11 @@ static int __devinit nv_probe(struct pci_dev *pci_dev, const struct pci_device_i
5595 * Bad mac address. At least one bios sets the mac address 5594 * Bad mac address. At least one bios sets the mac address
5596 * to 01:23:45:67:89:ab 5595 * to 01:23:45:67:89:ab
5597 */ 5596 */
5598 dev_printk(KERN_ERR, &pci_dev->dev, 5597 dev_err(&pci_dev->dev,
5599 "Invalid Mac address detected: %pM\n", 5598 "Invalid MAC address detected: %pM\n",
5600 dev->dev_addr); 5599 dev->dev_addr);
5601 dev_printk(KERN_ERR, &pci_dev->dev, 5600 dev_err(&pci_dev->dev,
5602 "Please complain to your hardware vendor. Switching to a random MAC.\n"); 5601 "Please complain to your hardware vendor. Switched to a random MAC address.\n");
5603 random_ether_addr(dev->dev_addr); 5602 random_ether_addr(dev->dev_addr);
5604 } 5603 }
5605 5604
@@ -5752,8 +5751,7 @@ static int __devinit nv_probe(struct pci_dev *pci_dev, const struct pci_device_i
5752 break; 5751 break;
5753 } 5752 }
5754 if (i == 33) { 5753 if (i == 33) {
5755 dev_printk(KERN_INFO, &pci_dev->dev, 5754 dev_info(&pci_dev->dev, "open: Could not find a valid PHY\n");
5756 "open: Could not find a valid PHY.\n");
5757 goto out_error; 5755 goto out_error;
5758 } 5756 }
5759 5757
@@ -5774,37 +5772,27 @@ static int __devinit nv_probe(struct pci_dev *pci_dev, const struct pci_device_i
5774 5772
5775 err = register_netdev(dev); 5773 err = register_netdev(dev);
5776 if (err) { 5774 if (err) {
5777 dev_printk(KERN_INFO, &pci_dev->dev, 5775 dev_info(&pci_dev->dev, "unable to register netdev: %d\n", err);
5778 "unable to register netdev: %d\n", err);
5779 goto out_error; 5776 goto out_error;
5780 } 5777 }
5781 5778
5782 dev_printk(KERN_INFO, &pci_dev->dev, "ifname %s, PHY OUI 0x%x @ %d, " 5779 dev_info(&pci_dev->dev, "ifname %s, PHY OUI 0x%x @ %d, addr %pM\n",
5783 "addr %2.2x:%2.2x:%2.2x:%2.2x:%2.2x:%2.2x\n", 5780 dev->name, np->phy_oui, np->phyaddr, dev->dev_addr);
5784 dev->name, 5781
5785 np->phy_oui, 5782 dev_info(&pci_dev->dev, "%s%s%s%s%s%s%s%s%s%sdesc-v%u\n",
5786 np->phyaddr, 5783 dev->features & NETIF_F_HIGHDMA ? "highdma " : "",
5787 dev->dev_addr[0], 5784 dev->features & (NETIF_F_IP_CSUM | NETIF_F_SG) ?
5788 dev->dev_addr[1],
5789 dev->dev_addr[2],
5790 dev->dev_addr[3],
5791 dev->dev_addr[4],
5792 dev->dev_addr[5]);
5793
5794 dev_printk(KERN_INFO, &pci_dev->dev, "%s%s%s%s%s%s%s%s%s%sdesc-v%u\n",
5795 dev->features & NETIF_F_HIGHDMA ? "highdma " : "",
5796 dev->features & (NETIF_F_IP_CSUM | NETIF_F_SG) ?
5797 "csum " : "", 5785 "csum " : "",
5798 dev->features & (NETIF_F_HW_VLAN_RX | NETIF_F_HW_VLAN_TX) ? 5786 dev->features & (NETIF_F_HW_VLAN_RX | NETIF_F_HW_VLAN_TX) ?
5799 "vlan " : "", 5787 "vlan " : "",
5800 id->driver_data & DEV_HAS_POWER_CNTRL ? "pwrctl " : "", 5788 id->driver_data & DEV_HAS_POWER_CNTRL ? "pwrctl " : "",
5801 id->driver_data & DEV_HAS_MGMT_UNIT ? "mgmt " : "", 5789 id->driver_data & DEV_HAS_MGMT_UNIT ? "mgmt " : "",
5802 id->driver_data & DEV_NEED_TIMERIRQ ? "timirq " : "", 5790 id->driver_data & DEV_NEED_TIMERIRQ ? "timirq " : "",
5803 np->gigabit == PHY_GIGABIT ? "gbit " : "", 5791 np->gigabit == PHY_GIGABIT ? "gbit " : "",
5804 np->need_linktimer ? "lnktim " : "", 5792 np->need_linktimer ? "lnktim " : "",
5805 np->msi_flags & NV_MSI_CAPABLE ? "msi " : "", 5793 np->msi_flags & NV_MSI_CAPABLE ? "msi " : "",
5806 np->msi_flags & NV_MSI_X_CAPABLE ? "msi-x " : "", 5794 np->msi_flags & NV_MSI_X_CAPABLE ? "msi-x " : "",
5807 np->desc_ver); 5795 np->desc_ver);
5808 5796
5809 return 0; 5797 return 0;
5810 5798