[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <YlQc0ulxVq+k1Fub@osiris>
Date: Mon, 11 Apr 2022 14:19:30 +0200
From: Heiko Carstens <hca@...ux.ibm.com>
To: Jason Gunthorpe <jgg@...pe.ca>
Cc: Niklas Schnelle <schnelle@...ux.ibm.com>,
Matthew Rosato <mjrosato@...ux.ibm.com>,
linux-s390@...r.kernel.org, alex.williamson@...hat.com,
cohuck@...hat.com, farman@...ux.ibm.com, pmorel@...ux.ibm.com,
borntraeger@...ux.ibm.com, gor@...ux.ibm.com,
gerald.schaefer@...ux.ibm.com, agordeev@...ux.ibm.com,
svens@...ux.ibm.com, frankja@...ux.ibm.com, david@...hat.com,
imbrenda@...ux.ibm.com, vneethv@...ux.ibm.com,
oberpar@...ux.ibm.com, freude@...ux.ibm.com, thuth@...hat.com,
pasic@...ux.ibm.com, pbonzini@...hat.com, corbet@....net,
kvm@...r.kernel.org, linux-kernel@...r.kernel.org,
linux-doc@...r.kernel.org
Subject: Re: [PATCH v5 14/21] KVM: s390: pci: provide routines for
enabling/disabling interrupt forwarding
On Fri, Apr 08, 2022 at 09:48:24AM -0300, Jason Gunthorpe wrote:
> On Tue, Apr 05, 2022 at 03:39:19PM +0200, Niklas Schnelle wrote:
> > On Mon, 2022-04-04 at 13:43 -0400, Matthew Rosato wrote:
> > > + struct zpci_fib fib = {};
> >
> > Hmm this one uses '{}' as initializer while all current callers of
> > zpci_mod_fc() use '{0}'. As far as I know the empty braces are a GNU
> > extension so should work for the kernel but for consistency I'd go with
> > '{0}' or possibly '{.foo = bar, ...}' where that is more readable.
> > There too uninitialized fields will be set to 0. Unless of course there
> > is a conflicting KVM convention that I don't know about.
>
> {} is not a GNU extension, it is the preferred way to write it.
>
> The standard has a weird distinction between {} and {0} that results
> in different behavior.
Whoever cares: details are described in "6.7.8 Initialization" within
the C standard.
Powered by blists - more mailing lists