From: Al Viro <viro@zeniv.linux.org.uk>
To: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Cc: linux-fsdevel@vger.kernel.org
Subject: [PATCH 09/11] debugfs_get_aux(): allow storing non-const void *
Date: Wed, 2 Jul 2025 22:26:16 +0100 [thread overview]
Message-ID: <20250702212616.GI3406663@ZenIV> (raw)
In-Reply-To: <20250702211408.GA3406663@ZenIV>
typechecking is up to users, anyway...
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
---
drivers/staging/greybus/camera.c | 2 +-
fs/debugfs/file.c | 2 +-
fs/debugfs/inode.c | 2 +-
fs/debugfs/internal.h | 2 +-
include/linux/debugfs.h | 2 +-
5 files changed, 5 insertions(+), 5 deletions(-)
diff --git a/drivers/staging/greybus/camera.c b/drivers/staging/greybus/camera.c
index ec9fddfc0b14..5ac19c0055d9 100644
--- a/drivers/staging/greybus/camera.c
+++ b/drivers/staging/greybus/camera.c
@@ -1128,7 +1128,7 @@ static ssize_t gb_camera_debugfs_write(struct file *file,
static int gb_camera_debugfs_open(struct inode *inode, struct file *file)
{
- file->private_data = (void *)debugfs_get_aux(file);
+ file->private_data = debugfs_get_aux(file);
return 0;
}
diff --git a/fs/debugfs/file.c b/fs/debugfs/file.c
index 77784091a10f..3ec3324c2060 100644
--- a/fs/debugfs/file.c
+++ b/fs/debugfs/file.c
@@ -47,7 +47,7 @@ const struct file_operations debugfs_noop_file_operations = {
#define F_DENTRY(filp) ((filp)->f_path.dentry)
-const void *debugfs_get_aux(const struct file *file)
+void *debugfs_get_aux(const struct file *file)
{
return DEBUGFS_I(file_inode(file))->aux;
}
diff --git a/fs/debugfs/inode.c b/fs/debugfs/inode.c
index 30c4944e1862..43e5d1bf1f32 100644
--- a/fs/debugfs/inode.c
+++ b/fs/debugfs/inode.c
@@ -459,7 +459,7 @@ static struct dentry *__debugfs_create_file(const char *name, umode_t mode,
proxy_fops = &debugfs_noop_file_operations;
inode->i_fop = proxy_fops;
DEBUGFS_I(inode)->raw = real_fops;
- DEBUGFS_I(inode)->aux = aux;
+ DEBUGFS_I(inode)->aux = (void *)aux;
d_instantiate(dentry, inode);
fsnotify_create(d_inode(dentry->d_parent), dentry);
diff --git a/fs/debugfs/internal.h b/fs/debugfs/internal.h
index 93483fe84425..427987f81571 100644
--- a/fs/debugfs/internal.h
+++ b/fs/debugfs/internal.h
@@ -19,7 +19,7 @@ struct debugfs_inode_info {
const struct debugfs_short_fops *short_fops;
debugfs_automount_t automount;
};
- const void *aux;
+ void *aux;
};
static inline struct debugfs_inode_info *DEBUGFS_I(struct inode *inode)
diff --git a/include/linux/debugfs.h b/include/linux/debugfs.h
index a420152105d0..7cecda29447e 100644
--- a/include/linux/debugfs.h
+++ b/include/linux/debugfs.h
@@ -162,7 +162,7 @@ void debugfs_remove(struct dentry *dentry);
void debugfs_lookup_and_remove(const char *name, struct dentry *parent);
-const void *debugfs_get_aux(const struct file *file);
+void *debugfs_get_aux(const struct file *file);
int debugfs_file_get(struct dentry *dentry);
void debugfs_file_put(struct dentry *dentry);
--
2.39.5
next prev parent reply other threads:[~2025-07-02 21:26 UTC|newest]
Thread overview: 36+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-07-02 21:13 [PATCHES] assorted debugfs stuff Al Viro
2025-07-02 21:14 ` [PATCH 01/11] zynqmp: don't bother with debugfs_file_{get,put}() in proxied fops Al Viro
2025-07-02 21:15 ` [PATCH 02/11] hfi1: get rid of redundant debugfs_file_{get,put}() Al Viro
2025-07-02 21:16 ` [PATCH 03/11] regmap: " Al Viro
2025-07-03 11:10 ` Mark Brown
2025-07-02 21:16 ` [PATCH 04/11] resctrl: get rid of pointless debugfs_file_{get,put}() Al Viro
2025-07-02 21:24 ` Luck, Tony
2025-07-02 23:45 ` Reinette Chatre
2025-07-03 0:24 ` Al Viro
2025-07-03 5:40 ` Greg Kroah-Hartman
2025-07-03 15:10 ` Reinette Chatre
2025-07-02 21:17 ` [PATCH 05/11] vmscan: don't bother with debugfs_real_fops() Al Viro
2025-07-03 11:51 ` Matthew Wilcox
2025-07-04 4:07 ` Al Viro
2025-07-02 21:22 ` [PATCH 06/11] netronome: " Al Viro
2025-07-03 7:11 ` Louis Peens
2025-07-02 21:24 ` [PATCH 07/11] debugfs: split short and full proxy wrappers, kill debugfs_real_fops() Al Viro
2025-07-02 21:25 ` [PATCH 08/11] fix tt_command_write() Al Viro
2025-07-03 11:14 ` Rafael J. Wysocki
2025-07-02 21:26 ` Al Viro [this message]
2025-07-02 21:28 ` [PATCH 10/11] blk-mq-debugfs: use debugfs_get_aux() Al Viro
2025-07-02 21:29 ` [PATCH 11/11] lpfc: don't use file->f_path.dentry for comparisons Al Viro
[not found] ` <b3ff59d4-c6c3-4b48-97e3-d32e98c12de7@broadcom.com>
[not found] ` <CAAmqgVMmgW4PWy289P4a8N0FSZA+cHybNkKbLzFx_qBQtu8ZHA@mail.gmail.com>
2025-07-03 20:37 ` Justin Tee
2025-07-04 4:25 ` Al Viro
2025-07-04 18:33 ` Justin Tee
2025-07-04 20:10 ` Al Viro
2025-07-07 19:29 ` Justin Tee
2025-07-08 2:57 ` Al Viro
2025-07-08 17:17 ` Justin Tee
2025-07-02 23:19 ` (subset) [PATCH 01/11] zynqmp: don't bother with debugfs_file_{get,put}() in proxied fops Jens Axboe
2025-07-03 0:23 ` Al Viro
2025-07-03 0:56 ` Jens Axboe
2025-07-03 11:37 ` Greg Kroah-Hartman
2025-07-03 15:10 ` Al Viro
2025-07-04 15:34 ` Mark Brown
2025-07-09 11:35 ` [PATCHES] assorted debugfs stuff Greg Kroah-Hartman
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20250702212616.GI3406663@ZenIV \
--to=viro@zeniv.linux.org.uk \
--cc=gregkh@linuxfoundation.org \
--cc=linux-fsdevel@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).