RDMA/hfi1: Remove the unneeded result variable
Return the value set_link_state() directly instead of storing it in another redundant variable. Reported-by: Zeal Robot <zealci@zte.com.cn> Signed-off-by: ye xingchen <ye.xingchen@zte.com.cn> Link: https://lore.kernel.org/r/20220901074209.313004-1-ye.xingchen@zte.com.cn Signed-off-by: Leon Romanovsky <leon@kernel.org>
This commit is contained in:
parent
d324a46be3
commit
e58f889e29
|
@ -1447,12 +1447,10 @@ static int shut_down_port(struct rvt_dev_info *rdi, u32 port_num)
|
||||||
struct hfi1_ibdev *verbs_dev = dev_from_rdi(rdi);
|
struct hfi1_ibdev *verbs_dev = dev_from_rdi(rdi);
|
||||||
struct hfi1_devdata *dd = dd_from_dev(verbs_dev);
|
struct hfi1_devdata *dd = dd_from_dev(verbs_dev);
|
||||||
struct hfi1_pportdata *ppd = &dd->pport[port_num - 1];
|
struct hfi1_pportdata *ppd = &dd->pport[port_num - 1];
|
||||||
int ret;
|
|
||||||
|
|
||||||
set_link_down_reason(ppd, OPA_LINKDOWN_REASON_UNKNOWN, 0,
|
set_link_down_reason(ppd, OPA_LINKDOWN_REASON_UNKNOWN, 0,
|
||||||
OPA_LINKDOWN_REASON_UNKNOWN);
|
OPA_LINKDOWN_REASON_UNKNOWN);
|
||||||
ret = set_link_state(ppd, HLS_DN_DOWNDEF);
|
return set_link_state(ppd, HLS_DN_DOWNDEF);
|
||||||
return ret;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
static int hfi1_get_guid_be(struct rvt_dev_info *rdi, struct rvt_ibport *rvp,
|
static int hfi1_get_guid_be(struct rvt_dev_info *rdi, struct rvt_ibport *rvp,
|
||||||
|
|
Loading…
Reference in New Issue