Re: [net-next v8 1/6] net: marvell: prestera: Add driver for Prestera family ASIC devices

From: Jakub Kicinski
Date: Thu Sep 10 2020 - 21:30:52 EST


On Thu, 10 Sep 2020 18:00:50 +0300 Vadym Kochan wrote:
> +static int prestera_sdma_tx_wait(struct prestera_sdma *sdma,
> + struct prestera_tx_ring *tx_ring)
> +{
> + int tx_wait_num = PRESTERA_SDMA_WAIT_MUL * tx_ring->max_burst;
> + bool is_ready;
> +
> + return read_poll_timeout_atomic(prestera_sdma_is_ready, is_ready, true,
> + 1, tx_wait_num, false, sdma);
> +}

This is strange and generates a warning:

drivers/net/ethernet/marvell/prestera/prestera_rxtx.c: In function ‘prestera_sdma_tx_wait’:
drivers/net/ethernet/marvell/prestera/prestera_rxtx.c:695:7: warning: variable ‘is_ready’ set but not used [-Wunused-but-set-variable]
695 | bool is_ready;
| ^~~~~~~~