Currently ice_get_fv() is only used inside ice_get_sw_fv_list(). Remove ice_get_fv() and call ice_get_sw_fv_list() directly.
Signed-off-by: Marcin Szycik <marcin.szy...@intel.com> Signed-off-by: Qiming Yang <qiming.y...@intel.com> --- drivers/net/ice/base/ice_ddp.c | 3 +++ drivers/net/ice/base/ice_switch.c | 23 ++--------------------- 2 files changed, 5 insertions(+), 21 deletions(-) diff --git a/drivers/net/ice/base/ice_ddp.c b/drivers/net/ice/base/ice_ddp.c index 3e18f2bc70..d88c417faf 100644 --- a/drivers/net/ice/base/ice_ddp.c +++ b/drivers/net/ice/base/ice_ddp.c @@ -1579,6 +1579,9 @@ ice_get_sw_fv_list(struct ice_hw *hw, struct ice_prot_lkup_ext *lkups, struct ice_fv *fv; u32 offset; + if (!lkups->n_val_words) + return ICE_SUCCESS; + ice_memset(&state, 0, sizeof(state), ICE_NONDMA_MEM); if (!lkups->n_val_words || !hw->seg) diff --git a/drivers/net/ice/base/ice_switch.c b/drivers/net/ice/base/ice_switch.c index 06665a29db..1f391002b8 100644 --- a/drivers/net/ice/base/ice_switch.c +++ b/drivers/net/ice/base/ice_switch.c @@ -7733,25 +7733,6 @@ ice_create_recipe_group(struct ice_hw *hw, struct ice_sw_recipe *rm, return status; } -/** - * ice_get_fv - get field vectors/extraction sequences for spec. lookup types - * @hw: pointer to hardware structure - * @lkups: lookup elements or match criteria for the advanced recipe, one - * structure per protocol header - * @bm: bitmap of field vectors to consider - * @fv_list: pointer to a list that holds the returned field vectors - */ -static enum ice_status -ice_get_fv(struct ice_hw *hw, struct ice_prot_lkup_ext *lkups, - ice_bitmap_t *bm, struct LIST_HEAD_TYPE *fv_list) -{ - if (!lkups->n_val_words) - return ICE_SUCCESS; - - /* Find field vectors that include all specified protocol types */ - return ice_get_sw_fv_list(hw, lkups, bm, fv_list); -} - /** * ice_tun_type_match_word - determine if tun type needs a match mask * @rinfo: other information regarding the rule e.g. priority and action info @@ -8159,11 +8140,11 @@ ice_add_adv_recipe(struct ice_hw *hw, struct ice_adv_lkup_elem *lkups, /* Get bitmap of field vectors (profiles) that are compatible with the * rule request; only these will be searched in the subsequent call to - * ice_get_fv. + * ice_get_sw_fv_list. */ ice_get_compat_fv_bitmap(hw, rinfo, fv_bitmap); - status = ice_get_fv(hw, lkup_exts, fv_bitmap, &rm->fv_list); + status = ice_get_sw_fv_list(hw, lkup_exts, fv_bitmap, &rm->fv_list); if (status) goto err_unroll; -- 2.25.1