Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit e174961c authored by Johannes Berg's avatar Johannes Berg Committed by David S. Miller
Browse files

net: convert print_mac to %pM



This converts pretty much everything to print_mac. There were
a few things that had conflicts which I have just dropped for
now, no harm done.

I've built an allyesconfig with this and looked at the files
that weren't built very carefully, but it's a huge patch.

Signed-off-by: default avatarJohannes Berg <johannes@sipsolutions.net>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 0c68ae26
Loading
Loading
Loading
Loading
+4 −5
Original line number Diff line number Diff line
@@ -177,7 +177,6 @@ static irqreturn_t fsg_reset_handler(int irq, void *dev_id)

static void __init fsg_init(void)
{
	DECLARE_MAC_BUF(mac_buf);
	uint8_t __iomem *f;

	ixp4xx_sys_init();
@@ -256,10 +255,10 @@ static void __init fsg_init(void)
#endif
		iounmap(f);
	}
	printk(KERN_INFO "FSG: Using MAC address %s for port 0\n",
	       print_mac(mac_buf, fsg_plat_eth[0].hwaddr));
	printk(KERN_INFO "FSG: Using MAC address %s for port 1\n",
	       print_mac(mac_buf, fsg_plat_eth[1].hwaddr));
	printk(KERN_INFO "FSG: Using MAC address %pM for port 0\n",
	       fsg_plat_eth[0].hwaddr);
	printk(KERN_INFO "FSG: Using MAC address %pM for port 1\n",
	       fsg_plat_eth[1].hwaddr);

}

+2 −3
Original line number Diff line number Diff line
@@ -231,7 +231,6 @@ static irqreturn_t nas100d_reset_handler(int irq, void *dev_id)

static void __init nas100d_init(void)
{
	DECLARE_MAC_BUF(mac_buf);
	uint8_t __iomem *f;
	int i;

@@ -294,8 +293,8 @@ static void __init nas100d_init(void)
#endif
		iounmap(f);
	}
	printk(KERN_INFO "NAS100D: Using MAC address %s for port 0\n",
	       print_mac(mac_buf, nas100d_plat_eth[0].hwaddr));
	printk(KERN_INFO "NAS100D: Using MAC address %pM for port 0\n",
	       nas100d_plat_eth[0].hwaddr);

}

+2 −3
Original line number Diff line number Diff line
@@ -220,7 +220,6 @@ static struct sys_timer nslu2_timer = {

static void __init nslu2_init(void)
{
	DECLARE_MAC_BUF(mac_buf);
	uint8_t __iomem *f;
	int i;

@@ -275,8 +274,8 @@ static void __init nslu2_init(void)
#endif
		iounmap(f);
	}
	printk(KERN_INFO "NSLU2: Using MAC address %s for port 0\n",
	       print_mac(mac_buf, nslu2_plat_eth[0].hwaddr));
	printk(KERN_INFO "NSLU2: Using MAC address %pM for port 0\n",
	       nslu2_plat_eth[0].hwaddr);

}

+2 −4
Original line number Diff line number Diff line
@@ -356,10 +356,8 @@ struct ib_qp *nes_get_qp(struct ib_device *device, int qpn)
 */
static void nes_print_macaddr(struct net_device *netdev)
{
	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_debug(NES_DBG_INIT, "%s: %pM, IRQ %u\n",
		  netdev->name, netdev->dev_addr, netdev->irq);
}

/**
+4 −6
Original line number Diff line number Diff line
@@ -1027,7 +1027,6 @@ static int nes_addr_resolve_neigh(struct nes_vnic *nesvnic, u32 dst_ip)
	struct flowi fl;
	struct neighbour *neigh;
	int rc = -1;
	DECLARE_MAC_BUF(mac);

	memset(&fl, 0, sizeof fl);
	fl.nl_u.ip4_u.daddr = htonl(dst_ip);
@@ -1041,8 +1040,8 @@ static int nes_addr_resolve_neigh(struct nes_vnic *nesvnic, u32 dst_ip)
	if (neigh) {
		if (neigh->nud_state & NUD_VALID) {
			nes_debug(NES_DBG_CM, "Neighbor MAC address for 0x%08X"
				  " is %s, Gateway is 0x%08X \n", dst_ip,
				  print_mac(mac, neigh->ha), ntohl(rt->rt_gateway));
				  " is %pM, Gateway is 0x%08X \n", dst_ip,
				  neigh->ha, ntohl(rt->rt_gateway));
			nes_manage_arp_cache(nesvnic->netdev, neigh->ha,
					     dst_ip, NES_ARP_ADD);
			rc = nes_arp_table(nesvnic->nesdev, dst_ip, NULL,
@@ -1071,7 +1070,6 @@ static struct nes_cm_node *make_cm_node(struct nes_cm_core *cm_core,
	int arpindex = 0;
	struct nes_device *nesdev;
	struct nes_adapter *nesadapter;
	DECLARE_MAC_BUF(mac);

	/* create an hte and cm_node for this instance */
	cm_node = kzalloc(sizeof(*cm_node), GFP_ATOMIC);
@@ -1137,8 +1135,8 @@ static struct nes_cm_node *make_cm_node(struct nes_cm_core *cm_core,

	/* copy the mac addr to node context */
	memcpy(cm_node->rem_mac, nesadapter->arp_table[arpindex].mac_addr, ETH_ALEN);
	nes_debug(NES_DBG_CM, "Remote mac addr from arp table: %s\n",
		  print_mac(mac, cm_node->rem_mac));
	nes_debug(NES_DBG_CM, "Remote mac addr from arp table: %pM\n",
		  cm_node->rem_mac);

	add_hte_node(cm_core, cm_node);
	atomic_inc(&cm_nodes_created);
Loading