[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <20210810093456.3ojqgvhe6ivo7sdr@skbuf>
Date: Tue, 10 Aug 2021 09:34:57 +0000
From: Vladimir Oltean <vladimir.oltean@....com>
To: Russell King - ARM Linux admin <linux@...linux.org.uk>
CC: Leon Romanovsky <leon@...nel.org>,
"netdev@...r.kernel.org" <netdev@...r.kernel.org>,
Jakub Kicinski <kuba@...nel.org>,
"David S. Miller" <davem@...emloft.net>,
Andrew Lunn <andrew@...n.ch>,
Florian Fainelli <f.fainelli@...il.com>,
Vivien Didelot <vivien.didelot@...il.com>,
Vladimir Oltean <olteanv@...il.com>,
Vadym Kochan <vkochan@...vell.com>,
Taras Chornyi <tchornyi@...vell.com>,
Saeed Mahameed <saeedm@...dia.com>,
Jiri Pirko <jiri@...dia.com>, Ido Schimmel <idosch@...dia.com>,
Lars Povlsen <lars.povlsen@...rochip.com>,
Steen Hegelund <Steen.Hegelund@...rochip.com>,
"UNGLinuxDriver@...rochip.com" <UNGLinuxDriver@...rochip.com>,
Grygorii Strashko <grygorii.strashko@...com>,
Julian Wiedmann <jwi@...ux.ibm.com>,
Karsten Graul <kgraul@...ux.ibm.com>,
Heiko Carstens <hca@...ux.ibm.com>,
Vasily Gorbik <gor@...ux.ibm.com>,
Christian Borntraeger <borntraeger@...ibm.com>,
Jianbo Liu <jianbol@...dia.com>,
Vlad Buslov <vladbu@...dia.com>,
Bjarni Jonasson <bjarni.jonasson@...rochip.com>,
Vignesh Raghavendra <vigneshr@...com>,
Tobias Waldekranz <tobias@...dekranz.com>,
"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
"linux-rdma@...r.kernel.org" <linux-rdma@...r.kernel.org>,
"linux-arm-kernel@...ts.infradead.org"
<linux-arm-kernel@...ts.infradead.org>,
"linux-omap@...r.kernel.org" <linux-omap@...r.kernel.org>,
"linux-s390@...r.kernel.org" <linux-s390@...r.kernel.org>,
Ido Schimmel <idosch@...sch.org>
Subject: Re: [PATCH net] net: switchdev: zero-initialize struct
switchdev_notifier_fdb_info emitted by drivers towards the bridge
On Tue, Aug 10, 2021 at 10:12:38AM +0100, Russell King - ARM Linux admin wrote:
> There's a difference between:
>
> struct foo bar = { 0 };
>
> and
>
> struct foo bar = { };
>
> The former tells the compiler that you wish to set the first member of
> struct foo, which will be an integer type, to zero. The latter is an
> empty initialiser where all members and sub-members of the structure
> default to a zero value.
>
> You should have no problem with the latter. You will encounter problems
> with the former if the first member of struct foo is not an integer
> type.
Ok, that's good to know. Seeing that this patch has not been applied yet
I'll go for a v2.
Powered by blists - more mailing lists