lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <20200428215131.3948527-1-arnd@arndb.de>
Date:   Tue, 28 Apr 2020 23:51:25 +0200
From:   Arnd Bergmann <arnd@...db.de>
To:     Netanel Belgazal <netanel@...zon.com>,
        Arthur Kiyanovski <akiyano@...zon.com>,
        "David S. Miller" <davem@...emloft.net>,
        Alexei Starovoitov <ast@...nel.org>,
        Daniel Borkmann <daniel@...earbox.net>,
        Jakub Kicinski <kuba@...nel.org>,
        Jesper Dangaard Brouer <hawk@...nel.org>,
        John Fastabend <john.fastabend@...il.com>,
        Sameeh Jubran <sameehj@...zon.com>
Cc:     Arnd Bergmann <arnd@...db.de>, Guy Tzalik <gtzalik@...zon.com>,
        Saeed Bishara <saeedb@...zon.com>,
        Zorik Machulsky <zorik@...zon.com>, netdev@...r.kernel.org,
        linux-kernel@...r.kernel.org, bpf@...r.kernel.org
Subject: [PATCH] net: ena: fix gcc-4.8 missing-braces warning

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")
Signed-off-by: Arnd Bergmann <arnd@...db.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

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ