idpf: update idpf_up_complete() return type to void
Subsystems (3)
PATCH 1/1 idpf: update idpf_up_complete() return type to void
idpf_up_complete() function always returns 0 and no callers use this return value. Although idpf_vport_open() checks the return value, it only handles error cases which never occur. Change the return type to void to simplify the code.
Signed-off-by Sreedevi Joshi <[email protected]>
Reviewed-by Aleksandr Loktionov <[email protected]>
--- drivers/net/ethernet/intel/idpf/idpf_lib.c | 15 ++------------- 1 file changed, 2 insertions(+), 13 deletions(-)
drivers/net/ethernet/intel/idpf/idpf_lib.c +2 -13
@@ -1444,10 +1444,8 @@ static int idpf_set_real_num_queues(struct idpf_vport *vport)/** * idpf_up_complete - Complete interface up sequence * @vport: virtual port structure -* -* Returns 0 on success, negative on failure. */ -static int idpf_up_complete (struct idpf_vport *vport) +static void idpf_up_complete (struct idpf_vport *vport) {struct idpf_netdev_priv *np =netdev_priv (vport->netdev);
@@ -1457,8 +1455,6 @@ static int idpf_up_complete(struct idpf_vport *vport) }set_bit (IDPF_VPORT_UP , np->state); - -return 0 ; }/**
@@ -1610,20 +1606,13 @@ static int idpf_vport_open(struct idpf_vport *vport, bool rtnl) goto disable_vport; } - err =idpf_up_complete (vport); -if (err) { -dev_err (&adapter->pdev->dev,"Failed to complete interface up for vport %u: %d\n" , - vport->vport_id, err); - goto deinit_rss; - } +idpf_up_complete (vport);if (rtnl)rtnl_unlock ();return 0 ; -deinit_rss: -idpf_deinit_rss (rss_data); disable_vport:idpf_send_disable_vport_msg (adapter, vport_id); disable_queues:
Signature · 1 line
2.25.1
Quoted 7 lines · Sreedevi Joshi
idpf_up_complete()function always returns 0 and no callers use this return value. Althoughidpf_vport_open()checks the return value, it only handles error cases which never occur. Change the return type to void to simplify the code.Signed-off-by Sreedevi Joshi <[email protected]>Reviewed-by Aleksandr Loktionov <[email protected]>
Reviewed-by Simon Horman <[email protected]>