mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Joe Perches <joe@perches.com>
To: paulmcquad <paulmcquad@gmail.com>
Cc: gregkh@linuxfoundation.org, gamerh2o@gmail.com,
	devel@driverdev.osuosl.org, linux-kernel@vger.kernel.org,
	Dan Carpenter <error27@gmail.com>
Subject: Re: Staging:et131x: change memcpy()  ether_addr_copy()
Date: Fri, 28 Mar 2014 15:59:58 -0700	[thread overview]
Message-ID: <1396047598.31134.37.camel@joe-AO722> (raw)
In-Reply-To: <5335F74A.9020507@gmail.com>

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



  reply	other threads:[~2014-03-28 23:00 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-03-28 22:27 paulmcquad
2014-03-28 22:59 ` Joe Perches [this message]
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=1396047598.31134.37.camel@joe-AO722 \
    --to=joe@perches.com \
    --cc=devel@driverdev.osuosl.org \
    --cc=error27@gmail.com \
    --cc=gamerh2o@gmail.com \
    --cc=gregkh@linuxfoundation.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=paulmcquad@gmail.com \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®