tree:
https://android.googlesource.com/kernel/goldfish android-3.18
head: d03166b0fbc7b4e2f666b01f48aa26b12a5462d8
commit: 9330a80441f617103f18385993619f05fa948b71 [109/182] batman-adv: Fix debugfs path
for renamed hardif
config: x86_64-randconfig-s021-20210322 (attached as .config)
compiler: gcc-5 (Ubuntu 5.5.0-12ubuntu1) 5.5.0 20171010
reproduce:
# apt-get install sparse
# sparse version: v0.6.3-277-gc089cd2d-dirty
git remote add android-goldfish
https://android.googlesource.com/kernel/goldfish
git fetch --no-tags android-goldfish android-3.18
git checkout 9330a80441f617103f18385993619f05fa948b71
# save the attached .config to linux build tree
make W=1 C=1 CF='-fdiagnostic-prefix -D__CHECK_ENDIAN__' ARCH=x86_64
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp(a)intel.com>
sparse warnings: (new ones prefixed by >>)
> net/batman-adv/debugfs.c:507:63: sparse: sparse: incorrect type
in argument 4 (different modifiers) @@ expected char *new_name @@ got char const
*name @@
net/batman-adv/debugfs.c:507:63: sparse: expected char *new_name
net/batman-adv/debugfs.c:507:63: sparse: got char const *name
net/batman-adv/debugfs.c: In function 'batadv_debugfs_rename_hardif':
net/batman-adv/debugfs.c:507:56: warning: passing argument 4 of
'debugfs_rename' discards 'const' qualifier from pointer target type
[-Wdiscarded-qualifiers]
d = debugfs_rename(dir->d_parent, dir, dir->d_parent, name);
^
In file included from net/batman-adv/debugfs.c:21:0:
include/linux/debugfs.h:145:30: note: expected 'char *' but argument is of type
'const char *'
static inline struct dentry *debugfs_rename(struct dentry *old_dir, struct dentry
*old_dentry,
^
vim +507 net/batman-adv/debugfs.c
492
493 /**
494 * batadv_debugfs_rename_hardif() - Fix debugfs path for renamed hardif
495 * @hard_iface: hard interface which was renamed
496 */
497 void batadv_debugfs_rename_hardif(struct batadv_hard_iface *hard_iface)
498 {
499 const char *name = hard_iface->net_dev->name;
500 struct dentry *dir;
501 struct dentry *d;
502
503 dir = hard_iface->debug_dir;
504 if (!dir)
505 return;
506
507 d = debugfs_rename(dir->d_parent, dir, dir->d_parent,
name);
508 if (!d)
509 pr_err("Can't rename debugfs dir to %s\n", name);
510 }
511
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org