All of lore.kernel.org
 help / color / mirror / Atom feed
From: Kevin Laatz <kevin.laatz@intel.com>
To: dev@dpdk.org
Cc: bruce.richardson@intel.com, Kevin Laatz <kevin.laatz@intel.com>,
	Sunil Pai G <sunil.pai.g@intel.com>
Subject: [dpdk-dev] [PATCH] raw/ioat: fix parameter shadow warning
Date: Fri,  7 May 2021 17:20:25 +0000	[thread overview]
Message-ID: <20210507172025.181720-1-kevin.laatz@intel.com> (raw)

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 is fixed by simply renaming the local variable.

Fixes: 245efe544d8e ("raw/ioat: report status of completed jobs")

Reported-by: Sunil Pai G <sunil.pai.g@intel.com>
Signed-off-by: Kevin Laatz <kevin.laatz@intel.com>
---
 drivers/raw/ioat/rte_idxd_rawdev_fns.h | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

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;
-- 
2.30.2


             reply	other threads:[~2021-05-07 17:20 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-05-07 17:20 Kevin Laatz [this message]
2021-05-08  7:25 ` Pai G, Sunil
2021-05-10  9:02 ` Bruce Richardson
2021-05-10 11:07   ` Laatz, Kevin
2021-05-10 12:55 ` [dpdk-dev] [PATCH v2] " Kevin Laatz
2021-05-10 13:36   ` Bruce Richardson
2021-05-10 14:06   ` David Marchand
2021-05-10 14:48     ` Bruce Richardson
2021-05-11 20:49       ` Thomas Monjalon
2021-05-12 10:47   ` [dpdk-dev] [PATCH v3] " Kevin Laatz
2021-05-12 12:59     ` Thomas Monjalon

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20210507172025.181720-1-kevin.laatz@intel.com \
    --to=kevin.laatz@intel.com \
    --cc=bruce.richardson@intel.com \
    --cc=dev@dpdk.org \
    --cc=sunil.pai.g@intel.com \
    --subject='Re: [dpdk-dev] [PATCH] raw/ioat: fix parameter shadow warning' \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.