diff options
author | Jason Gunthorpe <jgg@nvidia.com> | 2021-06-11 19:00:25 +0300 |
---|---|---|
committer | Jason Gunthorpe <jgg@nvidia.com> | 2021-06-16 20:58:30 -0300 |
commit | 2ca1cca4352ed50a363159aa9b8eeb6182446580 (patch) | |
tree | 5bdda221f52634071e90c42c9713328758e1d763 /include/rdma | |
parent | a4676388e2e21215b32f33b42ac5725e315a6680 (diff) |
RDMA/core: Simplify how the port sysfs is created
Use the same technique as gid_attrs now uses to manage the port
sysfs. Bundle everything into three allocations and use a single
sysfs_create_groups() to build everything in one shot.
All the memory is always freed in the kobj release function, removing most
of the error unwinding.
The gid_attr technique and the hw_counters are very similar, merge the two
together and combine the sysfs_create_group() call for hw_counters with
the single sysfs group setup.
Link: https://lore.kernel.org/r/b688f3340694c59f7b44b1bde40e25559ef43cf3.1623427137.git.leonro@nvidia.com
Signed-off-by: Leon Romanovsky <leonro@nvidia.com>
Signed-off-by: Jason Gunthorpe <jgg@nvidia.com>
Diffstat (limited to 'include/rdma')
0 files changed, 0 insertions, 0 deletions