]> asedeno.scripts.mit.edu Git - linux.git/commit
RDMA/core: Introduce and use ib_setup_port_attrs()
authorParav Pandit <parav@mellanox.com>
Wed, 13 Feb 2019 17:23:04 +0000 (19:23 +0200)
committerJason Gunthorpe <jgg@mellanox.com>
Sat, 16 Feb 2019 04:52:17 +0000 (21:52 -0700)
commit5767198a14c796354e8a96fcdc7db12ee46a0623
treed52219083298e32365ec299136275024f20b7f9a
parente155755e53804e721c8ce99474cc9c65eb8e8bc2
RDMA/core: Introduce and use ib_setup_port_attrs()

Refactor code for device and port sysfs attributes for reuse.

While at it, rename counter part free function to ib_free_port_attrs.

Also attribute setup sequence is:
(a) port specific init.
(b) device stats alloc/init.

So for cleanup, follow reverse sequence:
(a) device stats dealloc
(b) port specific cleanup

Signed-off-by: Parav Pandit <parav@mellanox.com>
Signed-off-by: Leon Romanovsky <leonro@mellanox.com>
Signed-off-by: Jason Gunthorpe <jgg@mellanox.com>
drivers/infiniband/core/sysfs.c