From patchwork Fri Feb 20 16:13:33 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Maciej Gajdzica X-Patchwork-Id: 3560 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 20B6AB7CB; Fri, 20 Feb 2015 17:13:45 +0100 (CET) Received: from mga14.intel.com (mga14.intel.com [192.55.52.115]) by dpdk.org (Postfix) with ESMTP id 65227B787 for ; Fri, 20 Feb 2015 17:13:41 +0100 (CET) Received: from fmsmga002.fm.intel.com ([10.253.24.26]) by fmsmga103.fm.intel.com with ESMTP; 20 Feb 2015 08:05:58 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.09,615,1418112000"; d="scan'208";a="680933120" Received: from irvmail001.ir.intel.com ([163.33.26.43]) by fmsmga002.fm.intel.com with ESMTP; 20 Feb 2015 08:13:38 -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 t1KGDcuj021213; Fri, 20 Feb 2015 16:13:38 GMT Received: from sivswdev01.ir.intel.com (localhost [127.0.0.1]) by sivswdev01.ir.intel.com with ESMTP id t1KGDcHU006220; Fri, 20 Feb 2015 16:13:38 GMT Received: (from mtgajdzx@localhost) by sivswdev01.ir.intel.com with id t1KGDcFN006215; Fri, 20 Feb 2015 16:13:38 GMT From: Maciej Gajdzica To: dev@dpdk.org Date: Fri, 20 Feb 2015 16:13:33 +0000 Message-Id: <1424448813-6178-1-git-send-email-maciejx.t.gajdzica@intel.com> X-Mailer: git-send-email 1.7.4.1 Subject: [dpdk-dev] [PATCH] enic: Changed ENIC_ALIGN to unisgned long to prevent possible data loss 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" Define ENIC_ALIGN is used only by function rte_memzone_reserve_aligned, which expects argument of type unsigned. Defined constant is of type unsigned long long. Changed type to unsigned long to prevent possible loss of precision. Issue found with static code analysis tool. Signed-off-by: Maciej Gajdzica --- lib/librte_pmd_enic/enic_compat.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/librte_pmd_enic/enic_compat.h b/lib/librte_pmd_enic/enic_compat.h index b1af838..bf2f1af 100644 --- a/lib/librte_pmd_enic/enic_compat.h +++ b/lib/librte_pmd_enic/enic_compat.h @@ -42,7 +42,7 @@ #include #include -#define ENIC_PAGE_ALIGN 4096ULL +#define ENIC_PAGE_ALIGN 4096UL #define ENIC_ALIGN ENIC_PAGE_ALIGN #define NAME_MAX 255 #define ETH_ALEN 6