From: Kevin Laatz Date: Wed, 12 May 2021 10:47:46 +0000 (+0000) Subject: raw/ioat: fix parameter shadow warning X-Git-Url: http://git.droids-corp.org/?a=commitdiff_plain;h=5cf6947c95990067d8c980c85a01cb7c037f2dc5;p=dpdk.git raw/ioat: fix parameter shadow warning In the function __idxd_completed_ops() we have a parameter shadow warning due to a local variable having the same name as one of the function parameters. This issue is fixed by simply renaming the local variable. This warning was caught when additions were made to the OVS codebase, which include adding calls the IOAT APIs. The OVS build passes the -Wshadow flag by default, allowing the warning to be seen when building OVS with DPDK 21.05-rc2. Fixes: 245efe544d8e ("raw/ioat: report status of completed jobs") Reported-by: Sunil Pai G Signed-off-by: Kevin Laatz Tested-by: Sunil Pai G Acked-by: Bruce Richardson --- diff --git a/drivers/raw/ioat/rte_idxd_rawdev_fns.h b/drivers/raw/ioat/rte_idxd_rawdev_fns.h index 862e0eb41d..dbd8dfc507 100644 --- a/drivers/raw/ioat/rte_idxd_rawdev_fns.h +++ b/drivers/raw/ioat/rte_idxd_rawdev_fns.h @@ -301,11 +301,11 @@ __idxd_completed_ops(int dev_id, uint8_t max_ops, uint32_t *status, uint8_t *num uint16_t idx_to_chk = idxd->batch_idx_ring[idxd->batch_idx_read]; volatile struct rte_idxd_completion *comp_to_chk = (struct rte_idxd_completion *)&idxd->desc_ring[idx_to_chk]; - uint8_t status = comp_to_chk->status; - if (status == 0) + uint8_t batch_status = comp_to_chk->status; + if (batch_status == 0) break; comp_to_chk->status = 0; - if (unlikely(status > 1)) { + if (unlikely(batch_status > 1)) { /* error occurred somewhere in batch, start where last checked */ uint16_t desc_count = comp_to_chk->completed_size; uint16_t batch_start = idxd->hdls_avail;