[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <4b45a702-e074-c43d-658e-3ac9fbc55b28@oracle.com>
Date: Fri, 29 Mar 2019 13:01:57 -0700
From: si-wei liu <si-wei.liu@...cle.com>
To: Jiri Pirko <jiri@...nulli.us>,
Stephen Hemminger <stephen@...workplumber.org>
Cc: mst@...hat.com, sridhar.samudrala@...el.com, davem@...emloft.net,
kubakici@...pl, alexander.duyck@...il.com, netdev@...r.kernel.org,
virtualization@...ts.linux-foundation.org, liran.alon@...cle.com,
boris.ostrovsky@...cle.com, vijay.balakrishna@...cle.com
Subject: Re: [PATCH net v4] failover: allow name change on IFF_UP slave
interfaces
On 3/29/2019 8:34 AM, Jiri Pirko wrote:
> Fri, Mar 29, 2019 at 04:15:12PM CET, stephen@...workplumber.org wrote:
>> On Thu, 28 Mar 2019 19:47:27 -0400
>> Si-Wei Liu <si-wei.liu@...cle.com> wrote:
>>
>>> + if (unlikely(dev->flags & IFF_UP)) {
>>> + struct netdev_notifier_change_info change_info;
>>> +
>>> + change_info.flags_changed = 0;
>> Simpler to use structure initialization, which also avoid any chance
>> of unititialized fields.
>>
>> struct netdev_notifier_change_info change_info
>> = { .flags_changed = 0 };
>
> In fact, you can do just:
> struct netdev_notifier_change_info change_info = {};
> to achieve the same.
Hmm, although it's same in effect, I'd opt for keeping explicit
initialization around flags_changed, which has the benefit in terms of
cscope/tags referencing. Just very minor point though.
Let me if you think it otherwise...
-Siwei
Powered by blists - more mailing lists