[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-Id: <20170828.151752.246788024466105849.davem@davemloft.net>
Date: Mon, 28 Aug 2017 15:17:52 -0700 (PDT)
From: David Miller <davem@...emloft.net>
To: willemdebruijn.kernel@...il.com
Cc: netdev@...r.kernel.org, wei.liu2@...rix.com,
paul.durrant@...rix.com, kbuild-all@...org, willemb@...gle.com
Subject: Re: [PATCH net-next] xen-netback: update ubuf_info initialization
to anonymous union
From: Willem de Bruijn <willemdebruijn.kernel@...il.com>
Date: Fri, 25 Aug 2017 13:10:43 -0400
> From: Willem de Bruijn <willemb@...gle.com>
>
> The xen driver initializes struct ubuf_info fields using designated
> initializers. I recently moved these fields inside a nested anonymous
> struct inside an anonymous union. I had missed this use case.
>
> This breaks compilation of xen-netback with older compilers.
> From kbuild bot with gcc-4.4.7:
>
> drivers/net//xen-netback/interface.c: In function
> 'xenvif_init_queue':
> >> drivers/net//xen-netback/interface.c:554: error: unknown field 'ctx' specified in initializer
> >> drivers/net//xen-netback/interface.c:554: warning: missing braces around initializer
> drivers/net//xen-netback/interface.c:554: warning: (near initialization for '(anonymous).<anonymous>')
> >> drivers/net//xen-netback/interface.c:554: warning: initialization makes integer from pointer without a cast
> >> drivers/net//xen-netback/interface.c:555: error: unknown field 'desc' specified in initializer
>
> Add double braces around the designated initializers to match their
> nested position in the struct. After this, compilation succeeds again.
>
> Fixes: 4ab6c99d99bb ("sock: MSG_ZEROCOPY notification coalescing")
> Reported-by: kbuild bot <lpk@...el.com>
> Signed-off-by: Willem de Bruijn <willemb@...gle.com>
APplied.
Powered by blists - more mailing lists