From: Joe Perches <joe@perches.com>
To: Tobias Klauser <tklauser@distanz.ch>
Cc: "David S. Miller" <davem@davemloft.net>,
netdev@vger.kernel.org, Jaroslav Kysela <perex@perex.cz>
Subject: Re: [PATCH] drivers/net: Omit check for multicast bit in netdev_for_each_mc_addr
Date: Fri, 08 Jul 2011 01:35:09 -0700 [thread overview]
Message-ID: <1310114109.2755.18.camel@Joe-Laptop> (raw)
In-Reply-To: <1310112386-13716-1-git-send-email-tklauser@distanz.ch>
On Fri, 2011-07-08 at 10:06 +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.
>
> There is no need to check for the address being a multicast address in
> the netdev_for_each_mc_addr loop, so remove it.
Thanks Tobias.
The commit message is a bit redundant, but this looks
good to me.
[]
> diff --git a/drivers/net/hp100.c b/drivers/net/hp100.c
[]
> @@ -2103,20 +2103,18 @@ static void hp100_set_multicast_list(struct net_device *dev)
> #endif
> netdev_for_each_mc_addr(ha, dev) {
> addrs = ha->addr;
> - if ((*addrs & 0x01) == 0x01) { /* multicast address? */
> #ifdef HP100_DEBUG
> - printk("hp100: %s: multicast = %pM, ",
> - dev->name, addrs);
> + printk("hp100: %s: multicast = %pM, ",
> + dev->name, addrs);
> #endif
> - for (i = idx = 0; i < 6; i++) {
> - idx ^= *addrs++ & 0x3f;
> - printk(":%02x:", idx);
> - }
> + for (i = idx = 0; i < 6; i++) {
> + idx ^= *addrs++ & 0x3f;
> + printk(":%02x:", idx);
> + }
It looks as if printing the per-byte hash
should also be guarded by HP100_DEBUG.
It's been this way since at least 2.4.1 though.
Does anyone still use this adapter?
next prev parent reply other threads:[~2011-07-08 8:35 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-07-08 8:06 [PATCH] drivers/net: Omit check for multicast bit in netdev_for_each_mc_addr Tobias Klauser
2011-07-08 8:35 ` Joe Perches [this message]
2011-07-08 8:42 ` Tobias Klauser
2011-07-08 16:03 ` 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=1310114109.2755.18.camel@Joe-Laptop \
--to=joe@perches.com \
--cc=davem@davemloft.net \
--cc=netdev@vger.kernel.org \
--cc=perex@perex.cz \
--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