All of lore.kernel.org
 help / color / mirror / Atom feed
From: Chris Metcalf <cmetcalf@tilera.com>
To: Tobias Klauser <tklauser@distanz.ch>
Cc: <netdev@vger.kernel.org>
Subject: Re: [PATCH 2/2] net: tilegx: Use helpers from linux/etherdevice.h to check/set MAC
Date: Wed, 28 May 2014 15:43:33 -0400	[thread overview]
Message-ID: <53863C65.5000404@tilera.com> (raw)
In-Reply-To: <1401192245-26260-1-git-send-email-tklauser@distanz.ch>

On 5/27/2014 8:04 AM, Tobias Klauser wrote:
> Use is_valid_ether_addr() to check for a valid MAC address to set on the
> device.  This will also check for the device address being multicast,
> which would have been possible previously.

I don't think having a multicast address here is possible (i.e. as returned
by gxio_mpipe_link_enumerate_mac), and it confuses the actual issue, which
is handling the all-zeroes case in a simulator run.  I'd prefer to see
is_zero_ether_addr() instead.

> Also use ether_addr_copy() instead of a manual memcpy() to set the
> address.
>
> Furthermore, get rid of a redundant assignment of dev->addr_len. This is
> already set by ether_setup() which is called in tile_net_setup().
>
> Signed-off-by: Tobias Klauser <tklauser@distanz.ch>
> ---
>   drivers/net/ethernet/tile/tilegx.c |   17 ++++++-----------
>   1 file changed, 6 insertions(+), 11 deletions(-)

With the change above,

Acked-by: Chris Metcalf <cmetcalf@tilera.com>

-- 
Chris Metcalf, Tilera Corp.
http://www.tilera.com

  reply	other threads:[~2014-05-28 19:43 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-05-27 12:04 [PATCH 2/2] net: tilegx: Use helpers from linux/etherdevice.h to check/set MAC Tobias Klauser
2014-05-28 19:43 ` Chris Metcalf [this message]
2014-05-30  7:14   ` Tobias Klauser
2014-05-30  7:47 ` [PATCH v2 2/2] net: tile: " Tobias Klauser
2014-05-31  0:06   ` David Miller

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=53863C65.5000404@tilera.com \
    --to=cmetcalf@tilera.com \
    --cc=netdev@vger.kernel.org \
    --cc=tklauser@distanz.ch \
    /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.