public inbox for dev@dpdk.org
 help / color / mirror / Atom feed
From: Bruce Richardson <bruce.richardson@intel.com>
To: dev@dpdk.org
Cc: stephen@networkplumber.org,
	Bruce Richardson <bruce.richardson@intel.com>,
	Selwin Sebastian <selwin.sebastian@amd.com>,
	Kishore Padmanabha <kishore.padmanabha@broadcom.com>,
	Ajit Khaparde <ajit.khaparde@broadcom.com>,
	Jeroen de Borst <jeroendb@google.com>,
	Joshua Washington <joshwash@google.com>,
	Rosen Xu <rosen.xu@altera.com>
Subject: [PATCH v2] drivers: disable comma warnings selectively
Date: Thu, 19 Feb 2026 15:22:25 +0000	[thread overview]
Message-ID: <20260219152302.2103018-1-bruce.richardson@intel.com> (raw)
In-Reply-To: <20260213151559.656837-1-bruce.richardson@intel.com>

Rather than disabling -Wcomma for all drivers, only disable it on a
case-by-case basis for drivers that need it disabled. Use a variable to
do so, to avoid issues with compilers like MSVC that don't support the
-Wno-comma flag.

Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
---
V2: resubmit now that dependent patches have hit main
---
 config/meson.build                 | 6 ++++++
 drivers/meson.build                | 2 +-
 drivers/net/axgbe/meson.build      | 4 +++-
 drivers/net/bnxt/meson.build       | 1 +
 drivers/net/gve/meson.build        | 1 +
 drivers/raw/ifpga/base/meson.build | 1 +
 6 files changed, 13 insertions(+), 2 deletions(-)

diff --git a/config/meson.build b/config/meson.build
index 02e2798cca..9ba7b9a338 100644
--- a/config/meson.build
+++ b/config/meson.build
@@ -367,6 +367,12 @@ if cc.has_argument('-Wno-shadow')
     no_shadow_cflag = '-Wno-shadow'
 endif
 
+# per-driver option to disable -Wcomma if supported by the compiler
+no_comma_cflag = []
+if cc.has_argument('-Wno-comma')
+    no_comma_cflag = '-Wno-comma'
+endif
+
 foreach arg: global_cflags
     if cc.has_argument(arg)
         add_project_arguments(arg, language: 'c')
diff --git a/drivers/meson.build b/drivers/meson.build
index 3fe3be48fb..6ae102e943 100644
--- a/drivers/meson.build
+++ b/drivers/meson.build
@@ -86,7 +86,7 @@ default_cflags = machine_args
 default_cflags += ['-DALLOW_EXPERIMENTAL_API']
 default_cflags += ['-DALLOW_INTERNAL_API']
 
-warning_disable_cflags = ['-Wno-format-truncation', '-Wno-address-of-packed-member', '-Wno-comma']
+warning_disable_cflags = ['-Wno-format-truncation', '-Wno-address-of-packed-member']
 foreach cflag:warning_disable_cflags
     if cc.has_argument(cflag)
         default_cflags += cflag
diff --git a/drivers/net/axgbe/meson.build b/drivers/net/axgbe/meson.build
index 5a14549317..1aa523a749 100644
--- a/drivers/net/axgbe/meson.build
+++ b/drivers/net/axgbe/meson.build
@@ -15,7 +15,9 @@ sources = files(
         'axgbe_rxtx.c',
 )
 
-cflags += ['-Wno-cast-qual', no_shadow_cflag]
+cflags += ['-Wno-cast-qual']
+cflags += no_shadow_cflag
+cflags += no_comma_cflag
 
 if arch_subdir == 'x86'
     sources += files('axgbe_rxtx_vec_sse.c')
diff --git a/drivers/net/bnxt/meson.build b/drivers/net/bnxt/meson.build
index dc122fb3df..e13aa4e341 100644
--- a/drivers/net/bnxt/meson.build
+++ b/drivers/net/bnxt/meson.build
@@ -14,6 +14,7 @@ endif
 
 cflags += no_wvla_cflag
 cflags += no_shadow_cflag
+cflags += no_comma_cflag
 
 headers = files('rte_pmd_bnxt.h')
 cflags_options = [
diff --git a/drivers/net/gve/meson.build b/drivers/net/gve/meson.build
index add431c2bb..b5d67ee490 100644
--- a/drivers/net/gve/meson.build
+++ b/drivers/net/gve/meson.build
@@ -20,3 +20,4 @@ sources = files(
 includes += include_directories('base')
 
 cflags += no_wvla_cflag
+cflags += no_comma_cflag
diff --git a/drivers/raw/ifpga/base/meson.build b/drivers/raw/ifpga/base/meson.build
index efebff94e9..225bde052b 100644
--- a/drivers/raw/ifpga/base/meson.build
+++ b/drivers/raw/ifpga/base/meson.build
@@ -24,3 +24,4 @@ base_sources = files(
         'opae_at24_eeprom.c',
         'opae_eth_group.c',
 )
+base_cflags += no_comma_cflag
-- 
2.51.0


  parent reply	other threads:[~2026-02-19 15:23 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-02-13 15:14 [PATCH] drivers: disable comma warnings selectively Bruce Richardson
2026-02-13 17:25 ` Stephen Hemminger
2026-02-13 17:35   ` Bruce Richardson
2026-02-13 18:47 ` Stephen Hemminger
2026-02-19 15:22 ` Bruce Richardson [this message]
2026-02-19 21:53   ` [PATCH v2] " Stephen Hemminger

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=20260219152302.2103018-1-bruce.richardson@intel.com \
    --to=bruce.richardson@intel.com \
    --cc=ajit.khaparde@broadcom.com \
    --cc=dev@dpdk.org \
    --cc=jeroendb@google.com \
    --cc=joshwash@google.com \
    --cc=kishore.padmanabha@broadcom.com \
    --cc=rosen.xu@altera.com \
    --cc=selwin.sebastian@amd.com \
    --cc=stephen@networkplumber.org \
    /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