[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20241031-sysfs-const-bin_attr-v1-7-2281afa7f055@weissschuh.net>
Date: Thu, 31 Oct 2024 02:43:56 +0000
From: Thomas Weißschuh <linux@...ssschuh.net>
To: Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
"Rafael J. Wysocki" <rafael@...nel.org>
Cc: Dan Williams <dan.j.williams@...el.com>, linux-kernel@...r.kernel.org,
Thomas Weißschuh <linux@...ssschuh.net>
Subject: [PATCH RFC 07/10] sysfs: drop callback bin_attribute::llseek
The callback is never implemented, drop it.
Signed-off-by: Thomas Weißschuh <linux@...ssschuh.net>
---
fs/sysfs/file.c | 8 +-------
include/linux/sysfs.h | 2 --
2 files changed, 1 insertion(+), 9 deletions(-)
diff --git a/fs/sysfs/file.c b/fs/sysfs/file.c
index 6d39696b43069010b0ad0bdaadcf9002cb70c92c..3515c172ec8ff70b87847d226a1b3bc3b60826f9 100644
--- a/fs/sysfs/file.c
+++ b/fs/sysfs/file.c
@@ -170,13 +170,7 @@ static int sysfs_kf_bin_mmap(struct kernfs_open_file *of,
static loff_t sysfs_kf_bin_llseek(struct kernfs_open_file *of, loff_t offset,
int whence)
{
- struct bin_attribute *battr = of->kn->priv;
- struct kobject *kobj = of->kn->parent->priv;
-
- if (battr->llseek)
- return battr->llseek(of->file, kobj, battr, offset, whence);
- else
- return generic_file_llseek(of->file, offset, whence);
+ return generic_file_llseek(of->file, offset, whence);
}
static int sysfs_kf_bin_open(struct kernfs_open_file *of)
diff --git a/include/linux/sysfs.h b/include/linux/sysfs.h
index 9fcdc8cd3118f359742bfd8b708d5c3eff511042..8344c0198c61cc44995c38d46d926360e7a88873 100644
--- a/include/linux/sysfs.h
+++ b/include/linux/sysfs.h
@@ -307,8 +307,6 @@ struct bin_attribute {
char *, loff_t, size_t);
ssize_t (*write)(struct file *, struct kobject *, struct bin_attribute *,
char *, loff_t, size_t);
- loff_t (*llseek)(struct file *, struct kobject *, struct bin_attribute *,
- loff_t, int);
int (*mmap)(struct file *, struct kobject *, const struct bin_attribute *attr,
struct vm_area_struct *vma);
};
--
2.47.0
Powered by blists - more mailing lists