[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <0f1e8fb5-b9a8-b363-c080-65c23f76b25e@cumulusnetworks.com>
Date: Thu, 26 Oct 2017 14:08:02 +0300
From: Nikolay Aleksandrov <nikolay@...ulusnetworks.com>
To: Toshiaki Makita <makita.toshiaki@....ntt.co.jp>,
netdev@...r.kernel.org
Cc: roopa@...ulusnetworks.com, bridge@...ts.linux-foundation.org,
mrv@...atatu.com, dsa@...ulusnetworks.com, davem@...emloft.net
Subject: Re: [Bridge] [PATCH net-next v4 2/2] bridge: vlan: signal if anything
changed on vlan add
On 26/10/17 14:02, Nikolay Aleksandrov wrote:
> On 26/10/17 13:16, Toshiaki Makita wrote:
>> On 2017/10/26 7:52, Nikolay Aleksandrov wrote:
>> ...
>>> @@ -559,6 +574,7 @@ int br_vlan_add(struct net_bridge *br, u16 vid, u16 flags)
>>>
>>> ASSERT_RTNL();
>>>
>>> + *changed = false;
>>> vg = br_vlan_group(br);
>>> vlan = br_vlan_find(vg, vid);
>>> if (vlan) {
>>> @@ -576,9 +592,12 @@ int br_vlan_add(struct net_bridge *br, u16 vid, u16 flags)
>>> refcount_inc(&vlan->refcnt);
>>> vlan->flags |= BRIDGE_VLAN_INFO_BRENTRY;
>>> vg->num_vlans++;
>>> + *changed = true;
>>> }
>>> - __vlan_add_flags(vlan, flags);
>>> - return 0;
>>> + if (__vlan_add_flags(vlan, flags))
>>> + *changed = true;
>>> +
>>> + return ret;
>>
>> "ret" isn't always initialized here, is it?
>>
>>
>> Toshiaki Makita
>
> Oh, good catch! Right you are, weird that there was no warning even with W=1 as
> I always check that before sending a set.
>
> Thanks,
> Nik
>
Unfortunately that was a leftover from v0 of this set where I always initialized ret.
Will fix and send v5, thanks again.
Powered by blists - more mailing lists