All of lore.kernel.org
 help / color / mirror / Atom feed
From: paulmcquad <paulmcquad@gmail.com>
To: gregkh@linuxfoundation.org, gamerh2o@gmail.com,
	devel@driverdev.osuosl.org, linux-kernel@vger.kernel.org
Subject: Staging:et131x: change memcpy()  ether_addr_copy()
Date: Fri, 28 Mar 2014 22:27:22 +0000	[thread overview]
Message-ID: <5335F74A.9020507@gmail.com> (raw)

>From 63f3c8948d5264ab22695502b201ff50edb9028d Mon Sep 17 00:00:00 2001
From: Paul McQuade <paulmcquad@gmail.com>
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

Signed-off-by: Paul McQuade <paulmcquad@gmail.com>
---
 drivers/staging/et131x/et131x.c | 10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)

diff --git a/drivers/staging/et131x/et131x.c b/drivers/staging/et131x/et131x.c
index e516bb6..a35d3c8 100644
--- a/drivers/staging/et131x/et131x.c
+++ b/drivers/staging/et131x/et131x.c
@@ -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;
-- 
1.8.3.2


             reply	other threads:[~2014-03-28 22:27 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-03-28 22:27 paulmcquad [this message]
2014-03-28 22:59 ` Staging:et131x: change memcpy() ether_addr_copy() Joe Perches
2014-03-31  8:56 ` Dan Carpenter
2014-03-31 12:47   ` Jonas Gorski

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=5335F74A.9020507@gmail.com \
    --to=paulmcquad@gmail.com \
    --cc=devel@driverdev.osuosl.org \
    --cc=gamerh2o@gmail.com \
    --cc=gregkh@linuxfoundation.org \
    --cc=linux-kernel@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.