From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id 662B2A0C43; Wed, 12 May 2021 12:47:55 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id DDE4A4003F; Wed, 12 May 2021 12:47:54 +0200 (CEST) Received: from mga03.intel.com (mga03.intel.com [134.134.136.65]) by mails.dpdk.org (Postfix) with ESMTP id 301A54003E for ; Wed, 12 May 2021 12:47:53 +0200 (CEST) IronPort-SDR: LAyXCuHEt5Z5nS8F+oSb5gL6B3wTWXHrSH1dZ6K6IdggUOBtPG0T1Gt2TiilmjLZSCHiamLgAS JNfBdde7AV0A== X-IronPort-AV: E=McAfee;i="6200,9189,9981"; a="199725097" X-IronPort-AV: E=Sophos;i="5.82,293,1613462400"; d="scan'208";a="199725097" Received: from orsmga005.jf.intel.com ([10.7.209.41]) by orsmga103.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 12 May 2021 03:47:50 -0700 IronPort-SDR: 5/1rsx5s7SOlCgJU3vi9qh6SCqqY2sDcGWT3b4mdelrLsasDKy2+BLN0txml1jTe2dgi9ohULt wDjsJB0NOzBA== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.82,293,1613462400"; d="scan'208";a="609873868" Received: from silpixa00401026.ir.intel.com ([10.243.23.108]) by orsmga005.jf.intel.com with ESMTP; 12 May 2021 03:47:48 -0700 From: Kevin Laatz To: dev@dpdk.org Cc: bruce.richardson@intel.com, thomas@monjalon.net, david.marchand@redhat.com, Kevin Laatz , Sunil Pai G Date: Wed, 12 May 2021 10:47:46 +0000 Message-Id: <20210512104746.247453-1-kevin.laatz@intel.com> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20210510125514.12914-1-kevin.laatz@intel.com> References: <20210510125514.12914-1-kevin.laatz@intel.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Subject: [dpdk-dev] [PATCH v3] raw/ioat: fix parameter shadow warning X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" 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 --- v2: add details of warning discovery v3: commit log update --- 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