summaryrefslogtreecommitdiff
path: root/drivers/infiniband/hw/nes/nes.c
diff options
context:
space:
mode:
authorRoland Dreier <rolandd@cisco.com>2008-04-23 18:52:18 (GMT)
committerRoland Dreier <rolandd@cisco.com>2008-04-23 18:52:18 (GMT)
commit2bd01c5d2ed04838d50548cb7b955505a20ac0bd (patch)
tree1e9821dd9178f0a48e54c7aa0781db3b34e7efc4 /drivers/infiniband/hw/nes/nes.c
parent807501475fce0ebe68baedf87f202c3e4ee0d12c (diff)
downloadlinux-2bd01c5d2ed04838d50548cb7b955505a20ac0bd.tar.xz
RDMA/nes: Use print_mac() to format ethernet addresses for printing
Removing open-coded MAC formats shrinks the source and the generated code too, eg on x86-64: add/remove: 0/0 grow/shrink: 0/4 up/down: 0/-103 (-103) function old new delta make_cm_node 932 912 -20 nes_netdev_set_mac_address 427 406 -21 nes_netdev_set_multicast_list 1148 1124 -24 nes_probe 2349 2311 -38 Acked-by: Glenn Streiff <gstreiff@neteffect.com> Signed-off-by: Roland Dreier <rolandd@cisco.com>
Diffstat (limited to 'drivers/infiniband/hw/nes/nes.c')
-rw-r--r--drivers/infiniband/hw/nes/nes.c10
1 files changed, 4 insertions, 6 deletions
diff --git a/drivers/infiniband/hw/nes/nes.c b/drivers/infiniband/hw/nes/nes.c
index b046262..c0671ad 100644
--- a/drivers/infiniband/hw/nes/nes.c
+++ b/drivers/infiniband/hw/nes/nes.c
@@ -353,13 +353,11 @@ struct ib_qp *nes_get_qp(struct ib_device *device, int qpn)
*/
static void nes_print_macaddr(struct net_device *netdev)
{
- nes_debug(NES_DBG_INIT, "%s: MAC %02X:%02X:%02X:%02X:%02X:%02X, IRQ %u\n",
- netdev->name,
- netdev->dev_addr[0], netdev->dev_addr[1], netdev->dev_addr[2],
- netdev->dev_addr[3], netdev->dev_addr[4], netdev->dev_addr[5],
- netdev->irq);
-}
+ DECLARE_MAC_BUF(mac);
+ nes_debug(NES_DBG_INIT, "%s: %s, IRQ %u\n",
+ netdev->name, print_mac(mac, netdev->dev_addr), netdev->irq);
+}
/**
* nes_interrupt - handle interrupts