]> asedeno.scripts.mit.edu Git - linux.git/commitdiff
IB/{core, ipoib}: Simplify ib_find_gid() for unused ndev
authorParav Pandit <parav@mellanox.com>
Tue, 13 Mar 2018 14:06:12 +0000 (16:06 +0200)
committerJason Gunthorpe <jgg@mellanox.com>
Thu, 15 Mar 2018 20:40:37 +0000 (14:40 -0600)
ib_find_gid() is only used by IPoIB driver. For IB link layer, GID table
entries are not based on netdevice. Netdevice parameter is unused here.
Therefore, it is removed.

Reviewed-by: Daniel Jurgens <danielj@mellanox.com>
Reviewed-by: Mark Bloch <markb@mellanox.com>
Signed-off-by: Parav Pandit <parav@mellanox.com>
Signed-off-by: Leon Romanovsky <leon@kernel.org>
Reviewed-by: Yuval Shaia <yuval.shaia@oracle.com>
Signed-off-by: Jason Gunthorpe <jgg@mellanox.com>
drivers/infiniband/core/device.c
drivers/infiniband/ulp/ipoib/ipoib_ib.c
include/rdma/ib_verbs.h

index bb065c9449be46617bd82e2b26d7648aa00212a3..0ab99e62cc5ce060103d202eac56add19964a190 100644 (file)
@@ -1050,13 +1050,12 @@ EXPORT_SYMBOL(ib_modify_port);
  *   a specified GID value occurs. Its searches only for IB link layer.
  * @device: The device to query.
  * @gid: The GID value to search for.
- * @ndev: The ndev related to the GID to search for.
  * @port_num: The port number of the device where the GID value was found.
  * @index: The index into the GID table where the GID was found.  This
  *   parameter may be NULL.
  */
 int ib_find_gid(struct ib_device *device, union ib_gid *gid,
-               struct net_device *ndev, u8 *port_num, u16 *index)
+               u8 *port_num, u16 *index)
 {
        union ib_gid tmp_gid;
        int ret, port, i;
index 10384ea50bed7a4ff78712efdcafc9fe0c93dcaf..f47f9ace1f48ffc0240810098faf45adb1900c18 100644 (file)
@@ -1085,7 +1085,7 @@ static bool ipoib_dev_addr_changed_valid(struct ipoib_dev_priv *priv)
 
        netif_addr_unlock_bh(priv->dev);
 
-       err = ib_find_gid(priv->ca, &search_gid, priv->dev, &port, &index);
+       err = ib_find_gid(priv->ca, &search_gid, &port, &index);
 
        netif_addr_lock_bh(priv->dev);
 
index 5eb10c2470f0c721edfa072823a6242d5795d531..ac3791e056cf34a2ba549b044f9fa46ada5b7fef 100644 (file)
@@ -2857,7 +2857,7 @@ int ib_modify_port(struct ib_device *device,
                   struct ib_port_modify *port_modify);
 
 int ib_find_gid(struct ib_device *device, union ib_gid *gid,
-               struct net_device *ndev, u8 *port_num, u16 *index);
+               u8 *port_num, u16 *index);
 
 int ib_find_pkey(struct ib_device *device,
                 u8 port_num, u16 pkey, u16 *index);