Staging:et131x: change memcpy() ether_addr_copy()
Quoted 1 line
From
63f3c8948d5264ab22695502b201ff50edb9028dMon Sep 17 00:00:00 2001
From: Paul McQuade <[email protected]>
Date: Fri, 28 Mar 2014 22:16:22 +0000
Subject: [PATCH] Staging:et131x: change memcpy() ether_addr_copy()
replace memcpy() with ether_addr_copy()
make checkpatch.pl clean
--- drivers/staging/et131x/et131x.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-)
drivers/staging/et131x/et131x.c +5 -5
@@ -3523,7 +3523,7 @@ static int et131x_pci_init(struct et131x_adapter *adapter, goto err_out; } } -memcpy (adapter->addr, adapter->rom_addr,ETH_ALEN ); +ether_addr_copy (adapter->addr, adapter->rom_addr,ETH_ALEN ); out:return rc; err_out:
@@ -3770,7 +3770,7 @@ static struct et131x_adapter *et131x_adapter_init(struct net_device *netdev, adapter->registry_jumbo_packet =1514 ;/* 1514-9216 */ /* Set the MAC address to a default */ -memcpy (adapter->addr, default_mac,ETH_ALEN ); +ether_addr_copy (adapter->addr, default_mac,ETH_ALEN );return adapter; }
@@ -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 ); } adapter->multicast_addr_count = i;
@@ -4473,7 +4473,7 @@ static int et131x_change_mtu(struct net_device *netdev, int new_mtu)et131x_init_send (adapter);et131x_hwaddr_init (adapter); -memcpy (netdev->dev_addr, adapter->addr,ETH_ALEN ); +ether_addr_copy (netdev->dev_addr, adapter->addr,ETH_ALEN );/* Init the device with the new settings */ et131x_adapter_setup (adapter);
@@ -4644,7 +4644,7 @@ static int et131x_pci_setup(struct pci_dev *pdev,INIT_WORK (&adapter->task, et131x_isr_handler);/* Copy address into the net_device struct */ -memcpy (netdev->dev_addr, adapter->addr,ETH_ALEN ); +ether_addr_copy (netdev->dev_addr, adapter->addr,ETH_ALEN );/* Init variable for counting how long we do not have link status */ adapter->boot_coma =0 ;
Signature · 1 line
1.8.3.2
Quoted 2 lines · paulmcquad
replace
memcpy()withether_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.
drivers/staging/et131x/et131x.c
Quoted 1 line
drivers/staging/et131x/et131x.c +0
-0
[]
drivers/staging/et131x/et131x.c static struct et131x_adapter *et131x_adapter_init(struct net_device *netdev,
Quoted 1 line
drivers/staging/et131x/et131x.c +0
-0@@ -3770,7 +3770,7 @@ static struct et131x_adapter *et131x_adapter_init(struct net_device *netdev,
[]
drivers/staging/et131x/et131x.c static struct et131x_adapter *et131x_adapter_init(struct net_device *netdev, · line 3773
Quoted 3 lines
drivers/staging/et131x/et131x.c +1
-1/* Set the MAC address to a default */ -memcpy (adapter->addr, default_mac,ETH_ALEN ); +ether_addr_copy (adapter->addr, default_mac,ETH_ALEN );
[]
drivers/staging/et131x/et131x.c static void et131x_multicast(struct net_device *netdev) · line 4340
Quoted 6 lines
drivers/staging/et131x/et131x.c +1
-1@@ -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
Quoted 4 lines · paulmcquad
Quoted 1 line
From
63f3c8948d5264ab22695502b201ff50edb9028dMon Sep 17 00:00:00 2001From: Paul McQuade <[email protected]>
Date: Fri, 28 Mar 2014 22:16:22 +0000
Subject: [PATCH] Staging:et131x: changememcpy()ether_addr_copy()
Don't include this header block.
Quoted 3 lines
replace
memcpy()withether_addr_copy()
make checkpatch.pl clean
Patch doesn't apply to linux-next.
drivers/staging/et131x/et131x.c static void et131x_multicast(struct net_device *netdev) · line 4340
Quoted 6 lines
drivers/staging/et131x/et131x.c +1
-1@@ -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 );
There is an indenting error here.
regards,
dan carpenter
Quoted 14 lines · Dan Carpenter
Quoted 4 lines · paulmcquad
Quoted 1 line
From
63f3c8948d5264ab22695502b201ff50edb9028dMon Sep 17 00:00:00 2001From: Paul McQuade <[email protected]>
Date: Fri, 28 Mar 2014 22:16:22 +0000
Subject: [PATCH] Staging:et131x: changememcpy()ether_addr_copy()Don't include this header block.
Quoted 3 lines
replace
memcpy()withether_addr_copy()
make checkpatch.pl cleanPatch doesn't apply to linux-next.
Quoted 8 lines
drivers/staging/et131x/et131x.c static void et131x_multicast(struct net_device *netdev) · line 4340
Quoted 6 lines
drivers/staging/et131x/et131x.c +1
-1@@ -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 );There is an indenting error here.
Also ether_addr_copy does not have a third argument, so it would not even compile.
Regards
Jonas