[PATCH v2 09/14] common/sfc_efx/base: fix annotations in SW-HW enum converter
Ivan Malov
ivan.malov at arknetworks.am
Wed Aug 12 19:08:29 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 | 1 +
1 file changed, 1 insertion(+)
diff --git a/drivers/common/sfc_efx/base/efx_np.c b/drivers/common/sfc_efx/base/efx_np.c
index 8b8e37c0e1..6cf5aeac11 100644
--- a/drivers/common/sfc_efx/base/efx_np.c
+++ b/drivers/common/sfc_efx/base/efx_np.c
@@ -504,6 +504,7 @@ efx_np_sw_link_mode_to_cap(
return (0);
}
+__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,
--
2.47.3
More information about the dev
mailing list