[PATCH v4 08/11] net/iavf: fix minsize build

Thomas Monjalon thomas at monjalon.net
Thu Feb 5 22:27:40 CET 2026


This error is seen in build of type "minsize":

In function 'iavf_ipsec_crypto_supported':
    drivers/net/intel/iavf/iavf_ipsec_crypto.c:1649:29:
    error: status may be used uninitialized
        [-Werror=maybe-uninitialized]
 1649 | if (rc == 0 && status.status == INLINE_IPSEC_STATUS_AVAILABLE)
    drivers/net/intel/iavf/iavf_ipsec_crypto.c:1647:46:
    note: status was declared here
 1647 | struct virtchnl_ipsec_status status;

It looks to be a compiler issue because we are not supposed
to reach this point in case of iavf_ipsec_crypto_status_get() failure.

The variable is initialized to allow compiling with "minsize" option.

Signed-off-by: Thomas Monjalon <thomas at monjalon.net>
---
 drivers/net/intel/iavf/iavf_ipsec_crypto.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/net/intel/iavf/iavf_ipsec_crypto.c b/drivers/net/intel/iavf/iavf_ipsec_crypto.c
index d5bfbecf08..6d41b1744e 100644
--- a/drivers/net/intel/iavf/iavf_ipsec_crypto.c
+++ b/drivers/net/intel/iavf/iavf_ipsec_crypto.c
@@ -1644,7 +1644,7 @@ iavf_ipsec_crypto_supported(struct iavf_adapter *adapter)
 	/** Capability check for IPsec Crypto */
 	if (resources && (resources->vf_cap_flags &
 		VIRTCHNL_VF_OFFLOAD_INLINE_IPSEC_CRYPTO)) {
-		struct virtchnl_ipsec_status status;
+		struct virtchnl_ipsec_status status = {0};
 		int rc = iavf_ipsec_crypto_status_get(adapter, &status);
 		if (rc == 0 && status.status == INLINE_IPSEC_STATUS_AVAILABLE)
 			crypto_supported = true;
-- 
2.52.0



More information about the dev mailing list