On Fri, Sep 21, 2018 at 03:37:23AM +0000, Adit Ranadive wrote: > > 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> > > --- <...> > > Is this supposed to be complementary to Leon's device rename patch - > https://patchwork.kernel.org/patch/10607477/? > It wasn't designed but it looks like yes. Both of us come to the same conclusion that alloc_names() and ibdev->name needs to be changed, but from different reasons. I came to this conclusion while working on IB persistence naming task (first step device rename, second rdma-core autodiscovery over netlink, third possible step some changes to mlx4 and fourth change will be change of names). And Jason came to this conclusion while tried to solve the race and lockdep warning reported by Bart and Mark. > Otherwise, vmw_pvrdma looks fine. > > Acked-by: Adit Ranadive <aditr@xxxxxxxxxx>
Attachment:
signature.asc
Description: PGP signature