On Thu, Sep 20, 2018 at 04:42:22PM -0600, Jason Gunthorpe wrote: > From: Jason Gunthorpe <jgg@xxxxxxxxxxxx> > > The current code has two copies of the device name, ibdev->dev and > dev_name(&ibdev->dev), and they are setup at different times, which is > very confusing. > > Set them both up at the same time and make dev_name() the lead name, which > is the proper use of the driver core APIs. To make it very clear that the > name is not valid until registration pass it in to the > ib_register_device() call rather than messing with ibdev->name directly. > > Also the reorganization now checks that dev_name is unique even if it does > not contain a %. > > Signed-off-by: Jason Gunthorpe <jgg@xxxxxxxxxxxx> > --- > drivers/infiniband/core/device.c | 35 +++++++++++-------- > drivers/infiniband/core/sysfs.c | 4 --- > drivers/infiniband/hw/bnxt_re/main.c | 3 +- > drivers/infiniband/hw/cxgb3/iwch_provider.c | 3 +- > drivers/infiniband/hw/cxgb4/provider.c | 3 +- > drivers/infiniband/hw/hfi1/init.c | 1 - > drivers/infiniband/hw/hfi1/verbs.c | 4 ++- > drivers/infiniband/hw/hns/hns_roce_main.c | 3 +- > drivers/infiniband/hw/i40iw/i40iw_verbs.c | 3 +- > drivers/infiniband/hw/mlx4/main.c | 3 +- > drivers/infiniband/hw/mlx5/main.c | 15 ++++---- > drivers/infiniband/hw/mthca/mthca_provider.c | 3 +- > drivers/infiniband/hw/nes/nes_verbs.c | 3 +- > drivers/infiniband/hw/ocrdma/ocrdma_main.c | 3 +- > drivers/infiniband/hw/qedr/main.c | 4 +-- > drivers/infiniband/hw/qib/qib_init.c | 1 - > drivers/infiniband/hw/qib/qib_verbs.c | 4 ++- > drivers/infiniband/hw/usnic/usnic_ib_main.c | 3 +- > .../infiniband/hw/vmw_pvrdma/pvrdma_main.c | 3 +- > drivers/infiniband/sw/rdmavt/vt.c | 6 ++-- > drivers/infiniband/sw/rxe/rxe_verbs.c | 3 +- > include/rdma/ib_verbs.h | 6 ++-- > include/rdma/rdma_vt.h | 16 ++------- > 23 files changed, 55 insertions(+), 77 deletions(-) > Thanks, Reviewed-by: Leon Romanovsky <leonro@xxxxxxxxxxxx>
Attachment:
signature.asc
Description: PGP signature