From: Qi Zhang Date: Mon, 30 Mar 2020 11:45:24 +0000 (+0800) Subject: net/ice/base: reduce scope of variables X-Git-Url: http://git.droids-corp.org/?a=commitdiff_plain;h=58283d1b88eec5c2b11ad4905e59859097f89141;p=dpdk.git net/ice/base: reduce scope of variables The scope of these variables can be reduced, so do so. This also eliminates the need for the extra wrapping/braces. Also, compact a line since it can fit within 80 columns Signed-off-by: Tony Nguyen Signed-off-by: Paul M Stillwell Jr Signed-off-by: Qi Zhang Acked-by: Qiming Yang --- diff --git a/drivers/net/ice/base/ice_common.c b/drivers/net/ice/base/ice_common.c index 0cf578c34b..1acac86400 100644 --- a/drivers/net/ice/base/ice_common.c +++ b/drivers/net/ice/base/ice_common.c @@ -1840,9 +1840,6 @@ ice_parse_caps(struct ice_hw *hw, void *buf, u32 cap_count, caps->msix_vector_first_id); break; case ICE_AQC_CAPS_FD: - { - u32 reg_val, val; - if (dev_p) { dev_p->num_flow_director_fltr = number; ice_debug(hw, ICE_DBG_INIT, @@ -1851,6 +1848,7 @@ ice_parse_caps(struct ice_hw *hw, void *buf, u32 cap_count, dev_p->num_flow_director_fltr); } if (func_p) { + u32 reg_val, val; if (hw->dcf_enabled) break; reg_val = rd32(hw, GLQF_FD_SIZE); @@ -1869,7 +1867,6 @@ ice_parse_caps(struct ice_hw *hw, void *buf, u32 cap_count, prefix, func_p->fd_fltr_best_effort); } break; - } case ICE_AQC_CAPS_MAX_MTU: caps->max_mtu = number; ice_debug(hw, ICE_DBG_INIT, "%s: max_mtu = %d\n", diff --git a/drivers/net/ice/base/ice_fdir.c b/drivers/net/ice/base/ice_fdir.c index 6dc8d54dac..df754dc748 100644 --- a/drivers/net/ice/base/ice_fdir.c +++ b/drivers/net/ice/base/ice_fdir.c @@ -581,8 +581,7 @@ ice_free_fd_shrd_item(struct ice_hw *hw, u16 cntr_id, u16 num_fltr) */ int ice_get_fdir_cnt_all(struct ice_hw *hw) { - return hw->func_caps.fd_fltr_guar + - hw->func_caps.fd_fltr_best_effort; + return hw->func_caps.fd_fltr_guar + hw->func_caps.fd_fltr_best_effort; } /**