]> www.infradead.org Git - users/dwmw2/linux.git/commit
sysfs: treewide: constify attribute callback of bin_is_visible()
authorThomas Weißschuh <linux@weissschuh.net>
Sun, 3 Nov 2024 17:03:34 +0000 (17:03 +0000)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 5 Nov 2024 13:00:28 +0000 (14:00 +0100)
commitb626816fdd7f9beb841856ba049396cff46e99aa
treebc8c5e58f1534e54deb81b680587e22fc037b2f2
parent00ab6e97de0071b21a548e0a823348b3309970ba
sysfs: treewide: constify attribute callback of bin_is_visible()

The is_bin_visible() callbacks should not modify the struct
bin_attribute passed as argument.
Enforce this by marking the argument as const.

As there are not many callback implementers perform this change
throughout the tree at once.

Signed-off-by: Thomas Weißschuh <linux@weissschuh.net>
Acked-by: Martin K. Petersen <martin.petersen@oracle.com>
Acked-by: Jason Gunthorpe <jgg@nvidia.com>
Acked-by: Ira Weiny <ira.weiny@intel.com>
Acked-by: Krzysztof Wilczyński <kw@linux.com>
Link: https://lore.kernel.org/r/20241103-sysfs-const-bin_attr-v2-5-71110628844c@weissschuh.net
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
12 files changed:
drivers/cxl/port.c
drivers/gpu/drm/amd/amdgpu/amdgpu_psp.c
drivers/infiniband/hw/qib/qib_sysfs.c
drivers/mtd/spi-nor/sysfs.c
drivers/nvmem/core.c
drivers/pci/pci-sysfs.c
drivers/pci/vpd.c
drivers/platform/x86/amd/hsmp.c
drivers/platform/x86/intel/sdsi.c
drivers/scsi/scsi_sysfs.c
drivers/usb/core/sysfs.c
include/linux/sysfs.h