Re: Staging:et131x: change memcpy() ether_addr_copy()
From: Joe Perches
Date: Fri Mar 28 2014 - 19:01:00 EST
On Fri, 2014-03-28 at 22:27 +0000, paulmcquad wrote:
> replace memcpy() with ether_addr_copy()
> make checkpatch.pl clean
broken.
You at least need to change this definition:
drivers/staging/et131x/et131x.c: static const u8 default_mac[] = { 0x00, 0x05, 0x3d, 0x00, 0x02, 0x00 };
and add __aligned(2) to it to make sure
that the address is appropriately aligned.
> diff --git a/drivers/staging/et131x/et131x.c b/drivers/staging/et131x/et131x.c
[]
> @@ -3770,7 +3770,7 @@ static struct et131x_adapter *et131x_adapter_init(struct net_device *netdev,
[]
> /* Set the MAC address to a default */
> - memcpy(adapter->addr, default_mac, ETH_ALEN);
> + ether_addr_copy(adapter->addr, default_mac, ETH_ALEN);
[]
> @@ -4337,7 +4337,7 @@ static void et131x_multicast(struct net_device *netdev)
> netdev_for_each_mc_addr(ha, netdev) {
> if (i == NIC_MAX_MCAST_LIST)
> break;
> - memcpy(adapter->multicast_list[i++], ha->addr, ETH_ALEN);
> + ether_addr_copy(adapter->multicast_list[i++], ha->addr, ETH_ALEN);
bad indentation too
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/