Skip to contentSkip to conversation

drivers/infiniband/hw/cxgb3/iwch_cm.c: use %pM to show MAC address

PATCH Applied H Hartley Sweeten 2 participants 2 messages Jan 5, 2010 – Jan 7, 2010 InfiniBand

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 drivers/infiniband/hw/cxgb3/iwch_cm.c: use %pM to show MAC address

Use the %pM kernel extension to display the MAC address.

The only difference in the output is that the MAC address is shown in the usual colon-separated hex notation.

---

Repost due to merge issues.

drivers/infiniband/hw/cxgb3/iwch_cm.c +2 -9
index 66b4135..d94388b 100644
@@ -1371,15 +1371,8 @@ static int pass_accept_req(struct t3cdev *tdev, struct sk_buff *skb, void *ctx)
 	tim.mac_addr = req->dst_mac;
 	tim.vlan_tag = ntohs(req->vlan_tag);
 	if (tdev->ctl(tdev, GET_IFF_FROM_MAC, &tim) < 0 || !tim.dev) {
-		printk(KERN_ERR
-			"%s bad dst mac %02x %02x %02x %02x %02x %02x\n",
-			__func__,
-			req->dst_mac[0],
-			req->dst_mac[1],
-			req->dst_mac[2],
-			req->dst_mac[3],
-			req->dst_mac[4],
-			req->dst_mac[5]);
+		printk(KERN_ERR "%s bad dst mac %pM\n",
+			__func__, req->dst_mac);
 		goto reject;
 	}