[PATCH] bus/fslmc: fix shadowed variables in queue storage macros

David Marchand david.marchand at redhat.com
Thu Jun 11 16:11:40 CEST 2026


On Wed, 10 Jun 2026 at 16:16, Thomas Monjalon <thomas at monjalon.net> wrote:
>
> 07/04/2026 16:09, Stephen Hemminger:
> > Why are these not inline functions.
> > Macros with lower case names are likely place fore confusion like this?
>
> Hemant, Sachin, Weijun, please could you consider this comment?

Besides, I understand the intention behind bz 1744 is to re-enable Wshadow.
But after applying this fix, I still see many warnings after re-enabling:

$ git diff
diff --git a/drivers/bus/fslmc/meson.build b/drivers/bus/fslmc/meson.build
index ceae1c6c11..70098ad778 100644
--- a/drivers/bus/fslmc/meson.build
+++ b/drivers/bus/fslmc/meson.build
@@ -6,8 +6,6 @@ if not is_linux
     reason = 'only supported on Linux'
 endif

-cflags += no_shadow_cflag
-
 deps += ['common_dpaax', 'eventdev', 'kvargs']
 sources = files(
         'fslmc_bus.c',


$ ./devtools/test-meson-builds.sh
...
../../../git/pub/dpdk.org/main/drivers/bus/fslmc/qbman/qbman_portal.c:
In function ‘qbman_swp_enqueue_multiple_cinh_read_direct’:
../../../git/pub/dpdk.org/main/drivers/bus/fslmc/qbman/qbman_portal.c:1092:47:
error: declaration of ‘d’ shadows a parameter [-Werror=shadow]
 1092 |                         struct qbman_eq_desc *d = (struct
qbman_eq_desc *)p;
      |                                               ^
../../../git/pub/dpdk.org/main/drivers/bus/fslmc/qbman/qbman_portal.c:1047:45:
note: shadowed declaration is here
 1047 |                 const struct qbman_eq_desc *d,
      |                 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~^
../../../git/pub/dpdk.org/main/drivers/bus/fslmc/qbman/qbman_portal.c:
In function ‘qbman_swp_enqueue_multiple_cinh_direct’:
../../../git/pub/dpdk.org/main/drivers/bus/fslmc/qbman/qbman_portal.c:1161:47:
error: declaration of ‘d’ shadows a parameter [-Werror=shadow]
 1161 |                         struct qbman_eq_desc *d = (struct
qbman_eq_desc *)p;
      |                                               ^



-- 
David Marchand



More information about the dev mailing list