From: Junxian Huang huangjunxian6@hisilicon.com
driver inclusion category: bugfix bugzilla: https://gitee.com/openeuler/kernel/issues/I6Z4E9
---------------------------------------------------------------
In hns_roce_slave_dec(), bond_state will be changed to HNS_ROCE_BOND_REGISTERING right before the current main_hr_dev is being removed from bond group. When the slave decrease operation is over, bond_state will be changed to HNS_ROCE_BOND_IS_BONDED in the end of this function. So the assignment to bond_state in the beginning of the function is useless and should be deleted.
Signed-off-by: Junxian Huang huangjunxian6@hisilicon.com --- drivers/infiniband/hw/hns/hns_roce_bond.c | 2 -- 1 file changed, 2 deletions(-)
diff --git a/drivers/infiniband/hw/hns/hns_roce_bond.c b/drivers/infiniband/hw/hns/hns_roce_bond.c index 47ef4984953f..46d2623786b1 100644 --- a/drivers/infiniband/hw/hns/hns_roce_bond.c +++ b/drivers/infiniband/hw/hns/hns_roce_bond.c @@ -304,8 +304,6 @@ static void hns_roce_slave_dec(struct hns_roce_bond_group *bond_grp) int ret; int i;
- bond_grp->bond_state = HNS_ROCE_BOND_IS_BONDED; - main_func_idx = PCI_FUNC(bond_grp->main_hr_dev->pci_dev->devfn); if (dec_slave_map & (1 << main_func_idx)) { hns_roce_cmd_bond(hr_dev, HNS_ROCE_CLEAR_BOND);