* [PATCH v1] net/intel: changes to avoid comma operator misuse warnings
@ 2025-11-06 8:23 Venkatesh Vemula
2025-11-17 11:54 ` Bruce Richardson
2025-11-17 11:57 ` Bruce Richardson
0 siblings, 2 replies; 3+ messages in thread
From: Venkatesh Vemula @ 2025-11-06 8:23 UTC (permalink / raw)
To: dev, bruce.richardson; +Cc: aman.deep.singh, shaiq.wani
fixed comma operator misuse warnings with clang compiler
for intel PMDs when -Wcomma enabled.
Bugzilla ID: 1809("net/intel: possible misuse of comma operator")
Signed-off-by: Venkatesh Vemula <venkatesh.vemula@intel.com>
---
drivers/net/intel/i40e/i40e_ethdev.c | 8 ++++----
drivers/net/intel/i40e/i40e_rxtx_vec_avx2.c | 4 ++--
drivers/net/intel/i40e/i40e_rxtx_vec_avx512.c | 2 +-
drivers/net/intel/iavf/iavf_rxtx_vec_avx2.c | 4 ++--
drivers/net/intel/iavf/iavf_rxtx_vec_avx512.c | 6 +++---
drivers/net/intel/ice/ice_ethdev.c | 8 ++++----
drivers/net/intel/ice/ice_rxtx_vec_avx2.c | 4 ++--
drivers/net/intel/ice/ice_rxtx_vec_avx512.c | 2 +-
drivers/net/intel/idpf/idpf_common_rxtx_avx2.c | 4 ++--
drivers/net/intel/idpf/idpf_common_rxtx_avx512.c | 8 ++++----
10 files changed, 25 insertions(+), 25 deletions(-)
diff --git a/drivers/net/intel/i40e/i40e_ethdev.c b/drivers/net/intel/i40e/i40e_ethdev.c
index b8ce79061b..799e65ac8d 100644
--- a/drivers/net/intel/i40e/i40e_ethdev.c
+++ b/drivers/net/intel/i40e/i40e_ethdev.c
@@ -5099,15 +5099,15 @@ i40e_res_pool_destroy(struct i40e_res_pool_info *pool)
return;
for (entry = LIST_FIRST(&pool->alloc_list);
- entry && (next_entry = LIST_NEXT(entry, next), 1);
- entry = next_entry) {
+ entry; entry = next_entry) {
+ next_entry = LIST_NEXT(entry, next);
LIST_REMOVE(entry, next);
rte_free(entry);
}
for (entry = LIST_FIRST(&pool->free_list);
- entry && (next_entry = LIST_NEXT(entry, next), 1);
- entry = next_entry) {
+ entry; entry = next_entry) {
+ next_entry = LIST_NEXT(entry, next);
LIST_REMOVE(entry, next);
rte_free(entry);
}
diff --git a/drivers/net/intel/i40e/i40e_rxtx_vec_avx2.c b/drivers/net/intel/i40e/i40e_rxtx_vec_avx2.c
index aeb2756e7a..07b68ff3db 100644
--- a/drivers/net/intel/i40e/i40e_rxtx_vec_avx2.c
+++ b/drivers/net/intel/i40e/i40e_rxtx_vec_avx2.c
@@ -703,7 +703,7 @@ vtx(volatile struct i40e_tx_desc *txdp,
/* if unaligned on 32-bit boundary, do one to align */
if (((uintptr_t)txdp & 0x1F) != 0 && nb_pkts != 0) {
vtx1(txdp, *pkt, flags);
- nb_pkts--, txdp++, pkt++;
+ nb_pkts--; txdp++; pkt++;
}
/* do two at a time while possible, in bursts */
@@ -730,7 +730,7 @@ vtx(volatile struct i40e_tx_desc *txdp,
/* do any last ones */
while (nb_pkts) {
vtx1(txdp, *pkt, flags);
- txdp++, pkt++, nb_pkts--;
+ txdp++; pkt++; nb_pkts--;
}
}
diff --git a/drivers/net/intel/i40e/i40e_rxtx_vec_avx512.c b/drivers/net/intel/i40e/i40e_rxtx_vec_avx512.c
index 571987d27a..8d1d3bd78e 100644
--- a/drivers/net/intel/i40e/i40e_rxtx_vec_avx512.c
+++ b/drivers/net/intel/i40e/i40e_rxtx_vec_avx512.c
@@ -798,7 +798,7 @@ vtx(volatile struct i40e_tx_desc *txdp,
/* do any last ones */
while (nb_pkts) {
vtx1(txdp, *pkt, flags);
- txdp++, pkt++, nb_pkts--;
+ txdp++; pkt++; nb_pkts--;
}
}
diff --git a/drivers/net/intel/iavf/iavf_rxtx_vec_avx2.c b/drivers/net/intel/iavf/iavf_rxtx_vec_avx2.c
index e417257086..ca4494d548 100644
--- a/drivers/net/intel/iavf/iavf_rxtx_vec_avx2.c
+++ b/drivers/net/intel/iavf/iavf_rxtx_vec_avx2.c
@@ -1655,7 +1655,7 @@ iavf_vtx(volatile struct iavf_tx_desc *txdp,
/* if unaligned on 32-bit boundary, do one to align */
if (((uintptr_t)txdp & 0x1F) != 0 && nb_pkts != 0) {
iavf_vtx1(txdp, *pkt, flags, offload, vlan_flag);
- nb_pkts--, txdp++, pkt++;
+ nb_pkts--; txdp++; pkt++;
}
/* do two at a time while possible, in bursts */
@@ -1704,7 +1704,7 @@ iavf_vtx(volatile struct iavf_tx_desc *txdp,
/* do any last ones */
while (nb_pkts) {
iavf_vtx1(txdp, *pkt, flags, offload, vlan_flag);
- txdp++, pkt++, nb_pkts--;
+ txdp++; pkt++; nb_pkts--;
}
}
diff --git a/drivers/net/intel/iavf/iavf_rxtx_vec_avx512.c b/drivers/net/intel/iavf/iavf_rxtx_vec_avx512.c
index d40a858413..530144181f 100644
--- a/drivers/net/intel/iavf/iavf_rxtx_vec_avx512.c
+++ b/drivers/net/intel/iavf/iavf_rxtx_vec_avx512.c
@@ -1869,7 +1869,7 @@ iavf_vtx(volatile struct iavf_tx_desc *txdp,
/* if unaligned on 32-bit boundary, do one to align */
if (((uintptr_t)txdp & 0x1F) != 0 && nb_pkts != 0) {
iavf_vtx1(txdp, *pkt, flags, offload, vlan_flag);
- nb_pkts--, txdp++, pkt++;
+ nb_pkts--; txdp++; pkt++;
}
/* do 4 at a time while possible, in bursts */
@@ -1913,7 +1913,7 @@ iavf_vtx(volatile struct iavf_tx_desc *txdp,
/* do any last ones */
while (nb_pkts) {
iavf_vtx1(txdp, *pkt, flags, offload, vlan_flag);
- txdp++, pkt++, nb_pkts--;
+ txdp++; pkt++; nb_pkts--;
}
}
@@ -2109,7 +2109,7 @@ ctx_vtx(volatile struct iavf_tx_desc *txdp,
/* if unaligned on 32-bit boundary, do one to align */
if (((uintptr_t)txdp & 0x1F) != 0 && nb_pkts != 0) {
ctx_vtx1(txdp, *pkt, flags, offload, vlan_flag);
- nb_pkts--, txdp++, pkt++;
+ nb_pkts--; txdp++; pkt++;
}
for (; nb_pkts > 1; txdp += 4, pkt += 2, nb_pkts -= 2) {
diff --git a/drivers/net/intel/ice/ice_ethdev.c b/drivers/net/intel/ice/ice_ethdev.c
index 4669eba7c7..7ee0c98f3a 100644
--- a/drivers/net/intel/ice/ice_ethdev.c
+++ b/drivers/net/intel/ice/ice_ethdev.c
@@ -942,15 +942,15 @@ ice_res_pool_destroy(struct ice_res_pool_info *pool)
return;
for (entry = LIST_FIRST(&pool->alloc_list);
- entry && (next_entry = LIST_NEXT(entry, next), 1);
- entry = next_entry) {
+ entry; entry = next_entry) {
+ next_entry = LIST_NEXT(entry, next);
LIST_REMOVE(entry, next);
rte_free(entry);
}
for (entry = LIST_FIRST(&pool->free_list);
- entry && (next_entry = LIST_NEXT(entry, next), 1);
- entry = next_entry) {
+ entry; entry = next_entry) {
+ next_entry = LIST_NEXT(entry, next);
LIST_REMOVE(entry, next);
rte_free(entry);
}
diff --git a/drivers/net/intel/ice/ice_rxtx_vec_avx2.c b/drivers/net/intel/ice/ice_rxtx_vec_avx2.c
index b952b8dddc..b9a55d670f 100644
--- a/drivers/net/intel/ice/ice_rxtx_vec_avx2.c
+++ b/drivers/net/intel/ice/ice_rxtx_vec_avx2.c
@@ -798,7 +798,7 @@ ice_vtx(volatile struct ice_tx_desc *txdp,
/* if unaligned on 32-bit boundary, do one to align */
if (((uintptr_t)txdp & 0x1F) != 0 && nb_pkts != 0) {
ice_vtx1(txdp, *pkt, flags, offload);
- nb_pkts--, txdp++, pkt++;
+ nb_pkts--; txdp++; pkt++;
}
/* do two at a time while possible, in bursts */
@@ -843,7 +843,7 @@ ice_vtx(volatile struct ice_tx_desc *txdp,
/* do any last ones */
while (nb_pkts) {
ice_vtx1(txdp, *pkt, flags, offload);
- txdp++, pkt++, nb_pkts--;
+ txdp++; pkt++; nb_pkts--;
}
}
diff --git a/drivers/net/intel/ice/ice_rxtx_vec_avx512.c b/drivers/net/intel/ice/ice_rxtx_vec_avx512.c
index 7c6fe82072..585d56122f 100644
--- a/drivers/net/intel/ice/ice_rxtx_vec_avx512.c
+++ b/drivers/net/intel/ice/ice_rxtx_vec_avx512.c
@@ -907,7 +907,7 @@ ice_vtx(volatile struct ice_tx_desc *txdp, struct rte_mbuf **pkt,
/* do any last ones */
while (nb_pkts) {
ice_vtx1(txdp, *pkt, flags, do_offload);
- txdp++, pkt++, nb_pkts--;
+ txdp++; pkt++; nb_pkts--;
}
}
diff --git a/drivers/net/intel/idpf/idpf_common_rxtx_avx2.c b/drivers/net/intel/idpf/idpf_common_rxtx_avx2.c
index 21c8f79254..c86753fb43 100644
--- a/drivers/net/intel/idpf/idpf_common_rxtx_avx2.c
+++ b/drivers/net/intel/idpf/idpf_common_rxtx_avx2.c
@@ -506,7 +506,7 @@ idpf_singleq_vtx(volatile struct idpf_base_tx_desc *txdp,
/* if unaligned on 32-bit boundary, do one to align */
if (((uintptr_t)txdp & 0x1F) != 0 && nb_pkts != 0) {
idpf_singleq_vtx1(txdp, *pkt, flags);
- nb_pkts--, txdp++, pkt++;
+ nb_pkts--; txdp++; pkt++;
}
/* do two at a time while possible, in bursts */
@@ -547,7 +547,7 @@ idpf_singleq_vtx(volatile struct idpf_base_tx_desc *txdp,
/* do any last ones */
while (nb_pkts) {
idpf_singleq_vtx1(txdp, *pkt, flags);
- txdp++, pkt++, nb_pkts--;
+ txdp++; pkt++; nb_pkts--;
}
}
diff --git a/drivers/net/intel/idpf/idpf_common_rxtx_avx512.c b/drivers/net/intel/idpf/idpf_common_rxtx_avx512.c
index bc2cadd738..1d0516c755 100644
--- a/drivers/net/intel/idpf/idpf_common_rxtx_avx512.c
+++ b/drivers/net/intel/idpf/idpf_common_rxtx_avx512.c
@@ -1025,7 +1025,7 @@ idpf_singleq_vtx(volatile struct idpf_base_tx_desc *txdp,
/* if unaligned on 32-bit boundary, do one to align */
if (((uintptr_t)txdp & 0x1F) != 0 && nb_pkts != 0) {
idpf_singleq_vtx1(txdp, *pkt, flags);
- nb_pkts--, txdp++, pkt++;
+ nb_pkts--; txdp++; pkt++;
}
/* do 4 at a time while possible, in bursts */
@@ -1063,7 +1063,7 @@ idpf_singleq_vtx(volatile struct idpf_base_tx_desc *txdp,
/* do any last ones */
while (nb_pkts) {
idpf_singleq_vtx1(txdp, *pkt, flags);
- txdp++, pkt++, nb_pkts--;
+ txdp++; pkt++; nb_pkts--;
}
}
@@ -1226,7 +1226,7 @@ idpf_splitq_vtx(volatile struct idpf_flex_tx_sched_desc *txdp,
/* if unaligned on 32-bit boundary, do one to align */
if (((uintptr_t)txdp & 0x1F) != 0 && nb_pkts != 0) {
idpf_splitq_vtx1(txdp, *pkt, flags);
- nb_pkts--, txdp++, pkt++;
+ nb_pkts--; txdp++; pkt++;
}
/* do 4 at a time while possible, in bursts */
@@ -1264,7 +1264,7 @@ idpf_splitq_vtx(volatile struct idpf_flex_tx_sched_desc *txdp,
/* do any last ones */
while (nb_pkts) {
idpf_splitq_vtx1(txdp, *pkt, flags);
- txdp++, pkt++, nb_pkts--;
+ txdp++; pkt++; nb_pkts--;
}
}
--
2.34.1
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH v1] net/intel: changes to avoid comma operator misuse warnings
2025-11-06 8:23 [PATCH v1] net/intel: changes to avoid comma operator misuse warnings Venkatesh Vemula
@ 2025-11-17 11:54 ` Bruce Richardson
2025-11-17 11:57 ` Bruce Richardson
1 sibling, 0 replies; 3+ messages in thread
From: Bruce Richardson @ 2025-11-17 11:54 UTC (permalink / raw)
To: Venkatesh Vemula; +Cc: dev, aman.deep.singh, shaiq.wani
On Thu, Nov 06, 2025 at 01:53:54PM +0530, Venkatesh Vemula wrote:
> fixed comma operator misuse warnings with clang compiler
> for intel PMDs when -Wcomma enabled.
>
> Bugzilla ID: 1809("net/intel: possible misuse of comma operator")
> Signed-off-by: Venkatesh Vemula <venkatesh.vemula@intel.com>
> ---
> drivers/net/intel/i40e/i40e_ethdev.c | 8 ++++----
> drivers/net/intel/i40e/i40e_rxtx_vec_avx2.c | 4 ++--
> drivers/net/intel/i40e/i40e_rxtx_vec_avx512.c | 2 +-
> drivers/net/intel/iavf/iavf_rxtx_vec_avx2.c | 4 ++--
> drivers/net/intel/iavf/iavf_rxtx_vec_avx512.c | 6 +++---
> drivers/net/intel/ice/ice_ethdev.c | 8 ++++----
> drivers/net/intel/ice/ice_rxtx_vec_avx2.c | 4 ++--
> drivers/net/intel/ice/ice_rxtx_vec_avx512.c | 2 +-
> drivers/net/intel/idpf/idpf_common_rxtx_avx2.c | 4 ++--
> drivers/net/intel/idpf/idpf_common_rxtx_avx512.c | 8 ++++----
> 10 files changed, 25 insertions(+), 25 deletions(-)
>
> diff --git a/drivers/net/intel/i40e/i40e_ethdev.c b/drivers/net/intel/i40e/i40e_ethdev.c
> index b8ce79061b..799e65ac8d 100644
> --- a/drivers/net/intel/i40e/i40e_ethdev.c
> +++ b/drivers/net/intel/i40e/i40e_ethdev.c
> @@ -5099,15 +5099,15 @@ i40e_res_pool_destroy(struct i40e_res_pool_info *pool)
> return;
>
> for (entry = LIST_FIRST(&pool->alloc_list);
> - entry && (next_entry = LIST_NEXT(entry, next), 1);
> - entry = next_entry) {
> + entry; entry = next_entry) {
The indentation and wrapping seems off here (and similar changes below).
Suggest you see if the whole "for" statement can exist on a single line,
now that it's shorter. If not, keep indentation from original code and
don't adjust it.
Thanks,
/Bruce
> + next_entry = LIST_NEXT(entry, next);
> LIST_REMOVE(entry, next);
> rte_free(entry);
> }
>
<snip>
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH v1] net/intel: changes to avoid comma operator misuse warnings
2025-11-06 8:23 [PATCH v1] net/intel: changes to avoid comma operator misuse warnings Venkatesh Vemula
2025-11-17 11:54 ` Bruce Richardson
@ 2025-11-17 11:57 ` Bruce Richardson
1 sibling, 0 replies; 3+ messages in thread
From: Bruce Richardson @ 2025-11-17 11:57 UTC (permalink / raw)
To: Venkatesh Vemula; +Cc: dev, aman.deep.singh, shaiq.wani
On Thu, Nov 06, 2025 at 01:53:54PM +0530, Venkatesh Vemula wrote:
> fixed comma operator misuse warnings with clang compiler
> for intel PMDs when -Wcomma enabled.
>
> Bugzilla ID: 1809("net/intel: possible misuse of comma operator")
Alongside a bugzilla id, we would also expect to see a "fixes" line - or in
this case, multiple fixes lines for each fix. We also would expect a Cc to
stable - though these are low priority fixes we should still flag them as
contenders for backporting.
/Bruce
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2025-11-17 11:57 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2025-11-06 8:23 [PATCH v1] net/intel: changes to avoid comma operator misuse warnings Venkatesh Vemula
2025-11-17 11:54 ` Bruce Richardson
2025-11-17 11:57 ` Bruce Richardson
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).