]> git.ipfire.org Git - thirdparty/kernel/stable.git/commitdiff
debugfs_get_aux(): allow storing non-const void *
authorAl Viro <viro@zeniv.linux.org.uk>
Wed, 2 Jul 2025 21:26:16 +0000 (22:26 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 9 Jul 2025 11:30:29 +0000 (13:30 +0200)
typechecking is up to users, anyway...

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Link: https://lore.kernel.org/r/20250702212616.GI3406663@ZenIV
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/greybus/camera.c
fs/debugfs/file.c
fs/debugfs/inode.c
fs/debugfs/internal.h
include/linux/debugfs.h

index ec9fddfc0b14d5f0ff8ba72f5af8ae96d84abcf1..5ac19c0055d95c377747efe5c9b811d2f4ed78ff 100644 (file)
@@ -1128,7 +1128,7 @@ done:
 
 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;
 }
 
index 77784091a10fc170db94c8b01d0f1431a7d05c26..3ec3324c20603bf22d85ba8ce2f0c0a77f2fd3a3 100644 (file)
@@ -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;
 }
index 30c4944e18622dcccee5c4dbc845ddcaecae5012..43e5d1bf1f32cdf37844f5ffc56acfcee3fa700a 100644 (file)
@@ -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);
index 93483fe844257c4bcae05641d4eb6b6855a77217..427987f815713e66d509a3c45fde04dab43f1432 100644 (file)
@@ -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)
index a420152105d09ef1ef48e7a1c3d848ebbbde9c9d..7cecda29447e3f45ed2b8a9ec485fc30af3f57a3 100644 (file)
@@ -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);