From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-7.2 required=3.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,MENTIONS_GIT_HOSTING,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED, USER_AGENT_SANE_1 autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 01AD1C10F00 for ; Sat, 7 Mar 2020 20:51:38 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id B537220684 for ; Sat, 7 Mar 2020 20:51:38 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org B537220684 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=intel.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=owner-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix) id 519326B0005; Sat, 7 Mar 2020 15:51:38 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id 4CA086B0006; Sat, 7 Mar 2020 15:51:38 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 3DF7B6B0007; Sat, 7 Mar 2020 15:51:38 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0239.hostedemail.com [216.40.44.239]) by kanga.kvack.org (Postfix) with ESMTP id 233CB6B0005 for ; Sat, 7 Mar 2020 15:51:38 -0500 (EST) Received: from smtpin09.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay01.hostedemail.com (Postfix) with ESMTP id D868F180AD804 for ; Sat, 7 Mar 2020 20:51:37 +0000 (UTC) X-FDA: 76569762234.09.food38_2b3e2f8d9f81a X-HE-Tag: food38_2b3e2f8d9f81a X-Filterd-Recvd-Size: 4724 Received: from mga17.intel.com (mga17.intel.com [192.55.52.151]) by imf03.hostedemail.com (Postfix) with ESMTP for ; Sat, 7 Mar 2020 20:51:36 +0000 (UTC) X-Amp-Result: UNKNOWN X-Amp-Original-Verdict: FILE UNKNOWN X-Amp-File-Uploaded: False Received: from orsmga008.jf.intel.com ([10.7.209.65]) by fmsmga107.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 07 Mar 2020 12:51:35 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.70,527,1574150400"; d="scan'208";a="235217111" Received: from lkp-server01.sh.intel.com (HELO lkp-server01) ([10.239.97.150]) by orsmga008.jf.intel.com with ESMTP; 07 Mar 2020 12:51:33 -0800 Received: from kbuild by lkp-server01 with local (Exim 4.89) (envelope-from ) id 1jAgQ1-0009Kh-3x; Sun, 08 Mar 2020 04:51:33 +0800 Date: Sun, 8 Mar 2020 04:51:08 +0800 From: kbuild test robot To: Andrew Morton Cc: kbuild-all@lists.01.org, Linux Memory Management List Subject: [linux-next:master 3601/7050] net/netfilter/nft_tunnel.c:376:30: sparse: sparse: incorrect type in assignment (different base types) Message-ID: <202003080405.J2cv93rA%lkp@intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.10.1 (2018-07-13) X-Bogosity: Ham, tests=bogofilter, spamicity=0.000001, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: 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 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@lists.01.org