RDMA: Add and use rdma_for_each_port
authorJason Gunthorpe <jgg@mellanox.com>
Wed, 13 Feb 2019 04:12:47 +0000 (21:12 -0700)
committerJason Gunthorpe <jgg@mellanox.com>
Tue, 19 Feb 2019 17:13:39 +0000 (10:13 -0700)
commitea1075edcbab7d92f4e4ccf5490043f796bf78be
tree618fb95aa42e446d18020d6851bab321be2c3b4b
parentf2a0e45f36b0a210ff2388ed5fa89f81019c07a1
RDMA: Add and use rdma_for_each_port

We have many loops iterating over all of the end port numbers on a struct
ib_device, simplify them with a for_each helper.

Reviewed-by: Parav Pandit <parav@mellanox.com>
Signed-off-by: Jason Gunthorpe <jgg@mellanox.com>
12 files changed:
.clang-format
drivers/infiniband/core/cache.c
drivers/infiniband/core/cma.c
drivers/infiniband/core/device.c
drivers/infiniband/core/mad.c
drivers/infiniband/core/nldev.c
drivers/infiniband/core/security.c
drivers/infiniband/core/sysfs.c
drivers/infiniband/core/user_mad.c
drivers/infiniband/ulp/ipoib/ipoib_main.c
drivers/infiniband/ulp/srp/ib_srp.c
include/rdma/ib_verbs.h