Hi Alexander,
FYI, the error/warning still remains.
tree:
https://git.kernel.org/pub/scm/linux/kernel/git/sschmidt/wpan-next.git master
head: ff2dfbe03c56d6b537d26025dc56b900fe6eae12
commit: c0037234c69e275990fbb4e8c006869b53220e84 [4/8] net: add net available in
build_state
config: riscv-defconfig (attached as .config)
compiler: riscv64-linux-gcc (GCC) 7.5.0
reproduce:
wget
https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O
~/bin/make.cross
chmod +x ~/bin/make.cross
git checkout c0037234c69e275990fbb4e8c006869b53220e84
# save the attached .config to linux build tree
GCC_VERSION=7.5.0 make.cross ARCH=riscv
If you fix the issue, kindly add following tag
Reported-by: kbuild test robot <lkp(a)intel.com>
All errors (new ones prefixed by >>):
net/ipv4/fib_semantics.c: In function 'fib_nh_common_init':
net/ipv4/fib_semantics.c:593:30: warning: passing argument 1 of
'lwtunnel_build_state' makes integer from pointer without a cast
[-Wint-conversion]
err = lwtunnel_build_state(net, encap_type, encap,
^~~
In file included from net/ipv4/fib_semantics.c:44:0:
include/net/lwtunnel.h:212:19: note: expected 'u16 {aka short unsigned int}'
but argument is of type 'struct net *'
static inline int lwtunnel_build_state(u16 encap_type,
^~~~~~~~~~~~~~~~~~~~
net/ipv4/fib_semantics.c:593:35: warning: passing argument 2 of
'lwtunnel_build_state' makes pointer from integer without a cast
[-Wint-conversion]
err = lwtunnel_build_state(net, encap_type, encap,
^~~~~~~~~~
In file included from net/ipv4/fib_semantics.c:44:0:
include/net/lwtunnel.h:212:19: note: expected 'struct nlattr *' but argument is
of type 'u16 {aka short unsigned int}'
static inline int lwtunnel_build_state(u16 encap_type,
^~~~~~~~~~~~~~~~~~~~
net/ipv4/fib_semantics.c:593:47: warning: passing argument 3 of
'lwtunnel_build_state' makes integer from pointer without a cast
[-Wint-conversion]
err = lwtunnel_build_state(net, encap_type, encap,
^~~~~
In file included from net/ipv4/fib_semantics.c:44:0:
include/net/lwtunnel.h:212:19: note: expected 'unsigned int' but argument is of
type 'struct nlattr *'
static inline int lwtunnel_build_state(u16 encap_type,
^~~~~~~~~~~~~~~~~~~~
net/ipv4/fib_semantics.c:594:9: warning: passing argument 4 of
'lwtunnel_build_state' makes pointer from integer without a cast
[-Wint-conversion]
nhc->nhc_family, cfg, &lwtstate,
^~~
In file included from net/ipv4/fib_semantics.c:44:0:
include/net/lwtunnel.h:212:19: note: expected 'const void *' but argument is of
type 'u8 {aka unsigned char}'
static inline int lwtunnel_build_state(u16 encap_type,
^~~~~~~~~~~~~~~~~~~~
> net/ipv4/fib_semantics.c:594:31: error: passing argument 6 of
'lwtunnel_build_state' from incompatible pointer type
[-Werror=incompatible-pointer-types]
nhc->nhc_family, cfg,
&lwtstate,
^
In file included from net/ipv4/fib_semantics.c:44:0:
include/net/lwtunnel.h:212:19: note: expected 'struct netlink_ext_ack *' but
argument is of type 'struct lwtunnel_state **'
static inline int lwtunnel_build_state(u16 encap_type,
^~~~~~~~~~~~~~~~~~~~
> net/ipv4/fib_semantics.c:593:9: error: too many arguments to
function 'lwtunnel_build_state'
err = lwtunnel_build_state(net,
encap_type, encap,
^~~~~~~~~~~~~~~~~~~~
In file included from net/ipv4/fib_semantics.c:44:0:
include/net/lwtunnel.h:212:19: note: declared here
static inline int lwtunnel_build_state(u16 encap_type,
^~~~~~~~~~~~~~~~~~~~
net/ipv4/fib_semantics.c: In function 'fib_encap_match':
net/ipv4/fib_semantics.c:831:29: warning: passing argument 1 of
'lwtunnel_build_state' makes integer from pointer without a cast
[-Wint-conversion]
ret = lwtunnel_build_state(net, encap_type, encap, AF_INET,
^~~
In file included from net/ipv4/fib_semantics.c:44:0:
include/net/lwtunnel.h:212:19: note: expected 'u16 {aka short unsigned int}'
but argument is of type 'struct net *'
static inline int lwtunnel_build_state(u16 encap_type,
^~~~~~~~~~~~~~~~~~~~
net/ipv4/fib_semantics.c:831:34: warning: passing argument 2 of
'lwtunnel_build_state' makes pointer from integer without a cast
[-Wint-conversion]
ret = lwtunnel_build_state(net, encap_type, encap, AF_INET,
^~~~~~~~~~
In file included from net/ipv4/fib_semantics.c:44:0:
include/net/lwtunnel.h:212:19: note: expected 'struct nlattr *' but argument is
of type 'u16 {aka short unsigned int}'
static inline int lwtunnel_build_state(u16 encap_type,
^~~~~~~~~~~~~~~~~~~~
net/ipv4/fib_semantics.c:831:46: warning: passing argument 3 of
'lwtunnel_build_state' makes integer from pointer without a cast
[-Wint-conversion]
ret = lwtunnel_build_state(net, encap_type, encap, AF_INET,
^~~~~
In file included from net/ipv4/fib_semantics.c:44:0:
include/net/lwtunnel.h:212:19: note: expected 'unsigned int' but argument is of
type 'struct nlattr *'
static inline int lwtunnel_build_state(u16 encap_type,
^~~~~~~~~~~~~~~~~~~~
In file included from net/ipv4/fib_semantics.c:19:0:
include/linux/socket.h:165:18: warning: passing argument 4 of
'lwtunnel_build_state' makes pointer from integer without a cast
[-Wint-conversion]
#define AF_INET 2 /* Internet IP Protocol */
^
net/ipv4/fib_semantics.c:831:53: note: in expansion of macro 'AF_INET'
ret = lwtunnel_build_state(net, encap_type, encap, AF_INET,
^~~~~~~
In file included from net/ipv4/fib_semantics.c:44:0:
include/net/lwtunnel.h:212:19: note: expected 'const void *' but argument is of
type 'int'
static inline int lwtunnel_build_state(u16 encap_type,
^~~~~~~~~~~~~~~~~~~~
net/ipv4/fib_semantics.c:832:8: error: passing argument 5 of
'lwtunnel_build_state' from incompatible pointer type
[-Werror=incompatible-pointer-types]
cfg, &lwtstate, extack);
^~~
In file included from net/ipv4/fib_semantics.c:44:0:
include/net/lwtunnel.h:212:19: note: expected 'struct lwtunnel_state **' but
argument is of type 'const struct fib_config *'
static inline int lwtunnel_build_state(u16 encap_type,
^~~~~~~~~~~~~~~~~~~~
net/ipv4/fib_semantics.c:832:13: error: passing argument 6 of
'lwtunnel_build_state' from incompatible pointer type
[-Werror=incompatible-pointer-types]
cfg, &lwtstate, extack);
^
In file included from net/ipv4/fib_semantics.c:44:0:
include/net/lwtunnel.h:212:19: note: expected 'struct netlink_ext_ack *' but
argument is of type 'struct lwtunnel_state **'
static inline int lwtunnel_build_state(u16 encap_type,
^~~~~~~~~~~~~~~~~~~~
net/ipv4/fib_semantics.c:831:8: error: too many arguments to function
'lwtunnel_build_state'
ret = lwtunnel_build_state(net, encap_type, encap, AF_INET,
^~~~~~~~~~~~~~~~~~~~
In file included from net/ipv4/fib_semantics.c:44:0:
include/net/lwtunnel.h:212:19: note: declared here
static inline int lwtunnel_build_state(u16 encap_type,
^~~~~~~~~~~~~~~~~~~~
cc1: some warnings being treated as errors
vim +/lwtunnel_build_state +594 net/ipv4/fib_semantics.c
572
573 int fib_nh_common_init(struct net *net, struct fib_nh_common *nhc,
574 struct nlattr *encap, u16 encap_type,
575 void *cfg, gfp_t gfp_flags,
576 struct netlink_ext_ack *extack)
577 {
578 int err;
579
580 nhc->nhc_pcpu_rth_output = alloc_percpu_gfp(struct rtable __rcu *,
581 gfp_flags);
582 if (!nhc->nhc_pcpu_rth_output)
583 return -ENOMEM;
584
585 if (encap) {
586 struct lwtunnel_state *lwtstate;
587
588 if (encap_type == LWTUNNEL_ENCAP_NONE) {
589 NL_SET_ERR_MSG(extack, "LWT encap type not specified");
590 err = -EINVAL;
591 goto lwt_failure;
592 }
593 err = lwtunnel_build_state(net, encap_type, encap,
594 nhc->nhc_family, cfg, &lwtstate,
595 extack);
596 if (err)
597 goto lwt_failure;
598
599 nhc->nhc_lwtstate = lwtstate_get(lwtstate);
600 }
601
602 return 0;
603
604 lwt_failure:
605 rt_fibinfo_free_cpus(nhc->nhc_pcpu_rth_output);
606 nhc->nhc_pcpu_rth_output = NULL;
607 return err;
608 }
609 EXPORT_SYMBOL_GPL(fib_nh_common_init);
610
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org