From: Oliver Hartkopp <socketcan@hartkopp.net>
To: Marc Kleine-Budde <mkl@pengutronix.de>
Cc: linux-can@vger.kernel.org
Subject: Re: [can:for-davem 18/19] net/can/gw.c:370:13: sparse: restricted __wsum degrades to integer
Date: Wed, 23 Jan 2013 10:06:33 +0100 [thread overview]
Message-ID: <50FFA819.8060708@hartkopp.net> (raw)
In-Reply-To: <50ff3c61.yH1i+RBrM59x8gEs%fengguang.wu@intel.com>
Hello Marc,
it was hard to make sparse to give this warning on my machine ...
For the records:
make C=1 CF="-D__CHECK_ENDIAN__"
made it :-)
I pushed a new commit to the cangw branch of ollis-can-next:
https://gitorious.org/~hartkopp/linux-can/ollis-can-next/commits/cangw
The commit is
https://gitorious.org/~hartkopp/linux-can/ollis-can-next/commit/4068160ad6f42436a40edf4b04ec47e86399b544
Please pull.
Thanks!
From 4068160ad6f42436a40edf4b04ec47e86399b544 Mon Sep 17 00:00:00 2001
From: Oliver Hartkopp <socketcan@hartkopp.net>
Date: Wed, 23 Jan 2013 09:45:39 +0100
Subject: [PATCH] can-gw: fix sparse warning
Signed-off-by: Oliver Hartkopp <socketcan@hartkopp.net>
---
net/can/gw.c | 8 ++++----
1 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/net/can/gw.c b/net/can/gw.c
index e12666e..acdd465 100644
--- a/net/can/gw.c
+++ b/net/can/gw.c
@@ -359,12 +359,12 @@ static void can_can_gw_rcv(struct sk_buff *skb, void *data)
*
* The Controller Area Network controllers only accept CAN frames with
* correct CRCs - which are not visible in the controller registers.
- * According to skbuff.h documentation the csum element for IP checksums
- * is undefined/unsued when ip_summed == CHECKSUM_UNNECESSARY. Only
- * CAN skbs can be processed here which already have this property.
+ * According to skbuff.h documentation the csum_start element for IP
+ * checksums is undefined/unsued when ip_summed == CHECKSUM_UNNECESSARY.
+ * Only CAN skbs can be processed here which already have this property.
*/
-#define cgw_hops(skb) ((skb)->csum)
+#define cgw_hops(skb) ((skb)->csum_start)
BUG_ON(skb->ip_summed != CHECKSUM_UNNECESSARY);
--
1.7.1
On 23.01.2013 02:26, kbuild test robot wrote:
> tree: git://gitorious.org/linux-can/linux-can-next for-davem
> head: 565836761aa8096f568c021f709a84076f35976a
> commit: 0bb45781da3270edfaf854b0dd9a40aca49c15dc [18/19] can: gw: add a variable limit for CAN frame routings
>
>
> sparse warnings: (new ones prefixed by >>)
>
>>> net/can/gw.c:370:13: sparse: restricted __wsum degrades to integer
> net/can/gw.c:402:26: sparse: restricted __wsum degrades to integer
>>> net/can/gw.c:402:24: sparse: incorrect type in assignment (different base types)
> net/can/gw.c:402:24: expected restricted __wsum [usertype] csum
> net/can/gw.c:402:24: got unsigned int
>
next prev parent reply other threads:[~2013-01-23 9:06 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-01-23 1:26 [can:for-davem 18/19] net/can/gw.c:370:13: sparse: restricted __wsum degrades to integer kbuild test robot
2013-01-23 9:06 ` Oliver Hartkopp [this message]
2013-01-23 9:18 ` Marc Kleine-Budde
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=50FFA819.8060708@hartkopp.net \
--to=socketcan@hartkopp.net \
--cc=linux-can@vger.kernel.org \
--cc=mkl@pengutronix.de \
/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;
as well as URLs for NNTP newsgroup(s).