[PATCH v3 09/14] common/sfc_efx/base: fix annotations in SW-HW enum converter

Ivan Malov ivan.malov at arknetworks.am
Fri Aug 14 14:54:33 CEST 2026


From: Andy Moreton <andy.moreton at amd.com>

Code analysis reports returning uninitialised memory in *enum_hwp.
Fix the annotations to show that the write only occurs on successful
return.

Fixes: 2be7d23f3fe6 ("common/sfc_efx/base: fill in loopback modes on netport probe")
Cc: stable at dpdk.org

Signed-off-by: Andy Moreton <andy.moreton at amd.com>
Reviewed-by: Ivan Malov <ivan.malov at arknetworks.am>
Reviewed-by: Viacheslav Galaktionov <viacheslav.galaktionov at arknetworks.am>
---
 drivers/common/sfc_efx/base/efx_np.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/common/sfc_efx/base/efx_np.c b/drivers/common/sfc_efx/base/efx_np.c
index da2a158142..fd4432a2a4 100644
--- a/drivers/common/sfc_efx/base/efx_np.c
+++ b/drivers/common/sfc_efx/base/efx_np.c
@@ -504,7 +504,7 @@ efx_np_sw_link_mode_to_cap(
 	return (0);
 }
 
-static					void
+__success(*supportedp != 0)	static	void
 efx_np_cap_enum_sw_to_hw(
 	__in_ecount(hw_sw_map_nentries)	const struct efx_np_cap_map *hw_sw_map,
 	__in				unsigned int hw_sw_map_nentries,
-- 
2.47.3



More information about the stable mailing list