From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga14.intel.com (mga14.intel.com [192.55.52.115]) by dpdk.org (Postfix) with ESMTP id 266D1AFD1 for ; Wed, 17 Sep 2014 09:48:57 +0200 (CEST) Received: from fmsmga001.fm.intel.com ([10.253.24.23]) by fmsmga103.fm.intel.com with ESMTP; 17 Sep 2014 00:45:38 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.04,539,1406617200"; d="scan'208";a="592481929" Received: from shvmail01.sh.intel.com ([10.239.29.42]) by fmsmga001.fm.intel.com with ESMTP; 17 Sep 2014 00:54:28 -0700 Received: from shecgisg004.sh.intel.com (shecgisg004.sh.intel.com [10.239.29.89]) by shvmail01.sh.intel.com with ESMTP id s8H7sQ4k024656; Wed, 17 Sep 2014 15:54:26 +0800 Received: from shecgisg004.sh.intel.com (localhost [127.0.0.1]) by shecgisg004.sh.intel.com (8.13.6/8.13.6/SuSE Linux 0.8) with ESMTP id s8H7sOKK017552; Wed, 17 Sep 2014 15:54:26 +0800 Received: (from hzhan75@localhost) by shecgisg004.sh.intel.com (8.13.6/8.13.6/Submit) id s8H7sOWc017548; Wed, 17 Sep 2014 15:54:24 +0800 From: Helin Zhang To: dev@dpdk.org Date: Wed, 17 Sep 2014 15:54:19 +0800 Message-Id: <1410940461-17509-2-git-send-email-helin.zhang@intel.com> X-Mailer: git-send-email 1.7.4.1 In-Reply-To: <1410940461-17509-1-git-send-email-helin.zhang@intel.com> References: <1410940461-17509-1-git-send-email-helin.zhang@intel.com> Subject: [dpdk-dev] [PATCH 1/3] i40e: renaming some local variables X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: patches and discussions about DPDK List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 17 Sep 2014 07:48:58 -0000 To be more straightforward, two local variables in interrupt handler are renamed. Signed-off-by: Helin Zhang Reviewed-by: Jing Chen Reviewed-by: Jijiang Liu --- lib/librte_pmd_i40e/i40e_ethdev.c | 26 +++++++++++++------------- 1 file changed, 13 insertions(+), 13 deletions(-) diff --git a/lib/librte_pmd_i40e/i40e_ethdev.c b/lib/librte_pmd_i40e/i40e_ethdev.c index 4e65ca4..003b084 100644 --- a/lib/librte_pmd_i40e/i40e_ethdev.c +++ b/lib/librte_pmd_i40e/i40e_ethdev.c @@ -3391,53 +3391,53 @@ i40e_dev_interrupt_handler(__rte_unused struct rte_intr_handle *handle, { struct rte_eth_dev *dev = (struct rte_eth_dev *)param; struct i40e_hw *hw = I40E_DEV_PRIVATE_TO_HW(dev->data->dev_private); - uint32_t cause, enable; + uint32_t icr0, icr0_ena; i40e_pf_disable_irq0(hw); - cause = I40E_READ_REG(hw, I40E_PFINT_ICR0); - enable = I40E_READ_REG(hw, I40E_PFINT_ICR0_ENA); + icr0 = I40E_READ_REG(hw, I40E_PFINT_ICR0); + icr0_ena = I40E_READ_REG(hw, I40E_PFINT_ICR0_ENA); /* Shared IRQ case, return */ - if (!(cause & I40E_PFINT_ICR0_INTEVENT_MASK)) { + if (!(icr0 & I40E_PFINT_ICR0_INTEVENT_MASK)) { PMD_DRV_LOG(INFO, "Port%d INT0:share IRQ case, " "no INT event to process\n", hw->pf_id); goto done; } - if (cause & I40E_PFINT_ICR0_LINK_STAT_CHANGE_MASK) { + if (icr0 & I40E_PFINT_ICR0_LINK_STAT_CHANGE_MASK) { PMD_DRV_LOG(INFO, "INT:Link status changed\n"); i40e_dev_link_update(dev, 0); } - if (cause & I40E_PFINT_ICR0_ECC_ERR_MASK) + if (icr0 & I40E_PFINT_ICR0_ECC_ERR_MASK) PMD_DRV_LOG(INFO, "INT:Unrecoverable ECC Error\n"); - if (cause & I40E_PFINT_ICR0_MAL_DETECT_MASK) + if (icr0 & I40E_PFINT_ICR0_MAL_DETECT_MASK) PMD_DRV_LOG(INFO, "INT:Malicious programming detected\n"); - if (cause & I40E_PFINT_ICR0_GRST_MASK) + if (icr0 & I40E_PFINT_ICR0_GRST_MASK) PMD_DRV_LOG(INFO, "INT:Global Resets Requested\n"); - if (cause & I40E_PFINT_ICR0_PCI_EXCEPTION_MASK) + if (icr0 & I40E_PFINT_ICR0_PCI_EXCEPTION_MASK) PMD_DRV_LOG(INFO, "INT:PCI EXCEPTION occured\n"); - if (cause & I40E_PFINT_ICR0_HMC_ERR_MASK) + if (icr0 & I40E_PFINT_ICR0_HMC_ERR_MASK) PMD_DRV_LOG(INFO, "INT:HMC error occured\n"); /* Add processing func to deal with VF reset vent */ - if (cause & I40E_PFINT_ICR0_VFLR_MASK) { + if (icr0 & I40E_PFINT_ICR0_VFLR_MASK) { PMD_DRV_LOG(INFO, "INT:VF reset detected\n"); i40e_dev_handle_vfr_event(dev); } /* Find admin queue event */ - if (cause & I40E_PFINT_ICR0_ADMINQ_MASK) { + if (icr0 & I40E_PFINT_ICR0_ADMINQ_MASK) { PMD_DRV_LOG(INFO, "INT:ADMINQ event\n"); i40e_dev_handle_aq_msg(dev); } done: - I40E_WRITE_REG(hw, I40E_PFINT_ICR0_ENA, enable); + I40E_WRITE_REG(hw, I40E_PFINT_ICR0_ENA, icr0_ena); /* Re-enable interrupt from device side */ i40e_pf_enable_irq0(hw); /* Re-enable interrupt from host side */ -- 1.8.1.4