From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga02.intel.com (mga02.intel.com [134.134.136.20]) by dpdk.org (Postfix) with ESMTP id 198B0B71D for ; Fri, 20 Feb 2015 17:14:03 +0100 (CET) Received: from orsmga001.jf.intel.com ([10.7.209.18]) by orsmga101.jf.intel.com with ESMTP; 20 Feb 2015 08:14:03 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.09,615,1418112000"; d="scan'208";a="654875276" Received: from irvmail001.ir.intel.com ([163.33.26.43]) by orsmga001.jf.intel.com with ESMTP; 20 Feb 2015 08:13:54 -0800 Received: from sivswdev01.ir.intel.com (sivswdev01.ir.intel.com [10.237.217.45]) by irvmail001.ir.intel.com (8.14.3/8.13.6/MailSET/Hub) with ESMTP id t1KGDqB9021244; Fri, 20 Feb 2015 16:13:52 GMT Received: from sivswdev01.ir.intel.com (localhost [127.0.0.1]) by sivswdev01.ir.intel.com with ESMTP id t1KGDq1f006274; Fri, 20 Feb 2015 16:13:52 GMT Received: (from mtgajdzx@localhost) by sivswdev01.ir.intel.com with id t1KGDp6l006270; Fri, 20 Feb 2015 16:13:51 GMT From: Maciej Gajdzica To: dev@dpdk.org Date: Fri, 20 Feb 2015 16:13:44 +0000 Message-Id: <1424448824-6224-1-git-send-email-maciejx.t.gajdzica@intel.com> X-Mailer: git-send-email 1.7.4.1 Subject: [dpdk-dev] [PATCH] enic: fixed possible data loss in vnic_dev.h 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: Fri, 20 Feb 2015 16:14:04 -0000 In function writeq is written in two 32-bit long registers with writel function. When trying to write val >> 32, static code analysis tool reports that 64-bit value is passed to function expecting 32-bit value. Added cast to clear this warning. Signed-off-by: Maciej Gajdzica --- lib/librte_pmd_enic/vnic/vnic_dev.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/librte_pmd_enic/vnic/vnic_dev.h b/lib/librte_pmd_enic/vnic/vnic_dev.h index d1373a5..ca1174f 100644 --- a/lib/librte_pmd_enic/vnic/vnic_dev.h +++ b/lib/librte_pmd_enic/vnic/vnic_dev.h @@ -55,7 +55,7 @@ static inline u64 readq(void __iomem *reg) static inline void writeq(u64 val, void __iomem *reg) { writel(val & 0xffffffff, reg); - writel(val >> 32, (char *)reg + 0x4UL); + writel((u32)(val >> 32), (char *)reg + 0x4UL); } #endif -- 1.7.9.5