From patchwork Fri Sep 11 13:19:22 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Qi Zhang X-Patchwork-Id: 77395 Return-Path: X-Original-To: patchwork@inbox.dpdk.org Delivered-To: patchwork@inbox.dpdk.org Received: from dpdk.org (dpdk.org [92.243.14.124]) by inbox.dpdk.org (Postfix) with ESMTP id 39027A04B7; Fri, 11 Sep 2020 15:17:36 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id CD9641C139; Fri, 11 Sep 2020 15:16:18 +0200 (CEST) Received: from mga18.intel.com (mga18.intel.com [134.134.136.126]) by dpdk.org (Postfix) with ESMTP id 43F941C11E for ; Fri, 11 Sep 2020 15:16:12 +0200 (CEST) IronPort-SDR: 0DZwXd+ystwWoiKdSzd05WmvP42RxyM6UB6RUiOyN0YwBzbXI9pO7DrSpT4LuXgt0LMrXWSznt TEve4U3mMZxA== X-IronPort-AV: E=McAfee;i="6000,8403,9740"; a="146482159" X-IronPort-AV: E=Sophos;i="5.76,415,1592895600"; d="scan'208";a="146482159" X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga003.fm.intel.com ([10.253.24.29]) by orsmga106.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 11 Sep 2020 06:16:11 -0700 IronPort-SDR: cOwfTw+5GhZnag+C0vjY9znl/FlGqFXJ8K5fltHXHEv4GtRsADsLyFYRhcVKE6MFCMUnqFeDb4 oRo4Vm+ZiTuw== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.76,415,1592895600"; d="scan'208";a="342296492" Received: from dpdk51.sh.intel.com ([10.67.111.82]) by FMSMGA003.fm.intel.com with ESMTP; 11 Sep 2020 06:16:10 -0700 From: Qi Zhang To: ferruh.yigit@intel.com Cc: dev@dpdk.org, Qi Zhang , Bruce Allan Date: Fri, 11 Sep 2020 21:19:22 +0800 Message-Id: <20200911131954.15999-9-qi.z.zhang@intel.com> X-Mailer: git-send-email 2.13.6 In-Reply-To: <20200911131954.15999-1-qi.z.zhang@intel.com> References: <20200907112826.48493-1-qi.z.zhang@intel.com> <20200911131954.15999-1-qi.z.zhang@intel.com> Subject: [dpdk-dev] [PATCH v2 08/40] net/ice/base: silence static analysis warning X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 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" Sparse warns about these casts to/from restricted types which are not actual problems; silence the warnings. Signed-off-by: Bruce Allan Signed-off-by: Qi Zhang Acked-by: Qiming Yang --- drivers/net/ice/base/ice_nvm.c | 2 +- drivers/net/ice/base/ice_switch.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/net/ice/base/ice_nvm.c b/drivers/net/ice/base/ice_nvm.c index 2befe68d7..22d7d9439 100644 --- a/drivers/net/ice/base/ice_nvm.c +++ b/drivers/net/ice/base/ice_nvm.c @@ -138,7 +138,7 @@ ice_read_sr_word_aq(struct ice_hw *hw, u16 offset, u16 *data) * boundary */ status = ice_read_flat_nvm(hw, offset * sizeof(u16), &bytes, - (u8 *)&data_local, true); + (_FORCE_ u8 *)&data_local, true); if (status) return status; diff --git a/drivers/net/ice/base/ice_switch.c b/drivers/net/ice/base/ice_switch.c index e0eebe3d5..875922459 100644 --- a/drivers/net/ice/base/ice_switch.c +++ b/drivers/net/ice/base/ice_switch.c @@ -5774,7 +5774,7 @@ ice_fill_valid_words(struct ice_adv_lkup_elem *rule, lkup_exts->fv_words[word].prot_id = ice_prot_id_tbl[rule->type].protocol_id; lkup_exts->field_mask[word] = - BE16_TO_CPU(((__be16 *)&rule->m_u)[j]); + BE16_TO_CPU(((_FORCE_ __be16 *)&rule->m_u)[j]); word++; }