aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/drivers/pci/pci-sysfs.c
diff options
context:
space:
mode:
authorThomas Weißschuh <linux@weissschuh.net>2024-11-03 17:03:36 +0000
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2024-11-05 14:00:28 +0100
commit699e7b85afb5d94b99b0a3edca7e9e93ea320c8f (patch)
tree894ec5b0c5b3ad03ab079980f2519cf603315e88 /drivers/pci/pci-sysfs.c
parentsysfs: treewide: constify attribute callback of bin_attribute::mmap() (diff)
downloadwireguard-linux-699e7b85afb5d94b99b0a3edca7e9e93ea320c8f.tar.xz
wireguard-linux-699e7b85afb5d94b99b0a3edca7e9e93ea320c8f.zip
sysfs: treewide: constify attribute callback of bin_attribute::llseek()
The llseek() 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: Krzysztof Wilczyński <kw@linux.com> Link: https://lore.kernel.org/r/20241103-sysfs-const-bin_attr-v2-7-71110628844c@weissschuh.net Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/pci/pci-sysfs.c')
-rw-r--r--drivers/pci/pci-sysfs.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/pci/pci-sysfs.c b/drivers/pci/pci-sysfs.c
index 0ad3427228b1..49bee70f7d37 100644
--- a/drivers/pci/pci-sysfs.c
+++ b/drivers/pci/pci-sysfs.c
@@ -841,7 +841,7 @@ static const struct attribute_group pci_dev_config_attr_group = {
static __maybe_unused loff_t
pci_llseek_resource(struct file *filep,
struct kobject *kobj __always_unused,
- struct bin_attribute *attr,
+ const struct bin_attribute *attr,
loff_t offset, int whence)
{
return fixed_size_llseek(filep, offset, whence, attr->size);