diff mbox series

event/cnxk: fix clang warning on Arm

Message ID 20210610072511.232027-1-ruifeng.wang@arm.com (mailing list archive)
State Accepted
Delegated to: Jerin Jacob
Headers show
Series event/cnxk: fix clang warning on Arm | expand

Checks

Context Check Description
ci/iol-intel-Performance success Performance Testing PASS
ci/iol-testing fail Testing issues
ci/iol-abi-testing success Testing PASS
ci/iol-intel-Functional fail Functional Testing issues
ci/github-robot success github build: passed
ci/intel-Testing success Testing PASS
ci/Intel-compilation success Compilation OK
ci/checkpatch warning coding style issues

Commit Message

Ruifeng Wang June 10, 2021, 7:25 a.m. UTC
Build with Clang-10 has warning:
drivers/event/cnxk/cnxk_tim_worker.h:372:23: warning: value size does not match register size specified by the constraint and modifier [-Wasm-operand-widths]
                             : [rem] "=&r"(rem)
                                           ^
drivers/event/cnxk/cnxk_tim_worker.h:365:17: note: use constraint modifier "w"
                             "          ldxr %[rem], [%[crem]]  \n"
                                             ^~~~~~
                                             %w[rem]

Changed variable type to match register size, which placates clang.

Fixes: 300b796262a1 ("event/cnxk: add timer arm routine")
Cc: pbhagavatula@marvell.com

Signed-off-by: Ruifeng Wang <ruifeng.wang@arm.com>
---
 drivers/event/cnxk/cnxk_tim_worker.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Pavan Nikhilesh Bhagavatula June 18, 2021, 7:21 a.m. UTC | #1
>-----Original Message-----
>From: Ruifeng Wang <ruifeng.wang@arm.com>
>Sent: Thursday, June 10, 2021 12:55 PM
>To: Pavan Nikhilesh Bhagavatula <pbhagavatula@marvell.com>; Shijith
>Thotton <sthotton@marvell.com>
>Cc: dev@dpdk.org; nd@arm.com; Ruifeng Wang
><ruifeng.wang@arm.com>
>Subject: [EXT] [PATCH] event/cnxk: fix clang warning on Arm
>
>External Email
>
>----------------------------------------------------------------------
>Build with Clang-10 has warning:
>drivers/event/cnxk/cnxk_tim_worker.h:372:23: warning: value size
>does not match register size specified by the constraint and modifier [-
>Wasm-operand-widths]
>                             : [rem] "=&r"(rem)
>                                           ^
>drivers/event/cnxk/cnxk_tim_worker.h:365:17: note: use constraint
>modifier "w"
>                             "          ldxr %[rem], [%[crem]]  \n"
>                                             ^~~~~~
>                                             %w[rem]
>
>Changed variable type to match register size, which placates clang.
>
>Fixes: 300b796262a1 ("event/cnxk: add timer arm routine")
>Cc: pbhagavatula@marvell.com
>
>Signed-off-by: Ruifeng Wang <ruifeng.wang@arm.com>

LGTM, thanks.

Acked-by: Pavan Nikhilesh <pbhagavatula@marvell.com>

>---
> drivers/event/cnxk/cnxk_tim_worker.h | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
>diff --git a/drivers/event/cnxk/cnxk_tim_worker.h
>b/drivers/event/cnxk/cnxk_tim_worker.h
>index 7caeb1a8fb..78e36ffafe 100644
>--- a/drivers/event/cnxk/cnxk_tim_worker.h
>+++ b/drivers/event/cnxk/cnxk_tim_worker.h
>@@ -320,7 +320,7 @@ cnxk_tim_add_entry_mp(struct cnxk_tim_ring
>*const tim_ring,
> 	struct cnxk_tim_ent *chunk;
> 	struct cnxk_tim_bkt *bkt;
> 	uint64_t lock_sema;
>-	int16_t rem;
>+	int64_t rem;
>
> __retry:
> 	cnxk_tim_get_target_bucket(tim_ring, rel_bkt, &bkt,
>&mirr_bkt);
>--
>2.25.1
Jerin Jacob June 30, 2021, 2:18 p.m. UTC | #2
On Fri, Jun 18, 2021 at 12:51 PM Pavan Nikhilesh Bhagavatula
<pbhagavatula@marvell.com> wrote:
>
>
>
> >-----Original Message-----
> >From: Ruifeng Wang <ruifeng.wang@arm.com>
> >Sent: Thursday, June 10, 2021 12:55 PM
> >To: Pavan Nikhilesh Bhagavatula <pbhagavatula@marvell.com>; Shijith
> >Thotton <sthotton@marvell.com>
> >Cc: dev@dpdk.org; nd@arm.com; Ruifeng Wang
> ><ruifeng.wang@arm.com>
> >Subject: [EXT] [PATCH] event/cnxk: fix clang warning on Arm
> >
> >External Email
> >
> >----------------------------------------------------------------------
> >Build with Clang-10 has warning:
> >drivers/event/cnxk/cnxk_tim_worker.h:372:23: warning: value size
> >does not match register size specified by the constraint and modifier [-
> >Wasm-operand-widths]
> >                             : [rem] "=&r"(rem)
> >                                           ^
> >drivers/event/cnxk/cnxk_tim_worker.h:365:17: note: use constraint
> >modifier "w"
> >                             "          ldxr %[rem], [%[crem]]  \n"
> >                                             ^~~~~~
> >                                             %w[rem]
> >
> >Changed variable type to match register size, which placates clang.
> >
> >Fixes: 300b796262a1 ("event/cnxk: add timer arm routine")
> >Cc: pbhagavatula@marvell.com
> >
> >Signed-off-by: Ruifeng Wang <ruifeng.wang@arm.com>
>
> LGTM, thanks.
>
> Acked-by: Pavan Nikhilesh <pbhagavatula@marvell.com>


Applied to dpdk-next-net-eventdev/for-main. Thanks


>
> >---
> > drivers/event/cnxk/cnxk_tim_worker.h | 2 +-
> > 1 file changed, 1 insertion(+), 1 deletion(-)
> >
> >diff --git a/drivers/event/cnxk/cnxk_tim_worker.h
> >b/drivers/event/cnxk/cnxk_tim_worker.h
> >index 7caeb1a8fb..78e36ffafe 100644
> >--- a/drivers/event/cnxk/cnxk_tim_worker.h
> >+++ b/drivers/event/cnxk/cnxk_tim_worker.h
> >@@ -320,7 +320,7 @@ cnxk_tim_add_entry_mp(struct cnxk_tim_ring
> >*const tim_ring,
> >       struct cnxk_tim_ent *chunk;
> >       struct cnxk_tim_bkt *bkt;
> >       uint64_t lock_sema;
> >-      int16_t rem;
> >+      int64_t rem;
> >
> > __retry:
> >       cnxk_tim_get_target_bucket(tim_ring, rel_bkt, &bkt,
> >&mirr_bkt);
> >--
> >2.25.1
>
diff mbox series

Patch

diff --git a/drivers/event/cnxk/cnxk_tim_worker.h b/drivers/event/cnxk/cnxk_tim_worker.h
index 7caeb1a8fb..78e36ffafe 100644
--- a/drivers/event/cnxk/cnxk_tim_worker.h
+++ b/drivers/event/cnxk/cnxk_tim_worker.h
@@ -320,7 +320,7 @@  cnxk_tim_add_entry_mp(struct cnxk_tim_ring *const tim_ring,
 	struct cnxk_tim_ent *chunk;
 	struct cnxk_tim_bkt *bkt;
 	uint64_t lock_sema;
-	int16_t rem;
+	int64_t rem;
 
 __retry:
 	cnxk_tim_get_target_bucket(tim_ring, rel_bkt, &bkt, &mirr_bkt);