patches for DPDK stable branches
 help / color / mirror / Atom feed
From: Stephen Hemminger <stephen@networkplumber.org>
To: dev@dpdk.org
Cc: Stephen Hemminger <stephen@networkplumber.org>,
	stable@dpdk.org, anoobj@marvell.com,
	Ankur Dwivedi <adwivedi@marvell.com>,
	Tejasree Kondoj <ktejasree@marvell.com>,
	Akhil Goyal <gakhil@marvell.com>
Subject: [PATCH] crypto/cnxk: fix gcc 15 warning
Date: Fri, 10 Jan 2025 09:06:03 -0800	[thread overview]
Message-ID: <20250110170603.538756-1-stephen@networkplumber.org> (raw)

GCC 15 produces warnings about uninitaialized variables.

In file included from ../lib/mbuf/rte_mbuf.h:36,
                 from ../lib/cryptodev/rte_crypto.h:15,
                 from ../lib/cryptodev/rte_cryptodev.h:19,
                 from ../drivers/crypto/cnxk/cn9k_cryptodev_ops.c:5:
In function ‘pdcp_chain_sg1_prep’,
    inlined from ‘cpt_pdcp_chain_alg_prep’ at ../drivers/crypto/cnxk/cnxk_se.h:1621:11,
    inlined from ‘fill_pdcp_chain_params’ at ../drivers/crypto/cnxk/cnxk_se.h:3114:8,
    inlined from ‘cpt_sym_inst_fill’ at ../drivers/crypto/cnxk/cnxk_se.h:3364:9,
    inlined from ‘cn9k_cpt_inst_prep’ at ../drivers/crypto/cnxk/cn9k_cryptodev_ops.c:93:10:
../lib/eal/include/rte_common.h:469:38: warning: ‘fc_params.meta_buf.vaddr’ may be used uninitialized [-Wmaybe-uninitialized]
  469 | #define RTE_PTR_ADD(ptr, x) ((void*)((uintptr_t)(ptr) + (x)))
      |                                      ^~~~~~~~~~~~~~~~
../drivers/common/cnxk/roc_platform.h:47:34: note: in expansion of macro ‘RTE_PTR_ADD’
   47 | #define PLT_PTR_ADD              RTE_PTR_ADD
      |                                  ^~~~~~~~~~~
../drivers/crypto/cnxk/cnxk_se.h:900:19: note: in expansion of macro ‘PLT_PTR_ADD’
  900 |         m_vaddr = PLT_PTR_ADD(m_vaddr, ROC_SE_OFF_CTRL_LEN + PLT_ALIGN_CEIL(hdr_len, 8));
      |                   ^~~~~~~~~~~
In file included from ../drivers/crypto/cnxk/cn9k_cryptodev_ops.c:20:
../drivers/crypto/cnxk/cnxk_se.h: In function ‘cn9k_cpt_inst_prep’:
../drivers/crypto/cnxk/cnxk_se.h:3008:33: note: ‘fc_params.meta_buf.vaddr’ was declared here
 3008 |         struct roc_se_fc_params fc_params;
      |                                 ^~~~~~~~~
In function ‘pdcp_chain_sg1_prep’,
    inlined from ‘cpt_pdcp_chain_alg_prep’ at ../drivers/crypto/cnxk/cnxk_se.h:1621:11,
    inlined from ‘fill_pdcp_chain_params’ at ../drivers/crypto/cnxk/cnxk_se.h:3114:8,
    inlined from ‘cpt_sym_inst_fill’ at ../drivers/crypto/cnxk/cnxk_se.h:3364:9,
    inlined from ‘cn9k_cpt_inst_prep’ at ../drivers/crypto/cnxk/cn9k_cryptodev_ops.c:82:10:
../lib/eal/include/rte_common.h:469:38: warning: ‘fc_params.meta_buf.vaddr’ may be used uninitialized [-Wmaybe-uninitialized]
  469 | #define RTE_PTR_ADD(ptr, x) ((void*)((uintptr_t)(ptr) + (x)))
      |                                      ^~~~~~~~~~~~~~~~
../drivers/common/cnxk/roc_platform.h:47:34: note: in expansion of macro ‘RTE_PTR_ADD’
   47 | #define PLT_PTR_ADD              RTE_PTR_ADD
      |                                  ^~~~~~~~~~~
../drivers/crypto/cnxk/cnxk_se.h:900:19: note: in expansion of macro ‘PLT_PTR_ADD’
  900 |         m_vaddr = PLT_PTR_ADD(m_vaddr, ROC_SE_OFF_CTRL_LEN + PLT_ALIGN_CEIL(hdr_len, 8));
      |                   ^~~~~~~~~~~
../drivers/crypto/cnxk/cnxk_se.h: In function ‘cn9k_cpt_inst_prep’:
../drivers/crypto/cnxk/cnxk_se.h:3008:33: note: ‘fc_params.meta_buf.vaddr’ was declared here
 3008 |         struct roc_se_fc_params fc_params;
      |                                 ^~~~~~~~~

Fixes: d3bff77cc371 ("crypto/cnxk: separate out PDCP chain datapath")
Cc: stable@dpdk.org
Cc: anoobj@marvell.com

Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
---
 drivers/crypto/cnxk/cnxk_se.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/crypto/cnxk/cnxk_se.h b/drivers/crypto/cnxk/cnxk_se.h
index 7262a49945..649e38c495 100644
--- a/drivers/crypto/cnxk/cnxk_se.h
+++ b/drivers/crypto/cnxk/cnxk_se.h
@@ -3005,7 +3005,7 @@ fill_pdcp_chain_params(struct rte_crypto_op *cop, struct cnxk_se_sess *sess,
 {
 	uint32_t ci_data_length, ci_data_offset, a_data_length, a_data_offset;
 	struct rte_crypto_sym_op *sym_op = cop->sym;
-	struct roc_se_fc_params fc_params;
+	struct roc_se_fc_params fc_params = { };
 	struct rte_mbuf *m_src, *m_dst;
 	uint8_t cpt_op = sess->cpt_op;
 	uint64_t d_offs, d_lens;
-- 
2.45.2


                 reply	other threads:[~2025-01-10 17:06 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

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=20250110170603.538756-1-stephen@networkplumber.org \
    --to=stephen@networkplumber.org \
    --cc=adwivedi@marvell.com \
    --cc=anoobj@marvell.com \
    --cc=dev@dpdk.org \
    --cc=gakhil@marvell.com \
    --cc=ktejasree@marvell.com \
    --cc=stable@dpdk.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;
as well as URLs for NNTP newsgroup(s).