Skip to content

Commit

Permalink
IB/ipoib: function interface change
Browse files Browse the repository at this point in the history
The ipoib_ib_dev_down/ipoib_ib_dev_stop return zero unconditionally
and the callers never check the returned values,
change the return type to void and remove the redundant return values.

Reviewed-by: Shan Hai <shan.hai@oracle.com>
Signed-off-by: Zhu Yanjun <yanjun.zhu@oracle.com>
Reviewed-by: Yuval Shaia <yuval.shaia@oracle.com>
Reviewed-by: Leon Romanovsky <leonro@mellanox.com>
Signed-off-by: Doug Ledford <dledford@redhat.com>
  • Loading branch information
Zhu Yanjun authored and Doug Ledford committed Jan 24, 2017
1 parent 820cd30 commit dfc0e55
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 8 deletions.
4 changes: 2 additions & 2 deletions drivers/infiniband/ulp/ipoib/ipoib.h
Original file line number Diff line number Diff line change
Expand Up @@ -501,8 +501,8 @@ void ipoib_ib_dev_cleanup(struct net_device *dev);

int ipoib_ib_dev_open(struct net_device *dev);
int ipoib_ib_dev_up(struct net_device *dev);
int ipoib_ib_dev_down(struct net_device *dev);
int ipoib_ib_dev_stop(struct net_device *dev);
void ipoib_ib_dev_down(struct net_device *dev);
void ipoib_ib_dev_stop(struct net_device *dev);
void ipoib_pkey_dev_check_presence(struct net_device *dev);

int ipoib_dev_init(struct net_device *dev, struct ib_device *ca, int port);
Expand Down
8 changes: 2 additions & 6 deletions drivers/infiniband/ulp/ipoib/ipoib_ib.c
Original file line number Diff line number Diff line change
Expand Up @@ -771,7 +771,7 @@ int ipoib_ib_dev_up(struct net_device *dev)
return ipoib_mcast_start_thread(dev);
}

int ipoib_ib_dev_down(struct net_device *dev)
void ipoib_ib_dev_down(struct net_device *dev)
{
struct ipoib_dev_priv *priv = netdev_priv(dev);

Expand All @@ -784,8 +784,6 @@ int ipoib_ib_dev_down(struct net_device *dev)
ipoib_mcast_dev_flush(dev);

ipoib_flush_paths(dev);

return 0;
}

static int recvs_pending(struct net_device *dev)
Expand Down Expand Up @@ -840,7 +838,7 @@ void ipoib_drain_cq(struct net_device *dev)
local_bh_enable();
}

int ipoib_ib_dev_stop(struct net_device *dev)
void ipoib_ib_dev_stop(struct net_device *dev)
{
struct ipoib_dev_priv *priv = netdev_priv(dev);
struct ib_qp_attr qp_attr;
Expand Down Expand Up @@ -913,8 +911,6 @@ int ipoib_ib_dev_stop(struct net_device *dev)
ipoib_flush_ah(dev);

ib_req_notify_cq(priv->recv_cq, IB_CQ_NEXT_COMP);

return 0;
}

int ipoib_ib_dev_init(struct net_device *dev, struct ib_device *ca, int port)
Expand Down

0 comments on commit dfc0e55

Please sign in to comment.