From: Jan Sokolowski Date: Wed, 9 Aug 2023 13:39:13 +0000 (+0200) Subject: ice: refactor ice_vsi_is_vlan_pruning_ena X-Git-Url: https://www.infradead.org/git/?a=commitdiff_plain;h=e528e5b237550b9c9f738a7e56174e5195c925d3;p=users%2Fjedix%2Flinux-maple.git ice: refactor ice_vsi_is_vlan_pruning_ena As this method became static, and is already called with check for vsi being non-null, an unnecessary check along with superfluous parentheses is removed. Signed-off-by: Jan Sokolowski Reviewed-by: Jacob Keller Reviewed-by: Przemek Kitszel Reviewed-by: Leon Romanovsky Signed-off-by: Tony Nguyen --- diff --git a/drivers/net/ethernet/intel/ice/ice_lib.c b/drivers/net/ethernet/intel/ice/ice_lib.c index d3fb2b7535e76..201570cd2e0b3 100644 --- a/drivers/net/ethernet/intel/ice/ice_lib.c +++ b/drivers/net/ethernet/intel/ice/ice_lib.c @@ -1235,10 +1235,7 @@ ice_chnl_vsi_setup_q_map(struct ice_vsi *vsi, struct ice_vsi_ctx *ctxt) */ static bool ice_vsi_is_vlan_pruning_ena(struct ice_vsi *vsi) { - if (!vsi) - return false; - - return (vsi->info.sw_flags2 & ICE_AQ_VSI_SW_FLAG_RX_VLAN_PRUNE_ENA); + return vsi->info.sw_flags2 & ICE_AQ_VSI_SW_FLAG_RX_VLAN_PRUNE_ENA; } /**