tree: https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git master head: b86a6a241b7c60ca7a6ca4fb3c0d2aedbbf2c1b6 commit: e984c5a18b709f38ce85ded16b125fc79abf0ff5 [3601/7050] netfilter: nft_tunnel: add support for geneve opts reproduce: # apt-get install sparse # sparse version: v0.6.1-174-g094d5a94-dirty git checkout e984c5a18b709f38ce85ded16b125fc79abf0ff5 make ARCH=x86_64 allmodconfig make C=1 CF='-fdiagnostic-prefix -D__CHECK_ENDIAN__' If you fix the issue, kindly add following tag Reported-by: kbuild test robot <lkp@xxxxxxxxx> sparse warnings: (new ones prefixed by >>) >> net/netfilter/nft_tunnel.c:376:30: sparse: sparse: incorrect type in assignment (different base types) @@ expected int type @@ got restricted __be16 [usertyint type @@ net/netfilter/nft_tunnel.c:376:30: sparse: expected int type net/netfilter/nft_tunnel.c:376:30: sparse: got restricted __be16 [usertype] net/netfilter/nft_tunnel.c:384:30: sparse: sparse: incorrect type in assignment (different base types) @@ expected int type @@ got restricted __be16 [usertyint type @@ net/netfilter/nft_tunnel.c:384:30: sparse: expected int type net/netfilter/nft_tunnel.c:384:30: sparse: got restricted __be16 [usertype] net/netfilter/nft_tunnel.c:387:45: sparse: sparse: restricted __be16 degrades to integer net/netfilter/nft_tunnel.c:392:30: sparse: sparse: incorrect type in assignment (different base types) @@ expected int type @@ got restricted __be16 [usertyint type @@ net/netfilter/nft_tunnel.c:392:30: sparse: expected int type net/netfilter/nft_tunnel.c:392:30: sparse: got restricted __be16 [usertype] vim +376 net/netfilter/nft_tunnel.c 354 355 static int nft_tunnel_obj_opts_init(const struct nft_ctx *ctx, 356 const struct nlattr *attr, 357 struct ip_tunnel_info *info, 358 struct nft_tunnel_opts *opts) 359 { 360 int err, rem, type = 0; 361 struct nlattr *nla; 362 363 err = nla_validate_nested_deprecated(attr, NFTA_TUNNEL_KEY_OPTS_MAX, 364 nft_tunnel_opts_policy, NULL); 365 if (err < 0) 366 return err; 367 368 nla_for_each_attr(nla, nla_data(attr), nla_len(attr), rem) { 369 switch (nla_type(nla)) { 370 case NFTA_TUNNEL_KEY_OPTS_VXLAN: 371 if (type) 372 return -EINVAL; 373 err = nft_tunnel_obj_vxlan_init(nla, opts); 374 if (err) 375 return err; > 376 type = TUNNEL_VXLAN_OPT; 377 break; 378 case NFTA_TUNNEL_KEY_OPTS_ERSPAN: 379 if (type) 380 return -EINVAL; 381 err = nft_tunnel_obj_erspan_init(nla, opts); 382 if (err) 383 return err; 384 type = TUNNEL_ERSPAN_OPT; 385 break; 386 case NFTA_TUNNEL_KEY_OPTS_GENEVE: 387 if (type && type != TUNNEL_GENEVE_OPT) 388 return -EINVAL; 389 err = nft_tunnel_obj_geneve_init(nla, opts); 390 if (err) 391 return err; 392 type = TUNNEL_GENEVE_OPT; 393 break; 394 default: 395 return -EOPNOTSUPP; 396 } 397 } 398 399 return err; 400 } 401 --- 0-DAY CI Kernel Test Service, Intel Corporation https://lists.01.org/hyperkitty/list/kbuild-all@xxxxxxxxxxxx