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: alpha-randconfig-s031-20210120 (attached as .config)
compiler: alpha-linux-gcc (GCC) 5.5.0
reproduce:
wget
https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O
~/bin/make.cross
chmod +x ~/bin/make.cross
# apt-get install sparse
# sparse version: v0.6.3-208-g46a52ca4-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
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-5.5.0 make.cross C=1
CF='-fdiagnostic-prefix -D__CHECK_ENDIAN__' ARCH=alpha
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
In file included from include/linux/if_ether.h:23:0,
from include/uapi/linux/ethtool.h:17,
from include/linux/ethtool.h:16,
from include/linux/netdevice.h:43,
from net/batman-adv/main.h:169,
from net/batman-adv/debugfs.c:18:
include/linux/skbuff.h: In function 'skb_can_coalesce':
include/linux/skbuff.h:2513:14: warning: comparison between signed and unsigned integer
expressions [-Wsign-compare]
off == frag->page_offset + skb_frag_size(frag);
^
In file included from include/uapi/linux/stddef.h:1:0,
from include/linux/stddef.h:4,
from include/uapi/linux/posix_types.h:4,
from include/uapi/linux/types.h:13,
from include/linux/types.h:5,
from include/linux/thread_info.h:10,
from arch/alpha/include/asm/current.h:4,
from include/linux/mutex.h:13,
from net/batman-adv/main.h:167,
from net/batman-adv/debugfs.c:18:
include/linux/netdevice.h: In function 'get_netdev_rx_queue_index':
include/linux/netdevice.h:2819:15: warning: comparison between signed and unsigned
integer expressions [-Wsign-compare]
BUG_ON(index >= dev->num_rx_queues);
^
include/linux/compiler.h:176:42: note: in definition of macro 'unlikely'
# define unlikely(x) __builtin_expect(!!(x), 0)
^
include/linux/netdevice.h:2819:2: note: in expansion of macro 'BUG_ON'
BUG_ON(index >= dev->num_rx_queues);
^
In file included from net/batman-adv/main.h:169:0,
from net/batman-adv/debugfs.c:18:
include/linux/netdevice.h: In function 'netif_msg_init':
include/linux/netdevice.h:3089:37: warning: comparison between signed and unsigned
integer expressions [-Wsign-compare]
if (debug_value < 0 || debug_value >= (sizeof(u32) * 8))
^
In file included from include/net/sock.h:63:0,
from net/batman-adv/main.h:178,
from net/batman-adv/debugfs.c:18:
include/linux/filter.h: In function 'bpf_needs_clear_a':
include/linux/filter.h:440:16: warning: comparison between signed and unsigned integer
expressions [-Wsign-compare]
if (first->k == SKF_AD_OFF + SKF_AD_ALU_XOR_X)
^
In file included from include/net/rtnetlink.h:5:0,
from include/net/neighbour.h:29,
from include/net/dst.h:17,
from include/net/sock.h:68,
from net/batman-adv/main.h:178,
from net/batman-adv/debugfs.c:18:
include/net/netlink.h: In function 'nlmsg_ok':
include/net/netlink.h:334:18: warning: comparison between signed and unsigned integer
expressions [-Wsign-compare]
nlh->nlmsg_len <= remaining);
^
include/net/netlink.h: In function 'nlmsg_parse':
include/net/netlink.h:369:21: warning: comparison between signed and unsigned integer
expressions [-Wsign-compare]
if (nlh->nlmsg_len < nlmsg_msg_size(hdrlen))
^
include/net/netlink.h: In function 'nlmsg_validate':
include/net/netlink.h:402:21: warning: comparison between signed and unsigned integer
expressions [-Wsign-compare]
if (nlh->nlmsg_len < nlmsg_msg_size(hdrlen))
^
In file included from include/net/neighbour.h:29:0,
from include/net/dst.h:17,
from include/net/sock.h:68,
from net/batman-adv/main.h:178,
from net/batman-adv/debugfs.c:18:
include/net/rtnetlink.h: In function 'rtnl_msg_family':
include/net/rtnetlink.h:20:21: warning: comparison between signed and unsigned integer
expressions [-Wsign-compare]
if (nlmsg_len(nlh) >= sizeof(struct rtgenmsg))
^
In file included from net/batman-adv/originator.h:21:0,
from net/batman-adv/debugfs.c:25:
net/batman-adv/hash.h: In function 'batadv_hash_bytes':
net/batman-adv/hash.h:96:16: warning: comparison between signed and unsigned integer
expressions [-Wsign-compare]
for (i = 0; i < size; i++) {
^
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