[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <64328693e17744688e90e49cecd11aeb@EX13D11EUB003.ant.amazon.com>
Date: Tue, 24 Dec 2019 12:56:32 +0000
From: "Jubran, Samih" <sameehj@...zon.com>
To: YueHaibing <yuehaibing@...wei.com>,
"davem@...emloft.net" <davem@...emloft.net>
CC: "netdev@...r.kernel.org" <netdev@...r.kernel.org>,
"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>
Subject: RE: [PATCH net-next] net: ena: remove set but not used variable
'rx_ring'
Good catch, looks good.
Ack, thanks!
> -----Original Message-----
> From: YueHaibing <yuehaibing@...wei.com>
> Sent: Tuesday, December 24, 2019 2:51 PM
> To: davem@...emloft.net; Jubran, Samih <sameehj@...zon.com>
> Cc: netdev@...r.kernel.org; linux-kernel@...r.kernel.org; YueHaibing
> <yuehaibing@...wei.com>
> Subject: [PATCH net-next] net: ena: remove set but not used variable
> 'rx_ring'
>
> drivers/net/ethernet/amazon/ena/ena_netdev.c: In function
> ena_xdp_xmit_buff:
> drivers/net/ethernet/amazon/ena/ena_netdev.c:316:19: warning:
> variable rx_ring set but not used [-Wunused-but-set-variable]
>
> commit 548c4940b9f1 ("net: ena: Implement XDP_TX action") left behind this
> unused variable.
>
> Reported-by: Hulk Robot <hulkci@...wei.com>
> Signed-off-by: YueHaibing <yuehaibing@...wei.com>
> ---
> drivers/net/ethernet/amazon/ena/ena_netdev.c | 3 ---
> 1 file changed, 3 deletions(-)
>
> diff --git a/drivers/net/ethernet/amazon/ena/ena_netdev.c
> b/drivers/net/ethernet/amazon/ena/ena_netdev.c
> index 081acf0..894e8c1 100644
> --- a/drivers/net/ethernet/amazon/ena/ena_netdev.c
> +++ b/drivers/net/ethernet/amazon/ena/ena_netdev.c
> @@ -313,7 +313,6 @@ static int ena_xdp_xmit_buff(struct net_device *dev,
> struct ena_com_tx_ctx ena_tx_ctx = {0};
> struct ena_tx_buffer *tx_info;
> struct ena_ring *xdp_ring;
> - struct ena_ring *rx_ring;
> u16 next_to_use, req_id;
> int rc;
> void *push_hdr;
> @@ -324,8 +323,6 @@ static int ena_xdp_xmit_buff(struct net_device *dev,
> req_id = xdp_ring->free_ids[next_to_use];
> tx_info = &xdp_ring->tx_buffer_info[req_id];
> tx_info->num_of_bufs = 0;
> - rx_ring = &xdp_ring->adapter->rx_ring[qid -
> - xdp_ring->adapter->xdp_first_ring];
> page_ref_inc(rx_info->page);
> tx_info->xdp_rx_page = rx_info->page;
>
> --
> 2.7.4
>
Powered by blists - more mailing lists