netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Joe Perches <joe@perches.com>
To: David Miller <davem@davemloft.net>
Cc: vapier.adi@gmail.com, tklauser@distanz.ch,
	michael.hennerich@analog.com,
	uclinux-dist-devel@blackfin.uclinux.org, netdev@vger.kernel.org
Subject: [PATCH net-next-2.6] netdev: bfin_mac: Remove is_multicast_ether_addr use in netdev_for_each_mc_addr
Date: Wed, 12 Jan 2011 20:08:04 -0800	[thread overview]
Message-ID: <1294891685.4114.29.camel@Joe-Laptop> (raw)
In-Reply-To: <20110112.190143.184432859.davem@davemloft.net>

Remove code that has no effect.

Signed-off-by: Joe Perches <joe@perches.com>

---

Uncompiled, untested...

> > Does a netdev_for_each_mc_addr loop entry really
> > need to verify that the address is multicast?
> > Couldn't this just be:
> It could, and I'd be happy to apply a follow-on patch that does
> this.

 drivers/net/bfin_mac.c |    9 +--------
 1 files changed, 1 insertions(+), 8 deletions(-)

diff --git a/drivers/net/bfin_mac.c b/drivers/net/bfin_mac.c
index fe75e7a..22abfb3 100644
--- a/drivers/net/bfin_mac.c
+++ b/drivers/net/bfin_mac.c
@@ -1284,19 +1284,12 @@ static void bfin_mac_multicast_hash(struct net_device *dev)
 {
 	u32 emac_hashhi, emac_hashlo;
 	struct netdev_hw_addr *ha;
-	char *addrs;
 	u32 crc;
 
 	emac_hashhi = emac_hashlo = 0;
 
 	netdev_for_each_mc_addr(ha, dev) {
-		addrs = ha->addr;
-
-		/* skip non-multicast addresses */
-		if (!is_multicast_ether_addr(addrs))
-			continue;
-
-		crc = ether_crc(ETH_ALEN, addrs);
+		crc = ether_crc(ETH_ALEN, ha->addr);
 		crc >>= 26;
 
 		if (crc & 0x20)





  reply	other threads:[~2011-01-13  4:08 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-01-12  9:30 [PATCH net-next-2.6] netdev: bfin_mac: Use is_multicast_ether_addr helper Tobias Klauser
2011-01-12 16:38 ` [uclinux-dist-devel] " Mike Frysinger
2011-01-12 17:18   ` Joe Perches
2011-01-13  3:01     ` David Miller
2011-01-13  4:08       ` Joe Perches [this message]
2011-01-14  5:51         ` [PATCH net-next-2.6] netdev: bfin_mac: Remove is_multicast_ether_addr use in netdev_for_each_mc_addr David Miller
2011-01-13  2:46 ` [PATCH net-next-2.6] netdev: bfin_mac: Use is_multicast_ether_addr helper 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=1294891685.4114.29.camel@Joe-Laptop \
    --to=joe@perches.com \
    --cc=davem@davemloft.net \
    --cc=michael.hennerich@analog.com \
    --cc=netdev@vger.kernel.org \
    --cc=tklauser@distanz.ch \
    --cc=uclinux-dist-devel@blackfin.uclinux.org \
    --cc=vapier.adi@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;
as well as URLs for NNTP newsgroup(s).