From: "Phil Yang (Arm Technology China)" <Phil.Yang@arm.com>
To: "Eads, Gage" <gage.eads@intel.com>, "dev@dpdk.org" <dev@dpdk.org>
Cc: nd <nd@arm.com>,
Honnappa Nagarahalli <Honnappa.Nagarahalli@arm.com>,
"Gavin Hu (Arm Technology China)" <Gavin.Hu@arm.com>,
nd <nd@arm.com>
Subject: Re: [dpdk-dev] [PATCH] eal/stack: fix 'pointer-sign' warning
Date: Mon, 17 Jun 2019 07:49:15 +0000 [thread overview]
Message-ID: <VE1PR08MB4640592A4D60562979F63D78E9EB0@VE1PR08MB4640.eurprd08.prod.outlook.com> (raw)
In-Reply-To: <9184057F7FC11744A2107296B6B8EB1E68CED6A0@FMSMSX108.amr.corp.intel.com>
> -----Original Message-----
> From: Eads, Gage <gage.eads@intel.com>
> Sent: Saturday, June 15, 2019 3:50 AM
> To: Phil Yang (Arm Technology China) <Phil.Yang@arm.com>; dev@dpdk.org
> Cc: nd <nd@arm.com>; Honnappa Nagarahalli
> <Honnappa.Nagarahalli@arm.com>; Gavin Hu (Arm Technology China)
> <Gavin.Hu@arm.com>
> Subject: RE: [PATCH] eal/stack: fix 'pointer-sign' warning
>
> > 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 <phil.yang@arm.com>
> > Reviewed-by: Honnappa Nagarahalli <honnappa.nagarahalli@arm.com>
> >
> > ---
> > 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;
>
> 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.
Thanks,
Phil
next prev parent reply other threads:[~2019-06-17 7:49 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-06-14 16:54 Phil Yang
2019-06-14 19:49 ` Eads, Gage
2019-06-17 7:49 ` Phil Yang (Arm Technology China) [this message]
2019-06-17 7:41 ` [dpdk-dev] [PATCH v2] " Phil Yang
2019-06-18 15:43 ` Eads, Gage
2019-06-27 16:04 ` Thomas Monjalon
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=VE1PR08MB4640592A4D60562979F63D78E9EB0@VE1PR08MB4640.eurprd08.prod.outlook.com \
--to=phil.yang@arm.com \
--cc=Gavin.Hu@arm.com \
--cc=Honnappa.Nagarahalli@arm.com \
--cc=dev@dpdk.org \
--cc=gage.eads@intel.com \
--cc=nd@arm.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).