From: Stephen Hemminger <shemminger@vyatta.com>
To: kernel-janitors@vger.kernel.org
Subject: Re: drivers/net/vxlan.c:676:53: sparse: incorrect type in argument 5 (different base types)
Date: Mon, 08 Oct 2012 16:51:14 +0000 [thread overview]
Message-ID: <20121008095114.1f21a07e@nehalam.linuxnetplumber.net> (raw)
In-Reply-To: <20121007123635.GB24374@localhost>
On Sun, 7 Oct 2012 20:36:35 +0800
Fengguang Wu <fengguang.wu@intel.com> wrote:
> Hi stephen,
>
> FYI, there are new sparse warnings show up in
>
> commit: d342894c5d2f8c7df194c793ec4059656e09ca31 vxlan: virtual extensible lan
>
> + drivers/net/vxlan.c:676:53: sparse: incorrect type in argument 5 (different base types)
> drivers/net/vxlan.c:676:53: expected restricted __be32 [usertype] gre_key
> drivers/net/vxlan.c:676:53: got unsigned int [unsigned] [usertype] vni
> + drivers/net/vxlan.c:706:20: sparse: incorrect type in assignment (different base types)
> drivers/net/vxlan.c:706:20: expected restricted __be16 [usertype] source
> drivers/net/vxlan.c:706:20: got unsigned int
> drivers/net/vxlan.c:1087:69: sparse: incorrect type in argument 3 (different base types)
> drivers/net/vxlan.c:1087:69: expected unsigned int [unsigned] [usertype] value
> drivers/net/vxlan.c:1087:69: got restricted __be32 const [usertype] gaddr
> drivers/net/vxlan.c:1093:69: sparse: incorrect type in argument 3 (different base types)
> drivers/net/vxlan.c:1093:69: expected unsigned int [unsigned] [usertype] value
> drivers/net/vxlan.c:1093:69: got restricted __be32 const [usertype] saddr
>
> vim +676 drivers/net/vxlan.c
>
> d342894c stephen hemminger 2012-10-01 660 else if (vxlan->gaddr) {
> d342894c stephen hemminger 2012-10-01 661 dst = vxlan->gaddr;
> d342894c stephen hemminger 2012-10-01 662 } else
> d342894c stephen hemminger 2012-10-01 663 goto drop;
> d342894c stephen hemminger 2012-10-01 664
> d342894c stephen hemminger 2012-10-01 665 ttl = vxlan->ttl;
> d342894c stephen hemminger 2012-10-01 666 if (!ttl && IN_MULTICAST(ntohl(dst)))
> d342894c stephen hemminger 2012-10-01 667 ttl = 1;
> d342894c stephen hemminger 2012-10-01 668
> d342894c stephen hemminger 2012-10-01 669 tos = vxlan->tos;
> d342894c stephen hemminger 2012-10-01 670 if (tos = 1)
> d342894c stephen hemminger 2012-10-01 671 tos = vxlan_get_dsfield(old_iph, skb);
> d342894c stephen hemminger 2012-10-01 672
> d342894c stephen hemminger 2012-10-01 673 hash = skb_get_rxhash(skb);
> d342894c stephen hemminger 2012-10-01 674
> d342894c stephen hemminger 2012-10-01 675 rt = ip_route_output_gre(dev_net(dev), &fl4, dst,
> d342894c stephen hemminger 2012-10-01 @676 vxlan->saddr, vxlan->vni,
> d342894c stephen hemminger 2012-10-01 677 RT_TOS(tos), vxlan->link);
> d342894c stephen hemminger 2012-10-01 678 if (IS_ERR(rt)) {
> d342894c stephen hemminger 2012-10-01 679 netdev_dbg(dev, "no route to %pI4\n", &dst);
> d342894c stephen hemminger 2012-10-01 680 dev->stats.tx_carrier_errors++;
> d342894c stephen hemminger 2012-10-01 681 goto tx_error;
> d342894c stephen hemminger 2012-10-01 682 }
> d342894c stephen hemminger 2012-10-01 683
> d342894c stephen hemminger 2012-10-01 684 if (rt->dst.dev = dev) {
>
> ---
> 0-DAY kernel build testing backend Open Source Technology Center
> Fengguang Wu, Yuanhan Liu Intel Corporation
Which version of sparse is this? I see no errors with the current version 4.4.
next prev parent reply other threads:[~2012-10-08 16:51 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-10-07 12:36 drivers/net/vxlan.c:676:53: sparse: incorrect type in argument 5 (different base types) Fengguang Wu
2012-10-08 16:51 ` Stephen Hemminger [this message]
2012-10-08 21:55 ` [PATCH] vxlan: fix more sparse warnings Stephen Hemminger
2012-10-08 21:58 ` David Miller
2012-10-09 8:56 ` drivers/net/vxlan.c:676:53: sparse: incorrect type in argument 5 (different base types) Dan Carpenter
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20121008095114.1f21a07e@nehalam.linuxnetplumber.net \
--to=shemminger@vyatta.com \
--cc=kernel-janitors@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox