[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <201808070355.t1rEM1C3%fengguang.wu@intel.com>
Date: Tue, 7 Aug 2018 03:51:34 +0800
From: kbuild test robot <lkp@...el.com>
To: Al Viro <viro@...IV.linux.org.uk>
Cc: kbuild-all@...org, Rahul Lakkireddy <rahul.lakkireddy@...lsio.com>,
netdev@...r.kernel.org, Hariprasad Shenai <hariprasad@...lsio.com>,
"David S. Miller" <davem@...emloft.net>
Subject: Re: [endianness bug?] cxgb4_next_header .match_val/.match_mask
should be net-endian
Hi Al,
Thank you for the patch! Perhaps something to improve:
[auto build test WARNING on net-next/master]
[also build test WARNING on v4.18-rc8 next-20180806]
[if your patch is applied to the wrong git tree, please drop us a note to help improve the system]
url: https://github.com/0day-ci/linux/commits/Al-Viro/cxgb4_next_header-match_val-match_mask-should-be-net-endian/20180806-183127
reproduce:
# apt-get install sparse
make ARCH=x86_64 allmodconfig
make C=1 CF=-D__CHECK_ENDIAN__
sparse warnings: (new ones prefixed by >>)
>> drivers/net/ethernet/chelsio/cxgb4/cxgb4_tc_u32_parse.h:262:40: sparse: incorrect type in initializer (different base types) @@ expected unsigned int [unsigned] [usertype] match_val @@ got ed int [unsigned] [usertype] match_val @@
drivers/net/ethernet/chelsio/cxgb4/cxgb4_tc_u32_parse.h:262:40: expected unsigned int [unsigned] [usertype] match_val
drivers/net/ethernet/chelsio/cxgb4/cxgb4_tc_u32_parse.h:262:40: got restricted __be32 [usertype] <noident>
>> drivers/net/ethernet/chelsio/cxgb4/cxgb4_tc_u32_parse.h:263:25: sparse: incorrect type in initializer (different base types) @@ expected unsigned int [unsigned] [usertype] match_mask @@ got ed int [unsigned] [usertype] match_mask @@
drivers/net/ethernet/chelsio/cxgb4/cxgb4_tc_u32_parse.h:263:25: expected unsigned int [unsigned] [usertype] match_mask
drivers/net/ethernet/chelsio/cxgb4/cxgb4_tc_u32_parse.h:263:25: got restricted __be32 [usertype] <noident>
drivers/net/ethernet/chelsio/cxgb4/cxgb4_tc_u32_parse.h:265:40: sparse: incorrect type in initializer (different base types) @@ expected unsigned int [unsigned] [usertype] match_val @@ got ed int [unsigned] [usertype] match_val @@
drivers/net/ethernet/chelsio/cxgb4/cxgb4_tc_u32_parse.h:265:40: expected unsigned int [unsigned] [usertype] match_val
drivers/net/ethernet/chelsio/cxgb4/cxgb4_tc_u32_parse.h:265:40: got restricted __be32 [usertype] <noident>
drivers/net/ethernet/chelsio/cxgb4/cxgb4_tc_u32_parse.h:266:25: sparse: incorrect type in initializer (different base types) @@ expected unsigned int [unsigned] [usertype] match_mask @@ got ed int [unsigned] [usertype] match_mask @@
drivers/net/ethernet/chelsio/cxgb4/cxgb4_tc_u32_parse.h:266:25: expected unsigned int [unsigned] [usertype] match_mask
drivers/net/ethernet/chelsio/cxgb4/cxgb4_tc_u32_parse.h:266:25: got restricted __be32 [usertype] <noident>
drivers/net/ethernet/chelsio/cxgb4/cxgb4_tc_u32_parse.h:275:40: sparse: incorrect type in initializer (different base types) @@ expected unsigned int [unsigned] [usertype] match_val @@ got ed int [unsigned] [usertype] match_val @@
drivers/net/ethernet/chelsio/cxgb4/cxgb4_tc_u32_parse.h:275:40: expected unsigned int [unsigned] [usertype] match_val
drivers/net/ethernet/chelsio/cxgb4/cxgb4_tc_u32_parse.h:275:40: got restricted __be32 [usertype] <noident>
drivers/net/ethernet/chelsio/cxgb4/cxgb4_tc_u32_parse.h:276:25: sparse: incorrect type in initializer (different base types) @@ expected unsigned int [unsigned] [usertype] match_mask @@ got ed int [unsigned] [usertype] match_mask @@
drivers/net/ethernet/chelsio/cxgb4/cxgb4_tc_u32_parse.h:276:25: expected unsigned int [unsigned] [usertype] match_mask
drivers/net/ethernet/chelsio/cxgb4/cxgb4_tc_u32_parse.h:276:25: got restricted __be32 [usertype] <noident>
drivers/net/ethernet/chelsio/cxgb4/cxgb4_tc_u32_parse.h:278:40: sparse: incorrect type in initializer (different base types) @@ expected unsigned int [unsigned] [usertype] match_val @@ got ed int [unsigned] [usertype] match_val @@
drivers/net/ethernet/chelsio/cxgb4/cxgb4_tc_u32_parse.h:278:40: expected unsigned int [unsigned] [usertype] match_val
drivers/net/ethernet/chelsio/cxgb4/cxgb4_tc_u32_parse.h:278:40: got restricted __be32 [usertype] <noident>
drivers/net/ethernet/chelsio/cxgb4/cxgb4_tc_u32_parse.h:279:25: sparse: incorrect type in initializer (different base types) @@ expected unsigned int [unsigned] [usertype] match_mask @@ got ed int [unsigned] [usertype] match_mask @@
drivers/net/ethernet/chelsio/cxgb4/cxgb4_tc_u32_parse.h:279:25: expected unsigned int [unsigned] [usertype] match_mask
drivers/net/ethernet/chelsio/cxgb4/cxgb4_tc_u32_parse.h:279:25: got restricted __be32 [usertype] <noident>
drivers/net/ethernet/chelsio/cxgb4/cxgb4_tc_u32.c:56:21: sparse: incorrect type in assignment (different base types) @@ expected unsigned int [unsigned] [usertype] val @@ got ed int [unsigned] [usertype] val @@
drivers/net/ethernet/chelsio/cxgb4/cxgb4_tc_u32.c:56:21: expected unsigned int [unsigned] [usertype] val
drivers/net/ethernet/chelsio/cxgb4/cxgb4_tc_u32.c:56:21: got restricted __be32 [usertype] val
drivers/net/ethernet/chelsio/cxgb4/cxgb4_tc_u32.c:57:22: sparse: incorrect type in assignment (different base types) @@ expected unsigned int [unsigned] [usertype] mask @@ got ed int [unsigned] [usertype] mask @@
drivers/net/ethernet/chelsio/cxgb4/cxgb4_tc_u32.c:57:22: expected unsigned int [unsigned] [usertype] mask
drivers/net/ethernet/chelsio/cxgb4/cxgb4_tc_u32.c:57:22: got restricted __be32 [usertype] mask
drivers/net/ethernet/chelsio/cxgb4/cxgb4_tc_u32.c:236:59: sparse: restricted __be16 degrades to integer
drivers/net/ethernet/chelsio/cxgb4/cxgb4_tc_u32.c:246:37: sparse: incorrect type in assignment (different base types) @@ expected unsigned int [unsigned] [usertype] val @@ got ed int [unsigned] [usertype] val @@
drivers/net/ethernet/chelsio/cxgb4/cxgb4_tc_u32.c:246:37: expected unsigned int [unsigned] [usertype] val
drivers/net/ethernet/chelsio/cxgb4/cxgb4_tc_u32.c:246:37: got restricted __be32 [usertype] val
drivers/net/ethernet/chelsio/cxgb4/cxgb4_tc_u32.c:247:38: sparse: incorrect type in assignment (different base types) @@ expected unsigned int [unsigned] [usertype] mask @@ got ed int [unsigned] [usertype] mask @@
drivers/net/ethernet/chelsio/cxgb4/cxgb4_tc_u32.c:247:38: expected unsigned int [unsigned] [usertype] mask
drivers/net/ethernet/chelsio/cxgb4/cxgb4_tc_u32.c:247:38: got restricted __be32 [usertype] mask
include/linux/mm.h:591:13: sparse: undefined identifier '__builtin_mul_overflow'
drivers/net/ethernet/chelsio/cxgb4/cxgb4_tc_u32_parse.h:48:24: sparse: cast to restricted __be32
drivers/net/ethernet/chelsio/cxgb4/cxgb4_tc_u32_parse.h:48:24: sparse: cast to restricted __be32
drivers/net/ethernet/chelsio/cxgb4/cxgb4_tc_u32_parse.h:48:24: sparse: cast to restricted __be32
drivers/net/ethernet/chelsio/cxgb4/cxgb4_tc_u32_parse.h:48:24: sparse: cast to restricted __be32
drivers/net/ethernet/chelsio/cxgb4/cxgb4_tc_u32_parse.h:48:24: sparse: cast to restricted __be32
drivers/net/ethernet/chelsio/cxgb4/cxgb4_tc_u32_parse.h:48:24: sparse: cast to restricted __be32
drivers/net/ethernet/chelsio/cxgb4/cxgb4_tc_u32_parse.h:49:24: sparse: cast to restricted __be32
drivers/net/ethernet/chelsio/cxgb4/cxgb4_tc_u32_parse.h:49:24: sparse: cast to restricted __be32
drivers/net/ethernet/chelsio/cxgb4/cxgb4_tc_u32_parse.h:49:24: sparse: cast to restricted __be32
drivers/net/ethernet/chelsio/cxgb4/cxgb4_tc_u32_parse.h:49:24: sparse: cast to restricted __be32
drivers/net/ethernet/chelsio/cxgb4/cxgb4_tc_u32_parse.h:49:24: sparse: cast to restricted __be32
drivers/net/ethernet/chelsio/cxgb4/cxgb4_tc_u32_parse.h:49:24: sparse: cast to restricted __be32
drivers/net/ethernet/chelsio/cxgb4/cxgb4_tc_u32_parse.h:60:21: sparse: cast to restricted __be32
drivers/net/ethernet/chelsio/cxgb4/cxgb4_tc_u32_parse.h:60:21: sparse: cast to restricted __be32
drivers/net/ethernet/chelsio/cxgb4/cxgb4_tc_u32_parse.h:60:21: sparse: cast to restricted __be32
drivers/net/ethernet/chelsio/cxgb4/cxgb4_tc_u32_parse.h:60:21: sparse: cast to restricted __be32
drivers/net/ethernet/chelsio/cxgb4/cxgb4_tc_u32_parse.h:60:21: sparse: cast to restricted __be32
drivers/net/ethernet/chelsio/cxgb4/cxgb4_tc_u32_parse.h:60:21: sparse: cast to restricted __be32
drivers/net/ethernet/chelsio/cxgb4/cxgb4_tc_u32_parse.h:61:20: sparse: cast to restricted __be32
drivers/net/ethernet/chelsio/cxgb4/cxgb4_tc_u32_parse.h:61:20: sparse: cast to restricted __be32
drivers/net/ethernet/chelsio/cxgb4/cxgb4_tc_u32_parse.h:61:20: sparse: cast to restricted __be32
drivers/net/ethernet/chelsio/cxgb4/cxgb4_tc_u32_parse.h:61:20: sparse: cast to restricted __be32
drivers/net/ethernet/chelsio/cxgb4/cxgb4_tc_u32_parse.h:61:20: sparse: cast to restricted __be32
drivers/net/ethernet/chelsio/cxgb4/cxgb4_tc_u32_parse.h:61:20: sparse: cast to restricted __be32
drivers/net/ethernet/chelsio/cxgb4/cxgb4_tc_u32_parse.h:79:26: sparse: cast to restricted __be32
drivers/net/ethernet/chelsio/cxgb4/cxgb4_tc_u32_parse.h:79:26: sparse: cast to restricted __be32
drivers/net/ethernet/chelsio/cxgb4/cxgb4_tc_u32_parse.h:79:26: sparse: cast to restricted __be32
drivers/net/ethernet/chelsio/cxgb4/cxgb4_tc_u32_parse.h:79:26: sparse: cast to restricted __be32
drivers/net/ethernet/chelsio/cxgb4/cxgb4_tc_u32_parse.h:79:26: sparse: cast to restricted __be32
drivers/net/ethernet/chelsio/cxgb4/cxgb4_tc_u32_parse.h:79:26: sparse: cast to restricted __be32
drivers/net/ethernet/chelsio/cxgb4/cxgb4_tc_u32_parse.h:80:26: sparse: cast to restricted __be32
drivers/net/ethernet/chelsio/cxgb4/cxgb4_tc_u32_parse.h:80:26: sparse: cast to restricted __be32
drivers/net/ethernet/chelsio/cxgb4/cxgb4_tc_u32_parse.h:80:26: sparse: cast to restricted __be32
drivers/net/ethernet/chelsio/cxgb4/cxgb4_tc_u32_parse.h:80:26: sparse: cast to restricted __be32
drivers/net/ethernet/chelsio/cxgb4/cxgb4_tc_u32_parse.h:80:26: sparse: cast to restricted __be32
drivers/net/ethernet/chelsio/cxgb4/cxgb4_tc_u32_parse.h:80:26: sparse: cast to restricted __be32
drivers/net/ethernet/chelsio/cxgb4/cxgb4_tc_u32_parse.h:116:24: sparse: cast to restricted __be32
drivers/net/ethernet/chelsio/cxgb4/cxgb4_tc_u32_parse.h:116:24: sparse: cast to restricted __be32
drivers/net/ethernet/chelsio/cxgb4/cxgb4_tc_u32_parse.h:116:24: sparse: cast to restricted __be32
drivers/net/ethernet/chelsio/cxgb4/cxgb4_tc_u32_parse.h:116:24: sparse: cast to restricted __be32
drivers/net/ethernet/chelsio/cxgb4/cxgb4_tc_u32_parse.h:116:24: sparse: cast to restricted __be32
drivers/net/ethernet/chelsio/cxgb4/cxgb4_tc_u32_parse.h:116:24: sparse: cast to restricted __be32
drivers/net/ethernet/chelsio/cxgb4/cxgb4_tc_u32_parse.h:117:24: sparse: cast to restricted __be32
drivers/net/ethernet/chelsio/cxgb4/cxgb4_tc_u32_parse.h:117:24: sparse: cast to restricted __be32
drivers/net/ethernet/chelsio/cxgb4/cxgb4_tc_u32_parse.h:117:24: sparse: cast to restricted __be32
drivers/net/ethernet/chelsio/cxgb4/cxgb4_tc_u32_parse.h:117:24: sparse: cast to restricted __be32
drivers/net/ethernet/chelsio/cxgb4/cxgb4_tc_u32_parse.h:117:24: sparse: cast to restricted __be32
drivers/net/ethernet/chelsio/cxgb4/cxgb4_tc_u32_parse.h:117:24: sparse: cast to restricted __be32
drivers/net/ethernet/chelsio/cxgb4/cxgb4_tc_u32_parse.h:125:26: sparse: cast to restricted __be32
drivers/net/ethernet/chelsio/cxgb4/cxgb4_tc_u32_parse.h:125:26: sparse: cast to restricted __be32
drivers/net/ethernet/chelsio/cxgb4/cxgb4_tc_u32_parse.h:125:26: sparse: cast to restricted __be32
drivers/net/ethernet/chelsio/cxgb4/cxgb4_tc_u32_parse.h:125:26: sparse: cast to restricted __be32
drivers/net/ethernet/chelsio/cxgb4/cxgb4_tc_u32_parse.h:125:26: sparse: cast to restricted __be32
drivers/net/ethernet/chelsio/cxgb4/cxgb4_tc_u32_parse.h:125:26: sparse: cast to restricted __be32
drivers/net/ethernet/chelsio/cxgb4/cxgb4_tc_u32_parse.h:126:26: sparse: cast to restricted __be32
drivers/net/ethernet/chelsio/cxgb4/cxgb4_tc_u32_parse.h:126:26: sparse: cast to restricted __be32
drivers/net/ethernet/chelsio/cxgb4/cxgb4_tc_u32_parse.h:126:26: sparse: cast to restricted __be32
drivers/net/ethernet/chelsio/cxgb4/cxgb4_tc_u32_parse.h:126:26: sparse: cast to restricted __be32
drivers/net/ethernet/chelsio/cxgb4/cxgb4_tc_u32_parse.h:126:26: sparse: cast to restricted __be32
drivers/net/ethernet/chelsio/cxgb4/cxgb4_tc_u32_parse.h:126:26: sparse: cast to restricted __be32
drivers/net/ethernet/chelsio/cxgb4/cxgb4_tc_u32_parse.h:221:25: sparse: cast to restricted __be32
drivers/net/ethernet/chelsio/cxgb4/cxgb4_tc_u32_parse.h:221:25: sparse: cast to restricted __be32
drivers/net/ethernet/chelsio/cxgb4/cxgb4_tc_u32_parse.h:221:25: sparse: cast to restricted __be32
drivers/net/ethernet/chelsio/cxgb4/cxgb4_tc_u32_parse.h:221:25: sparse: cast to restricted __be32
drivers/net/ethernet/chelsio/cxgb4/cxgb4_tc_u32_parse.h:221:25: sparse: cast to restricted __be32
drivers/net/ethernet/chelsio/cxgb4/cxgb4_tc_u32_parse.h:221:25: sparse: cast to restricted __be32
vim +262 drivers/net/ethernet/chelsio/cxgb4/cxgb4_tc_u32_parse.h
256
257 /* Accept a rule with a jump to transport layer header based on IHL field in
258 * IPv4 header.
259 */
260 static const struct cxgb4_next_header cxgb4_ipv4_jumps[] = {
261 { .offset = 0, .offoff = 0, .shift = 6, .mask = 0xF,
> 262 .match_off = 8, .match_val = htonl(6 << 16),
> 263 .match_mask = htonl(0xff<<16), .jump = cxgb4_tcp_fields },
264 { .offset = 0, .offoff = 0, .shift = 6, .mask = 0xF,
265 .match_off = 8, .match_val = htonl(17 << 16),
266 .match_mask = htonl(0xff<<16), .jump = cxgb4_udp_fields },
267 { .jump = NULL }
268 };
269
---
0-DAY kernel test infrastructure Open Source Technology Center
https://lists.01.org/pipermail/kbuild-all Intel Corporation
Powered by blists - more mailing lists