]> git.droids-corp.org - dpdk.git/commit
common/cnxk: fix pointer argument with GCC 12
authorAnkur Dwivedi <adwivedi@marvell.com>
Mon, 8 Nov 2021 09:19:48 +0000 (14:49 +0530)
committerJerin Jacob <jerinj@marvell.com>
Thu, 11 Nov 2021 15:12:13 +0000 (16:12 +0100)
commit5050f441e3addf2d0a385e9ee92254c7b9a690e2
tree533ca6c9577b17663f7edec4949db48e0e5926f9
parentf96789aeaf1851071f5b2ab532d7687c66e1ee41
common/cnxk: fix pointer argument with GCC 12

The pointer passed to the rq_ctx and sq_ctx functions was the address
of qctx. Instead of that qctx should be passed. This patch fixes this.

This patch also resolves warning observed with gcc 12 compiler.

log:
   ../drivers/common/cnxk/cnxk_telemetry.h:12:38:
       warning: array subscript
   ‘struct nix_cn10k_sq_ctx_s[0]’ is partly outside array bounds of
   ‘volatile void[8]’ [-Warray-bounds]

Bugzilla ID: 853
Fixes: af75aac78978 ("common/cnxk: support telemetry for NIX")
Cc: stable@dpdk.org
Signed-off-by: Ankur Dwivedi <adwivedi@marvell.com>
Reviewed-by: Gowrishankar Muthukrishnan <gmuthukrishn@marvell.com>
Reviewed-by: Jerin Jacob <jerinj@marvell.com>
drivers/common/cnxk/cnxk_telemetry_nix.c