]> git.proxmox.com Git - mirror_ubuntu-jammy-kernel.git/commit
RDMA/core: Constify struct attribute_group
authorRikard Falkeborn <rikard.falkeborn@gmail.com>
Wed, 30 Sep 2020 22:40:03 +0000 (00:40 +0200)
committerJason Gunthorpe <jgg@nvidia.com>
Thu, 1 Oct 2020 23:44:51 +0000 (20:44 -0300)
commit42d5179c892e2d543fd25bdfbea98151189026ea
tree270d4c42888a3e37a7b860884dd81bc57fef1b60
parenta03bfc37d59de316436c46f5691c5a972ed57c82
RDMA/core: Constify struct attribute_group

The only usage of the pma_table field in the ib_port struct is to pass its
address to sysfs_create_group() and sysfs_remove_group(). Make it const to
make it possible to constify a couple of static struct
attribute_group. This allows the compiler to put them in read-only memory.

Link: https://lore.kernel.org/r/20200930224004.24279-2-rikard.falkeborn@gmail.com
Signed-off-by: Rikard Falkeborn <rikard.falkeborn@gmail.com>
Signed-off-by: Jason Gunthorpe <jgg@nvidia.com>
drivers/infiniband/core/sysfs.c