From patchwork Mon Jul 27 08:42:37 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Xiao Wang X-Patchwork-Id: 6616 Return-Path: X-Original-To: patchwork@dpdk.org Delivered-To: patchwork@dpdk.org Received: from [92.243.14.124] (localhost [IPv6:::1]) by dpdk.org (Postfix) with ESMTP id 94898C572; Mon, 27 Jul 2015 10:43:22 +0200 (CEST) Received: from mga03.intel.com (mga03.intel.com [134.134.136.65]) by dpdk.org (Postfix) with ESMTP id 84A74C566 for ; Mon, 27 Jul 2015 10:43:20 +0200 (CEST) Received: from fmsmga003.fm.intel.com ([10.253.24.29]) by orsmga103.jf.intel.com with ESMTP; 27 Jul 2015 01:43:20 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.15,552,1432623600"; d="scan'208";a="530717519" Received: from shvmail01.sh.intel.com ([10.239.29.42]) by FMSMGA003.fm.intel.com with ESMTP; 27 Jul 2015 01:43:18 -0700 Received: from shecgisg004.sh.intel.com (shecgisg004.sh.intel.com [10.239.29.89]) by shvmail01.sh.intel.com with ESMTP id t6R8hGgg023369; Mon, 27 Jul 2015 16:43:16 +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 t6R8hDqV031146; Mon, 27 Jul 2015 16:43:15 +0800 Received: (from xiaowan1@localhost) by shecgisg004.sh.intel.com (8.13.6/8.13.6/Submit) id t6R8hCM8031142; Mon, 27 Jul 2015 16:43:12 +0800 From: Wang Xiao W To: dev@dpdk.org Date: Mon, 27 Jul 2015 16:42:37 +0800 Message-Id: <1437986559-31016-14-git-send-email-xiao.w.wang@intel.com> X-Mailer: git-send-email 1.7.4.1 In-Reply-To: <1437986559-31016-1-git-send-email-xiao.w.wang@intel.com> References: <1437986559-31016-1-git-send-email-xiao.w.wang@intel.com> Cc: Wang Xiao W Subject: [dpdk-dev] [PATCH 14/16] fm10k: remove err_no reference 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: , Errors-To: dev-bounces@dpdk.org Sender: "dev" The reference to err_no was left around after an old re-factor. We never use this value again, and the macros called on the function appear to have no relevant side effect I could see. Discovered via cppcheck fm10k_mbx.c:1312: (style) Variable 'err_no' is assigned a value that is never used. This occurred because a previous commit refactored and removed all used references to err_no. Signed-off-by: Wang Xiao W --- drivers/net/fm10k/base/fm10k_mbx.c | 5 ----- 1 file changed, 5 deletions(-) diff --git a/drivers/net/fm10k/base/fm10k_mbx.c b/drivers/net/fm10k/base/fm10k_mbx.c index 0cdd24d..ad9d81a 100644 --- a/drivers/net/fm10k/base/fm10k_mbx.c +++ b/drivers/net/fm10k/base/fm10k_mbx.c @@ -1292,16 +1292,11 @@ STATIC s32 fm10k_mbx_process_error(struct fm10k_hw *hw, struct fm10k_mbx_info *mbx) { const u32 *hdr = &mbx->mbx_hdr; - s32 err_no; u16 head; /* we will need to pull all of the fields for verification */ head = FM10K_MSG_HDR_FIELD_GET(*hdr, HEAD); - /* we only have lower 10 bits of error number so add upper bits */ - err_no = FM10K_MSG_HDR_FIELD_GET(*hdr, ERR_NO); - err_no |= ~FM10K_MSG_HDR_MASK(ERR_NO); - switch (mbx->state) { case FM10K_STATE_OPEN: case FM10K_STATE_DISCONNECT: