[PATCH V2 1/2] debugfs: fix declaration of debugfs_rename

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



debugfs_rename() declaration isn't same between CONFIG_DEBUG_FS
and !CONFIG_DEBUG_FS, which causes the following warning in case
of !CONFIG_DEBUG_FS:

   include/linux/debugfs.h:252:47: note: expected 'char *' but argument is of type 'const char *'
     252 |                 struct dentry *new_dir, char *new_name)
         |                                         ~~~~~~^~~~~~~~

So fix declaration of debugfs_rename().

Cc: Greg Kroah-Hartman <gregkh@xxxxxxxxxxxxxxxxxxx>
Reported-by: kernel test robot <lkp@xxxxxxxxx>
Signed-off-by: Ming Lei <ming.lei@xxxxxxxxxx>
---
 include/linux/debugfs.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/include/linux/debugfs.h b/include/linux/debugfs.h
index c869f1e73d75..bba0f514d97e 100644
--- a/include/linux/debugfs.h
+++ b/include/linux/debugfs.h
@@ -249,7 +249,7 @@ static inline ssize_t debugfs_attr_write(struct file *file,
 }
 
 static inline struct dentry *debugfs_rename(struct dentry *old_dir, struct dentry *old_dentry,
-                struct dentry *new_dir, char *new_name)
+                struct dentry *new_dir, const char *new_name)
 {
 	return ERR_PTR(-ENODEV);
 }
-- 
2.31.1




[Index of Archives]     [Linux RAID]     [Linux SCSI]     [Linux ATA RAID]     [IDE]     [Linux Wireless]     [Linux Kernel]     [ATH6KL]     [Linux Bluetooth]     [Linux Netdev]     [Kernel Newbies]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Device Mapper]

  Powered by Linux