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 <anthony.l.nguyen@intel.com>
Signed-off-by: Paul M Stillwell Jr <paul.m.stillwell.jr@intel.com>
Signed-off-by: Qi Zhang <qi.z.zhang@intel.com>
Acked-by: Qiming Yang <qiming.yang@intel.com>
This commit is contained in:
Qi Zhang 2020-03-30 19:45:24 +08:00 committed by Ferruh Yigit
parent c59e2faf14
commit 58283d1b88
2 changed files with 2 additions and 6 deletions

View File

@ -1840,9 +1840,6 @@ ice_parse_caps(struct ice_hw *hw, void *buf, u32 cap_count,
caps->msix_vector_first_id); caps->msix_vector_first_id);
break; break;
case ICE_AQC_CAPS_FD: case ICE_AQC_CAPS_FD:
{
u32 reg_val, val;
if (dev_p) { if (dev_p) {
dev_p->num_flow_director_fltr = number; dev_p->num_flow_director_fltr = number;
ice_debug(hw, ICE_DBG_INIT, 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); dev_p->num_flow_director_fltr);
} }
if (func_p) { if (func_p) {
u32 reg_val, val;
if (hw->dcf_enabled) if (hw->dcf_enabled)
break; break;
reg_val = rd32(hw, GLQF_FD_SIZE); 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); prefix, func_p->fd_fltr_best_effort);
} }
break; break;
}
case ICE_AQC_CAPS_MAX_MTU: case ICE_AQC_CAPS_MAX_MTU:
caps->max_mtu = number; caps->max_mtu = number;
ice_debug(hw, ICE_DBG_INIT, "%s: max_mtu = %d\n", ice_debug(hw, ICE_DBG_INIT, "%s: max_mtu = %d\n",

View File

@ -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) int ice_get_fdir_cnt_all(struct ice_hw *hw)
{ {
return hw->func_caps.fd_fltr_guar + return hw->func_caps.fd_fltr_guar + hw->func_caps.fd_fltr_best_effort;
hw->func_caps.fd_fltr_best_effort;
} }
/** /**