netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Russell King - ARM Linux <linux@arm.linux.org.uk>
To: Tobias Klauser <tklauser@distanz.ch>
Cc: "David S. Miller" <davem@davemloft.net>,
	netdev@vger.kernel.org, linux-arm-kernel@lists.infradead.org
Subject: Re: [PATCH net-next] net: am79c961a: Omit check for multicast bit in netdev_for_each_mc_addr
Date: Thu, 30 Jun 2011 10:23:49 +0100	[thread overview]
Message-ID: <20110630092349.GR21898@n2100.arm.linux.org.uk> (raw)
In-Reply-To: <1309349686-1506-1-git-send-email-tklauser@distanz.ch>

On Wed, Jun 29, 2011 at 02:14:46PM +0200, Tobias Klauser wrote:
> There is no need to check for the address being a multicast address in
> the netdev_for_each_mc_addr loop, so remove it.
> 
> Signed-off-by: Tobias Klauser <tklauser@distanz.ch>

Thanks.

Acked-by: Russell King <rmk+kernel@arm.linux.org.uk>

> ---
>  drivers/net/arm/am79c961a.c |   14 ++++++--------
>  1 files changed, 6 insertions(+), 8 deletions(-)
> 
> diff --git a/drivers/net/arm/am79c961a.c b/drivers/net/arm/am79c961a.c
> index 7b3e23f..52fe21e 100644
> --- a/drivers/net/arm/am79c961a.c
> +++ b/drivers/net/arm/am79c961a.c
> @@ -199,17 +199,15 @@ am79c961_ramtest(struct net_device *dev, unsigned int val)
>  
>  static void am79c961_mc_hash(char *addr, u16 *hash)
>  {
> -	if (addr[0] & 0x01) {
> -		int idx, bit;
> -		u32 crc;
> +	int idx, bit;
> +	u32 crc;
>  
> -		crc = ether_crc_le(ETH_ALEN, addr);
> +	crc = ether_crc_le(ETH_ALEN, addr);
>  
> -		idx = crc >> 30;
> -		bit = (crc >> 26) & 15;
> +	idx = crc >> 30;
> +	bit = (crc >> 26) & 15;
>  
> -		hash[idx] |= 1 << bit;
> -	}
> +	hash[idx] |= 1 << bit;
>  }
>  
>  static unsigned int am79c961_get_rx_mode(struct net_device *dev, u16 *hash)
> -- 
> 1.7.5.4
> 
> 
> _______________________________________________
> linux-arm-kernel mailing list
> linux-arm-kernel@lists.infradead.org
> http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

  reply	other threads:[~2011-06-30  9:24 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-06-29 12:14 [PATCH net-next] net: am79c961a: Omit check for multicast bit in netdev_for_each_mc_addr Tobias Klauser
2011-06-30  9:23 ` Russell King - ARM Linux [this message]
2011-07-01  6:56 ` 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=20110630092349.GR21898@n2100.arm.linux.org.uk \
    --to=linux@arm.linux.org.uk \
    --cc=davem@davemloft.net \
    --cc=linux-arm-kernel@lists.infradead.org \
    --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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).