From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from dpdk.org (dpdk.org [92.243.14.124]) by dpdk.space (Postfix) with ESMTP id BA6D8A0471 for ; Mon, 17 Jun 2019 09:49:18 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 773C11BE02; Mon, 17 Jun 2019 09:49:18 +0200 (CEST) Received: from EUR03-DB5-obe.outbound.protection.outlook.com (mail-eopbgr40063.outbound.protection.outlook.com [40.107.4.63]) by dpdk.org (Postfix) with ESMTP id 1ECAC1BDBD for ; Mon, 17 Jun 2019 09:49:17 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=armh.onmicrosoft.com; s=selector2-armh-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=C2Nyk6//S2LTPI5vo+0v5VqWC5dWhQW6MmC6qOJELAU=; b=yUe2mb6EQb0p+pAmDT4Y7XoXkeDW2kf6qOxhynYpT+oErzHAFgWV8ZeztFpA2NBUJBYMk6sSatxB+Niklt6mkgw9smaXdzqWnl9Ved/AeoyHIUos8WAsGuwNba0iDo9l+6swz1kYT+xW24qHd4tlnEQWZ6R4tQ+6Vt0UaFuJEAg= Received: from VE1PR08MB4640.eurprd08.prod.outlook.com (10.255.27.75) by VE1PR08MB4861.eurprd08.prod.outlook.com (10.255.113.139) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.1987.12; Mon, 17 Jun 2019 07:49:15 +0000 Received: from VE1PR08MB4640.eurprd08.prod.outlook.com ([fe80::8553:e059:25a2:d0ab]) by VE1PR08MB4640.eurprd08.prod.outlook.com ([fe80::8553:e059:25a2:d0ab%6]) with mapi id 15.20.1987.014; Mon, 17 Jun 2019 07:49:15 +0000 From: "Phil Yang (Arm Technology China)" To: "Eads, Gage" , "dev@dpdk.org" CC: nd , Honnappa Nagarahalli , "Gavin Hu (Arm Technology China)" , nd Thread-Topic: [PATCH] eal/stack: fix 'pointer-sign' warning Thread-Index: AQHVItHk2Qs6QRxmW0S05GuMZ3pIVaabjusAgAPrwTA= Date: Mon, 17 Jun 2019 07:49:15 +0000 Message-ID: References: <1560531283-5229-1-git-send-email-phil.yang@arm.com> <9184057F7FC11744A2107296B6B8EB1E68CED6A0@FMSMSX108.amr.corp.intel.com> In-Reply-To: <9184057F7FC11744A2107296B6B8EB1E68CED6A0@FMSMSX108.amr.corp.intel.com> Accept-Language: zh-CN, en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-ts-tracking-id: 43fa7ed9-4db9-49b7-80a9-8bfe7d23f75f.1 x-checkrecipientchecked: true authentication-results: spf=none (sender IP is ) smtp.mailfrom=Phil.Yang@arm.com; x-originating-ip: [113.29.88.7] x-ms-publictraffictype: Email x-ms-office365-filtering-correlation-id: 2b2f522c-4c96-4681-5f4a-08d6f2f84bd3 x-ms-office365-filtering-ht: Tenant x-microsoft-antispam: BCL:0; PCL:0; RULEID:(2390118)(7020095)(4652040)(8989299)(4534185)(7168020)(4627221)(201703031133081)(201702281549075)(8990200)(5600148)(711020)(4605104)(1401327)(4618075)(2017052603328)(7193020); SRVR:VE1PR08MB4861; x-ms-traffictypediagnostic: VE1PR08MB4861: nodisclaimer: True x-microsoft-antispam-prvs: x-ms-oob-tlc-oobclassifiers: OLM:3826; x-forefront-prvs: 0071BFA85B x-forefront-antispam-report: SFV:NSPM; SFS:(10009020)(136003)(396003)(376002)(346002)(39850400004)(366004)(199004)(189003)(13464003)(73956011)(66066001)(446003)(71190400001)(11346002)(186003)(229853002)(71200400001)(9686003)(26005)(55016002)(476003)(6116002)(3846002)(68736007)(6436002)(53936002)(52536014)(14454004)(486006)(33656002)(110136005)(54906003)(4326008)(8936002)(6506007)(53546011)(478600001)(5660300002)(102836004)(86362001)(14444005)(76116006)(81166006)(2501003)(305945005)(6246003)(76176011)(256004)(99286004)(81156014)(72206003)(74316002)(66446008)(7736002)(316002)(7696005)(66946007)(66556008)(66476007)(8676002)(64756008)(2906002)(55236004)(25786009); DIR:OUT; SFP:1101; SCL:1; SRVR:VE1PR08MB4861; H:VE1PR08MB4640.eurprd08.prod.outlook.com; FPR:; SPF:None; LANG:en; PTR:InfoNoRecords; A:1; MX:1; received-spf: None (protection.outlook.com: arm.com does not designate permitted sender hosts) x-ms-exchange-senderadcheck: 1 x-microsoft-antispam-message-info: Suk2LbapwvVwD6pCvXP0RlF7ojBTt8UGvVdm6YdjkJ/Vn424nGUfsAUKerTYMGyLyAD1GDnQ0tPoEDOpHD0CYpexJsLzJURvtjBk2XW7p9BTCqXmxFHCZ8ehOFoUvuM6JvykurC5rL7/nGLlFS9eqdlyl6ZqW3/clcaywgWBJzmfQMCIQfBnlhhLRWvW4VxWYfTCK6ZTk4gzsHT9tFbKSBK3fx90PGMi51yXrYnFGRQ7SBejyTcUFU/R46H77dVupUgTD+dBIBOxeUQoJzu0Gwjo0kA5BgnSphYJto13GjXtQuUfevC5WtijtQQTCVJgk/xvF9gqubXotdXLLmpg1ApFxkgFFgFQm2NXj00sBWWTS2tXgycD/W9PlNFmmMQ+LlYTNzASFD6Z7t+NCPYKbqCanXN1hpYQzgTrhooSwhg= Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-OriginatorOrg: arm.com X-MS-Exchange-CrossTenant-Network-Message-Id: 2b2f522c-4c96-4681-5f4a-08d6f2f84bd3 X-MS-Exchange-CrossTenant-originalarrivaltime: 17 Jun 2019 07:49:15.5909 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: f34e5979-57d9-4aaa-ad4d-b122a662184d X-MS-Exchange-CrossTenant-mailboxtype: HOSTED X-MS-Exchange-CrossTenant-userprincipalname: Phil.Yang@arm.com X-MS-Exchange-Transport-CrossTenantHeadersStamped: VE1PR08MB4861 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" > -----Original Message----- > From: Eads, Gage > Sent: Saturday, June 15, 2019 3:50 AM > To: Phil Yang (Arm Technology China) ; dev@dpdk.org > Cc: nd ; Honnappa Nagarahalli > ; Gavin Hu (Arm Technology China) > > Subject: RE: [PATCH] eal/stack: fix 'pointer-sign' warning >=20 > > 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. > > > > Fixes: 7e6e609939a8 ("stack: add C11 atomic implementation") > > > > Signed-off-by: Phil Yang > > Reviewed-by: Honnappa Nagarahalli > > > > --- > > lib/librte_stack/rte_stack_lf_c11.h | 2 +- > > 1 file changed, 1 insertion(+), 1 deletion(-) > > > > 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; >=20 > This works, but I'd prefer to keep 'len' unsigned. How about changing the > definition of 'len' in struct rte_stack_lf_list to uint64_t, and in > rte_stack_lf_generic.h casting it to rte_atomic64_t* when its address is > passed to the rte_atomic64_...() functions? It is better I think. I have upstreamed the v2, please review it.=20 Thanks, Phil