From: si-wei liu <si-wei.liu@oracle.com>
To: Jiri Pirko <jiri@resnulli.us>,
Stephen Hemminger <stephen@networkplumber.org>
Cc: mst@redhat.com, sridhar.samudrala@intel.com, davem@davemloft.net,
kubakici@wp.pl, alexander.duyck@gmail.com,
netdev@vger.kernel.org,
virtualization@lists.linux-foundation.org, liran.alon@oracle.com,
boris.ostrovsky@oracle.com, vijay.balakrishna@oracle.com
Subject: Re: [PATCH net v4] failover: allow name change on IFF_UP slave interfaces
Date: Fri, 29 Mar 2019 13:01:57 -0700 [thread overview]
Message-ID: <4b45a702-e074-c43d-658e-3ac9fbc55b28@oracle.com> (raw)
In-Reply-To: <20190329153423.GZ14297@nanopsycho>
On 3/29/2019 8:34 AM, Jiri Pirko wrote:
> Fri, Mar 29, 2019 at 04:15:12PM CET, stephen@networkplumber.org wrote:
>> On Thu, 28 Mar 2019 19:47:27 -0400
>> Si-Wei Liu <si-wei.liu@oracle.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
prev parent reply other threads:[~2019-03-29 20:02 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-03-28 23:47 [PATCH net v4] failover: allow name change on IFF_UP slave interfaces Si-Wei Liu
2019-03-29 5:55 ` Samudrala, Sridhar
2019-03-29 19:50 ` si-wei liu
2019-03-29 22:31 ` Michael S. Tsirkin
2019-03-29 22:58 ` si-wei liu
2019-03-29 13:45 ` kbuild test robot
2019-03-29 15:15 ` Stephen Hemminger
2019-03-29 15:34 ` Jiri Pirko
2019-03-29 20:01 ` si-wei liu [this message]
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=4b45a702-e074-c43d-658e-3ac9fbc55b28@oracle.com \
--to=si-wei.liu@oracle.com \
--cc=alexander.duyck@gmail.com \
--cc=boris.ostrovsky@oracle.com \
--cc=davem@davemloft.net \
--cc=jiri@resnulli.us \
--cc=kubakici@wp.pl \
--cc=liran.alon@oracle.com \
--cc=mst@redhat.com \
--cc=netdev@vger.kernel.org \
--cc=sridhar.samudrala@intel.com \
--cc=stephen@networkplumber.org \
--cc=vijay.balakrishna@oracle.com \
--cc=virtualization@lists.linux-foundation.org \
/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