netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "Jubran, Samih" <sameehj@amazon.com>
To: Arnd Bergmann <arnd@arndb.de>,
	"Belgazal, Netanel" <netanel@amazon.com>,
	"Kiyanovski, Arthur" <akiyano@amazon.com>,
	"David S. Miller" <davem@davemloft.net>,
	Alexei Starovoitov <ast@kernel.org>,
	Daniel Borkmann <daniel@iogearbox.net>,
	Jakub Kicinski <kuba@kernel.org>,
	"Jesper Dangaard Brouer" <hawk@kernel.org>,
	John Fastabend <john.fastabend@gmail.com>
Cc: "Tzalik, Guy" <gtzalik@amazon.com>,
	"Bshara, Saeed" <saeedb@amazon.com>,
	"Machulsky, Zorik" <zorik@amazon.com>,
	"netdev@vger.kernel.org" <netdev@vger.kernel.org>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
	"bpf@vger.kernel.org" <bpf@vger.kernel.org>
Subject: RE: [PATCH] net: ena: fix gcc-4.8 missing-braces warning
Date: Thu, 30 Apr 2020 07:18:47 +0000	[thread overview]
Message-ID: <03f3568ec8c646cdb7c767b16d19525a@EX13D11EUC003.ant.amazon.com> (raw)
In-Reply-To: <20200428215131.3948527-1-arnd@arndb.de>


> -----Original Message-----
> From: Arnd Bergmann <arnd@arndb.de>
> Sent: Wednesday, April 29, 2020 12:51 AM
> To: Belgazal, Netanel <netanel@amazon.com>; Kiyanovski, Arthur
> <akiyano@amazon.com>; David S. Miller <davem@davemloft.net>; Alexei
> Starovoitov <ast@kernel.org>; Daniel Borkmann <daniel@iogearbox.net>;
> Jakub Kicinski <kuba@kernel.org>; Jesper Dangaard Brouer
> <hawk@kernel.org>; John Fastabend <john.fastabend@gmail.com>; Jubran,
> Samih <sameehj@amazon.com>
> Cc: Arnd Bergmann <arnd@arndb.de>; Tzalik, Guy <gtzalik@amazon.com>;
> Bshara, Saeed <saeedb@amazon.com>; Machulsky, Zorik
> <zorik@amazon.com>; netdev@vger.kernel.org; linux-
> kernel@vger.kernel.org; bpf@vger.kernel.org
> Subject: [EXTERNAL] [PATCH] net: ena: fix gcc-4.8 missing-braces warning
> 
> CAUTION: This email originated from outside of the organization. Do not click
> links or open attachments unless you can confirm the sender and know the
> content is safe.
> 
> 
> 
> Older compilers warn about initializers with incorrect curly
> braces:
> 
> drivers/net/ethernet/amazon/ena/ena_netdev.c: In function
> 'ena_xdp_xmit_buff':
> drivers/net/ethernet/amazon/ena/ena_netdev.c:311:2: error: expected ','
> or ';' before 'struct'
>   struct ena_tx_buffer *tx_info;
>   ^~~~~~
> drivers/net/ethernet/amazon/ena/ena_netdev.c:321:2: error: 'tx_info'
> undeclared (first use in this function)
>   tx_info = &xdp_ring->tx_buffer_info[req_id];
>   ^~~~~~~
> drivers/net/ethernet/amazon/ena/ena_netdev.c:321:2: note: each
> undeclared identifier is reported only once for each function it appears in
> 
> Use the GNU empty initializer extension to avoid this.
> 
> Fixes: 31aa9857f173 ("net: ena: enable negotiating larger Rx ring size")
Please use the correct fixes, it should be XDP TX commit.
Otherwise looks good,
Thanks!
> Signed-off-by: Arnd Bergmann <arnd@arndb.de>
> ---
>  drivers/net/ethernet/amazon/ena/ena_netdev.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/net/ethernet/amazon/ena/ena_netdev.c
> b/drivers/net/ethernet/amazon/ena/ena_netdev.c
> index 2cc765df8da3..ad385652ca24 100644
> --- a/drivers/net/ethernet/amazon/ena/ena_netdev.c
> +++ b/drivers/net/ethernet/amazon/ena/ena_netdev.c
> @@ -307,7 +307,7 @@ static int ena_xdp_xmit_buff(struct net_device *dev,
>                              struct ena_rx_buffer *rx_info)  {
>         struct ena_adapter *adapter = netdev_priv(dev);
> -       struct ena_com_tx_ctx ena_tx_ctx = {0};
> +       struct ena_com_tx_ctx ena_tx_ctx = { };
>         struct ena_tx_buffer *tx_info;
>         struct ena_ring *xdp_ring;
>         u16 next_to_use, req_id;
> --
> 2.26.0


      reply	other threads:[~2020-04-30  7:19 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-04-28 21:51 [PATCH] net: ena: fix gcc-4.8 missing-braces warning Arnd Bergmann
2020-04-30  7:18 ` Jubran, Samih [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=03f3568ec8c646cdb7c767b16d19525a@EX13D11EUC003.ant.amazon.com \
    --to=sameehj@amazon.com \
    --cc=akiyano@amazon.com \
    --cc=arnd@arndb.de \
    --cc=ast@kernel.org \
    --cc=bpf@vger.kernel.org \
    --cc=daniel@iogearbox.net \
    --cc=davem@davemloft.net \
    --cc=gtzalik@amazon.com \
    --cc=hawk@kernel.org \
    --cc=john.fastabend@gmail.com \
    --cc=kuba@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=netanel@amazon.com \
    --cc=netdev@vger.kernel.org \
    --cc=saeedb@amazon.com \
    --cc=zorik@amazon.com \
    /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;
as well as URLs for NNTP newsgroup(s).