RDMA/cm: Use an attribute_group on the ib_port_attribute intead of kobj's
authorJason Gunthorpe <jgg@nvidia.com>
Fri, 11 Jun 2021 16:00:29 +0000 (19:00 +0300)
committerJason Gunthorpe <jgg@nvidia.com>
Wed, 16 Jun 2021 23:58:31 +0000 (20:58 -0300)
commit526a12c8c56e80930621cedcf8b5f2fc3a169037
treea9ea05d0b37a4abbaea3bee53a659f8229874e95
parent054239f45c6346025afe252fe6f470a4093f61f9
RDMA/cm: Use an attribute_group on the ib_port_attribute intead of kobj's

This code is trying to attach a list of counters grouped into 4 groups to
the ib_port sysfs. Instead of creating a bunch of kobjects simply express
everything naturally as an ib_port_attribute and add a single
attribute_groups list.

Remove all the naked kobject manipulations.

Link: https://lore.kernel.org/r/0d5a7241ee0fe66622de04fcbaafaf6a791d5c7c.1623427137.git.leonro@nvidia.com
Signed-off-by: Leon Romanovsky <leonro@nvidia.com>
Signed-off-by: Jason Gunthorpe <jgg@nvidia.com>
drivers/infiniband/core/cm.c
drivers/infiniband/core/core_priv.h
drivers/infiniband/core/sysfs.c