diff options
author | Jan Sokolowski <jan.sokolowski@intel.com> | 2023-08-09 15:39:13 +0200 |
---|---|---|
committer | Tony Nguyen <anthony.l.nguyen@intel.com> | 2023-08-17 13:59:45 -0700 |
commit | e528e5b237550b9c9f738a7e56174e5195c925d3 (patch) | |
tree | 7d9d2cc6ccca507190cf8f28844bc36d785d4522 | |
parent | cae48047052f3baec0fbc0ebf498b19c72753294 (diff) | |
download | linux-stable-e528e5b237550b9c9f738a7e56174e5195c925d3.tar.gz linux-stable-e528e5b237550b9c9f738a7e56174e5195c925d3.tar.bz2 linux-stable-e528e5b237550b9c9f738a7e56174e5195c925d3.zip |
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 <jan.sokolowski@intel.com>
Reviewed-by: Jacob Keller <jacob.e.keller@intel.com>
Reviewed-by: Przemek Kitszel <przemyslaw.kitszel@intel.com>
Reviewed-by: Leon Romanovsky <leonro@nvidia.com>
Signed-off-by: Tony Nguyen <anthony.l.nguyen@intel.com>
-rw-r--r-- | drivers/net/ethernet/intel/ice/ice_lib.c | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/drivers/net/ethernet/intel/ice/ice_lib.c b/drivers/net/ethernet/intel/ice/ice_lib.c index d3fb2b7535e7..201570cd2e0b 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; } /** |