lkml.org 
[lkml]   [2014]   [Mar]   [28]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
SubjectRe: Staging:et131x: change memcpy() ether_addr_copy()
From
Date
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




\
 
 \ /
  Last update: 2014-03-29 00:21    [W:0.062 / U:48.284 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site