Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

debugfs_get_aux(): allow storing non-const void *

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>

authored by

Al Viro and committed by
Greg Kroah-Hartman
9d3b96be 00bbe512

+5 -5
+1 -1
drivers/staging/greybus/camera.c
··· 1128 1128 1129 1129 static int gb_camera_debugfs_open(struct inode *inode, struct file *file) 1130 1130 { 1131 - file->private_data = (void *)debugfs_get_aux(file); 1131 + file->private_data = debugfs_get_aux(file); 1132 1132 return 0; 1133 1133 } 1134 1134
+1 -1
fs/debugfs/file.c
··· 47 47 48 48 #define F_DENTRY(filp) ((filp)->f_path.dentry) 49 49 50 - const void *debugfs_get_aux(const struct file *file) 50 + void *debugfs_get_aux(const struct file *file) 51 51 { 52 52 return DEBUGFS_I(file_inode(file))->aux; 53 53 }
+1 -1
fs/debugfs/inode.c
··· 459 459 proxy_fops = &debugfs_noop_file_operations; 460 460 inode->i_fop = proxy_fops; 461 461 DEBUGFS_I(inode)->raw = real_fops; 462 - DEBUGFS_I(inode)->aux = aux; 462 + DEBUGFS_I(inode)->aux = (void *)aux; 463 463 464 464 d_instantiate(dentry, inode); 465 465 fsnotify_create(d_inode(dentry->d_parent), dentry);
+1 -1
fs/debugfs/internal.h
··· 19 19 const struct debugfs_short_fops *short_fops; 20 20 debugfs_automount_t automount; 21 21 }; 22 - const void *aux; 22 + void *aux; 23 23 }; 24 24 25 25 static inline struct debugfs_inode_info *DEBUGFS_I(struct inode *inode)
+1 -1
include/linux/debugfs.h
··· 162 162 163 163 void debugfs_lookup_and_remove(const char *name, struct dentry *parent); 164 164 165 - const void *debugfs_get_aux(const struct file *file); 165 + void *debugfs_get_aux(const struct file *file); 166 166 167 167 int debugfs_file_get(struct dentry *dentry); 168 168 void debugfs_file_put(struct dentry *dentry);