From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.7 required=3.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_PATCH,MAILING_LIST_MULTI,SIGNED_OFF_BY,SPF_HELO_NONE,SPF_PASS, URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 1F2C0C31E4B for ; Fri, 14 Jun 2019 19:49:34 +0000 (UTC) Received: from dpdk.org (dpdk.org [92.243.14.124]) by mail.kernel.org (Postfix) with ESMTP id A5BE22183F for ; Fri, 14 Jun 2019 19:49:33 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org A5BE22183F Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=intel.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=dev-bounces@dpdk.org Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 88E4C1D5C6; Fri, 14 Jun 2019 21:49:32 +0200 (CEST) Received: from mga06.intel.com (mga06.intel.com [134.134.136.31]) by dpdk.org (Postfix) with ESMTP id B322D1D5C2 for ; Fri, 14 Jun 2019 21:49:31 +0200 (CEST) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga006.jf.intel.com ([10.7.209.51]) by orsmga104.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 14 Jun 2019 12:49:30 -0700 X-ExtLoop1: 1 Received: from fmsmsx108.amr.corp.intel.com ([10.18.124.206]) by orsmga006.jf.intel.com with ESMTP; 14 Jun 2019 12:49:30 -0700 Received: from fmsmsx157.amr.corp.intel.com (10.18.116.73) by FMSMSX108.amr.corp.intel.com (10.18.124.206) with Microsoft SMTP Server (TLS) id 14.3.408.0; Fri, 14 Jun 2019 12:49:30 -0700 Received: from fmsmsx108.amr.corp.intel.com ([169.254.9.74]) by FMSMSX157.amr.corp.intel.com ([169.254.14.229]) with mapi id 14.03.0415.000; Fri, 14 Jun 2019 12:49:30 -0700 From: "Eads, Gage" To: Phil Yang , "dev@dpdk.org" CC: "nd@arm.com" , "honnappa.nagarahalli@arm.com" , "gavin.hu@arm.com" Thread-Topic: [PATCH] eal/stack: fix 'pointer-sign' warning Thread-Index: AQHVItHkfMMsbzIBJ0euVWVttish/aabjb0A Date: Fri, 14 Jun 2019 19:49:30 +0000 Message-ID: <9184057F7FC11744A2107296B6B8EB1E68CED6A0@FMSMSX108.amr.corp.intel.com> References: <1560531283-5229-1-git-send-email-phil.yang@arm.com> In-Reply-To: <1560531283-5229-1-git-send-email-phil.yang@arm.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-titus-metadata-40: eyJDYXRlZ29yeUxhYmVscyI6IiIsIk1ldGFkYXRhIjp7Im5zIjoiaHR0cDpcL1wvd3d3LnRpdHVzLmNvbVwvbnNcL0ludGVsMyIsImlkIjoiNzBjMDc4MmEtOTg2ZS00YzYwLWE0ZDItMjllNmU4MGUxMjhkIiwicHJvcHMiOlt7Im4iOiJDVFBDbGFzc2lmaWNhdGlvbiIsInZhbHMiOlt7InZhbHVlIjoiQ1RQX05UIn1dfV19LCJTdWJqZWN0TGFiZWxzIjpbXSwiVE1DVmVyc2lvbiI6IjE3LjEwLjE4MDQuNDkiLCJUcnVzdGVkTGFiZWxIYXNoIjoiUmtkQUEycmZCZFwveTlEaFBYYmZMR3hLRTJhN0hSZzNEazE4dTBqMGUrNGhoSTlcLzJoYWxZODVpbXJyTzQrSmdBIn0= x-ctpclassification: CTP_NT dlp-product: dlpe-windows dlp-version: 11.0.600.7 dlp-reaction: no-action x-originating-ip: [10.1.200.108] Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Subject: Re: [dpdk-dev] [PATCH] eal/stack: fix 'pointer-sign' 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" > clang raise 'pointer-sign' warnings in __atomic_compare_exchange when > passing 'uint64_t *' to parameter of type 'int64_t *' converts between > pointers to integer types with different sign. >=20 > Fixes: 7e6e609939a8 ("stack: add C11 atomic implementation") >=20 > Signed-off-by: Phil Yang > Reviewed-by: Honnappa Nagarahalli >=20 > --- > lib/librte_stack/rte_stack_lf_c11.h | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) >=20 > diff --git a/lib/librte_stack/rte_stack_lf_c11.h > b/lib/librte_stack/rte_stack_lf_c11.h > index a316e9a..e3b9eff 100644 > --- a/lib/librte_stack/rte_stack_lf_c11.h > +++ b/lib/librte_stack/rte_stack_lf_c11.h > @@ -97,7 +97,7 @@ __rte_stack_lf_pop_elems(struct rte_stack_lf_list *list= , > return NULL; > #else > struct rte_stack_lf_head old_head; > - uint64_t len; > + int64_t len; This works, but I'd prefer to keep 'len' unsigned. How about changing the d= efinition of 'len' in struct rte_stack_lf_list to uint64_t, and in rte_stac= k_lf_generic.h casting it to rte_atomic64_t* when its address is passed to = the rte_atomic64_...() functions?