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

The mmap() 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: Andrew Donnellan <ajd@linux.ibm.com> # ocxl
Acked-by: Krzysztof Wilczyński <kw@linux.com>
Link: https://lore.kernel.org/r/20241103-sysfs-const-bin_attr-v2-6-71110628844c@weissschuh.net
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
arch/alpha/kernel/pci-sysfs.c
drivers/misc/ocxl/sysfs.c
drivers/pci/p2pdma.c
drivers/pci/pci-sysfs.c
drivers/platform/x86/intel/pmt/class.c
drivers/uio/uio_hv_generic.c
include/linux/sysfs.h