Bug#600155: [11/17] r6040: Fix multicast list iteration when hash filter is used
- To: Ben Hutchings <ben@decadent.org.uk>
- Cc: Greg KH <gregkh@suse.de>, linux-kernel@vger.kernel.org, stable@kernel.org, Florian Fainelli <florian@openwrt.org>, stable-review@kernel.org, torvalds@linux-foundation.org, akpm@linux-foundation.org, alan@lxorguk.ukuu.org.uk, 600155@bugs.debian.org, Jason Heeris <jason.heeris@gmail.com>, David Miller <davem@davemloft.net>, spamalot@hispeed.ch
- Subject: Bug#600155: [11/17] r6040: Fix multicast list iteration when hash filter is used
- From: Jack Stone <jwjstone@fastmail.fm>
- Date: Fri, 22 Oct 2010 22:23:15 +0100
- Message-id: <[🔎] 4CC200C3.8000208@fastmail.fm>
- Reply-to: Jack Stone <jwjstone@fastmail.fm>, 600155@bugs.debian.org
- In-reply-to: <[🔎] 1287782286.20865.248.camel@localhost>
- References: <[🔎] 20101022184033.486292826@clark.site> <[🔎] 4CC1E257.4070704@fastmail.fm> <[🔎] 20101022192350.GA10673@suse.de> <[🔎] 4CC1E610.4050605@fastmail.fm> <[🔎] 1287782286.20865.248.camel@localhost>
On 22/10/2010 22:18, Ben Hutchings wrote:
> On Fri, 2010-10-22 at 20:29 +0100, Jack Stone wrote:
>> On 22/10/2010 20:23, Greg KH wrote:
>>> On Fri, Oct 22, 2010 at 08:13:27PM +0100, Jack Stone wrote:
>>>> On 22/10/2010 19:39, Greg KH wrote:
>>>>> drivers/net/r6040.c | 1 +
>>>>> 1 file changed, 1 insertion(+)
>>>>>
>>>>> --- a/drivers/net/r6040.c
>>>>> +++ b/drivers/net/r6040.c
>>>>> @@ -976,6 +976,7 @@ static void r6040_multicast_list(struct
>>>>> iowrite16(hash_table[3], ioaddr + MAR3);
>>>>> }
>>>>> /* Multicast Address 1~4 case */
>>>>> + dmi = dev->mc_list;
>>>>> for (i = 0, dmi; (i < dev->mc_count) && (i < MCAST_MAX); i++) {
>>>> Any reason for the dmi in the above line? As far as I can see it is a
>>>> nop.
>>>
>>> Look closer at the for loop please.
>>
>> Maybe I'm missing something but:
>> for (i = 0, ---->dmi <----; (i < ...
>>
>> The dmi here still doesn't seem to do anything?
>
> It doesn't, but it doesn't do any harm either. The loop has been
> rewritten in mainline.
Agreed, it causes no problems, but it seems like it was intended to be
the dmi init, i.e.
for (i = 0, dmi = dev->mc_list; ...
I suppose it doesn't really matter but either removing the dmi in the
for loop or moving the dmi init in there would make more sense to me.
I really should learn to explain myself fully. Sorry for taking up
your time.
Thanks,
Jack
Reply to: