ice: Reduce scope of variables
There are some places where the scope of a variable can be reduced, so do that. Signed-off-by: Tony Nguyen <anthony.l.nguyen@intel.com> Tested-by: Gurucharan G <gurucharanx.g@intel.com> (A Contingent worker at Intel)
This commit is contained in:
parent
2ffd87d38d
commit
bd557d9797
|
@ -391,10 +391,11 @@ ice_upd_dvm_boost_entry_err:
|
|||
*/
|
||||
int ice_set_dvm_boost_entries(struct ice_hw *hw)
|
||||
{
|
||||
int status;
|
||||
u16 i;
|
||||
|
||||
for (i = 0; i < hw->dvm_upd.count; i++) {
|
||||
int status;
|
||||
|
||||
status = ice_upd_dvm_boost_entry(hw, &hw->dvm_upd.tbl[i]);
|
||||
if (status)
|
||||
return status;
|
||||
|
@ -3195,12 +3196,13 @@ ice_rem_vsig(struct ice_hw *hw, enum ice_block blk, u16 vsig,
|
|||
u16 idx = vsig & ICE_VSIG_IDX_M;
|
||||
struct ice_vsig_vsi *vsi_cur;
|
||||
struct ice_vsig_prof *d, *t;
|
||||
int status;
|
||||
|
||||
/* remove TCAM entries */
|
||||
list_for_each_entry_safe(d, t,
|
||||
&hw->blk[blk].xlt2.vsig_tbl[idx].prop_lst,
|
||||
list) {
|
||||
int status;
|
||||
|
||||
status = ice_rem_prof_id(hw, blk, d);
|
||||
if (status)
|
||||
return status;
|
||||
|
@ -3251,12 +3253,13 @@ ice_rem_prof_id_vsig(struct ice_hw *hw, enum ice_block blk, u16 vsig, u64 hdl,
|
|||
{
|
||||
u16 idx = vsig & ICE_VSIG_IDX_M;
|
||||
struct ice_vsig_prof *p, *t;
|
||||
int status;
|
||||
|
||||
list_for_each_entry_safe(p, t,
|
||||
&hw->blk[blk].xlt2.vsig_tbl[idx].prop_lst,
|
||||
list)
|
||||
if (p->profile_cookie == hdl) {
|
||||
int status;
|
||||
|
||||
if (ice_vsig_prof_id_count(hw, blk, vsig) == 1)
|
||||
/* this is the last profile, remove the VSIG */
|
||||
return ice_rem_vsig(hw, blk, vsig, chg);
|
||||
|
|
|
@ -1654,12 +1654,13 @@ ice_sched_add_vsi_child_nodes(struct ice_port_info *pi, u16 vsi_handle,
|
|||
u32 first_node_teid;
|
||||
u16 num_added = 0;
|
||||
u8 i, qgl, vsil;
|
||||
int status;
|
||||
|
||||
qgl = ice_sched_get_qgrp_layer(hw);
|
||||
vsil = ice_sched_get_vsi_layer(hw);
|
||||
parent = ice_sched_get_vsi_node(pi, tc_node, vsi_handle);
|
||||
for (i = vsil + 1; i <= qgl; i++) {
|
||||
int status;
|
||||
|
||||
if (!parent)
|
||||
return -EIO;
|
||||
|
||||
|
@ -1755,13 +1756,14 @@ ice_sched_add_vsi_support_nodes(struct ice_port_info *pi, u16 vsi_handle,
|
|||
u32 first_node_teid;
|
||||
u16 num_added = 0;
|
||||
u8 i, vsil;
|
||||
int status;
|
||||
|
||||
if (!pi)
|
||||
return -EINVAL;
|
||||
|
||||
vsil = ice_sched_get_vsi_layer(pi->hw);
|
||||
for (i = pi->hw->sw_entry_point_layer; i <= vsil; i++) {
|
||||
int status;
|
||||
|
||||
status = ice_sched_add_nodes_to_layer(pi, tc_node, parent,
|
||||
i, num_nodes[i],
|
||||
&first_node_teid,
|
||||
|
|
Loading…
Reference in New Issue