[3/7] drivers/common/qat: fix unused but set variables

Message ID 20211112140111.922171-4-conor.walsh@intel.com (mailing list archive)
State Superseded, archived
Delegated to: David Marchand
Headers
Series fix unused but set variables |

Checks

Context Check Description
ci/checkpatch success coding style OK

Commit Message

Conor Walsh Nov. 12, 2021, 2:01 p.m. UTC
  This patch removes the us variable from the qat_pf2vf_exch_msg function
within the PF to VF section of the QAT driver as it is an unused but set
variable.

Bugzilla ID: 881

Fixes: b17d16fb47b4 ("common/qat: add PF to VF communication")

Signed-off-by: Conor Walsh <conor.walsh@intel.com>
Reported-by: Liang Longfeng <longfengx.liang@intel.com>
---
 drivers/common/qat/qat_pf2vf.c | 2 --
 1 file changed, 2 deletions(-)
  

Patch

diff --git a/drivers/common/qat/qat_pf2vf.c b/drivers/common/qat/qat_pf2vf.c
index 6327311199..4e9ffc72fc 100644
--- a/drivers/common/qat/qat_pf2vf.c
+++ b/drivers/common/qat/qat_pf2vf.c
@@ -54,14 +54,12 @@  int qat_pf2vf_exch_msg(struct qat_pci_device *qat_dev,
 		msg |= ADF_PFVF_INT | ADF_PFVF_MSGORIGIN_SYSTEM;
 
 		ADF_CSR_WR(pmisc_bar_addr, vf_csr_off, msg);
-		int us = 0;
 		/*
 		 * Wait for confirmation from remote that it received
 		 * the message
 		 */
 		do {
 			rte_delay_us_sleep(5);
-			us += 5;
 			val = ADF_CSR_RD(pmisc_bar_addr, vf_csr_off);
 		} while ((val & ADF_PFVF_INT) &&
 			(++count < ADF_IOV_MSG_ACK_MAX_RETRY));