Skip to contentSkip to conversation

event/cnxk: fix clang warning on Arm

PATCH Applied Ruifeng Wang 3 participants 3 messages Jun 10, 2021 – Jun 30, 2021

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 event/cnxk: fix clang warning on Arm

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")
---
 drivers/event/cnxk/cnxk_tim_worker.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/event/cnxk/cnxk_tim_worker.h +1 -1
index 7caeb1a8fb..78e36ffafe 100644
@@ -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);
Signature · 1 line
2.25.1
Acked-by on v1 1/1
#1 lore raw
Quoted 26 lines

-----Original Message-----
From: Ruifeng Wang <[email protected]>
Sent: Thursday, June 10, 2021 12:55 PM
To: Pavan Nikhilesh Bhagavatula <[email protected]>; Shijith Thotton <[email protected]>
Cc: [email protected]; [email protected]; Ruifeng Wang <[email protected]>
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]
Quoted 6 lines

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

Fixes 300b796262a1 ("event/cnxk: add timer arm routine")

LGTM, thanks.

Quoted 22 lines

---
drivers/event/cnxk/cnxk_tim_worker.h | 2 +-

1 file changed, 1 insertion(+), 1 deletion(-)
drivers/event/cnxk/cnxk_tim_worker.h +1 -1
index 7caeb1a8fb..78e36ffafe 100644
@@ -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

Applied
#2 lore raw
Quoted 29 lines · Pavan Nikhilesh Bhagavatula
Quoted 29 lines

-----Original Message-----
From: Ruifeng Wang <[email protected]>
Sent: Thursday, June 10, 2021 12:55 PM
To: Pavan Nikhilesh Bhagavatula <[email protected]>; Shijith Thotton <[email protected]>
Cc: [email protected]; [email protected]; Ruifeng Wang <[email protected]>
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.

Quoted 8 lines
Quoted 4 lines
Fixes 300b796262a1 ("event/cnxk: add timer arm routine")

LGTM, thanks.

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

Quoted 24 lines
Quoted 23 lines

---
drivers/event/cnxk/cnxk_tim_worker.h | 2 +-

1 file changed, 1 insertion(+), 1 deletion(-)
drivers/event/cnxk/cnxk_tim_worker.h +1 -1
index 7caeb1a8fb..78e36ffafe 100644
@@ -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