drivers/net/ethernet/qlogic/qed/qed_init_fw_funcs.c:1377:21: sparse: sparse: incorrect type in assignment (different base types)
From: kbuild test robot
Date: Wed May 27 2020 - 08:27:52 EST
tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head: 444fc5cde64330661bf59944c43844e7d4c2ccd8
commit: 804c5702fc583afbdb6860f79e9d4058570ccc43 qed: Use dmae to write to widebus registers in fw_funcs
date: 4 months ago
config: ia64-randconfig-s032-20200527 (attached as .config)
compiler: ia64-linux-gcc (GCC) 9.3.0
reproduce:
# apt-get install sparse
# sparse version: v0.6.1-240-gf0fe1cd9-dirty
git checkout 804c5702fc583afbdb6860f79e9d4058570ccc43
# save the attached .config to linux build tree
make W=1 C=1 ARCH=ia64 CF='-fdiagnostic-prefix -D__CHECK_ENDIAN__'
If you fix the issue, kindly add following tag as appropriate
Reported-by: kbuild test robot <lkp@xxxxxxxxx>
sparse warnings: (new ones prefixed by >>)
drivers/net/ethernet/qlogic/qed/qed_init_fw_funcs.c:545:17: sparse: right side has type int
drivers/net/ethernet/qlogic/qed/qed_init_fw_funcs.c:545:17: sparse: sparse: invalid assignment: |=
drivers/net/ethernet/qlogic/qed/qed_init_fw_funcs.c:545:17: sparse: left side has type restricted __le32
drivers/net/ethernet/qlogic/qed/qed_init_fw_funcs.c:545:17: sparse: right side has type unsigned long long
drivers/net/ethernet/qlogic/qed/qed_init_fw_funcs.c:1343:9: sparse: sparse: invalid assignment: &=
drivers/net/ethernet/qlogic/qed/qed_init_fw_funcs.c:1343:9: sparse: left side has type restricted __le32
drivers/net/ethernet/qlogic/qed/qed_init_fw_funcs.c:1343:9: sparse: right side has type int
drivers/net/ethernet/qlogic/qed/qed_init_fw_funcs.c:1343:9: sparse: sparse: invalid assignment: |=
drivers/net/ethernet/qlogic/qed/qed_init_fw_funcs.c:1343:9: sparse: left side has type restricted __le32
drivers/net/ethernet/qlogic/qed/qed_init_fw_funcs.c:1343:9: sparse: right side has type unsigned long long
drivers/net/ethernet/qlogic/qed/qed_init_fw_funcs.c:1344:9: sparse: sparse: invalid assignment: &=
drivers/net/ethernet/qlogic/qed/qed_init_fw_funcs.c:1344:9: sparse: left side has type restricted __le32
drivers/net/ethernet/qlogic/qed/qed_init_fw_funcs.c:1344:9: sparse: right side has type int
drivers/net/ethernet/qlogic/qed/qed_init_fw_funcs.c:1344:9: sparse: sparse: invalid assignment: |=
drivers/net/ethernet/qlogic/qed/qed_init_fw_funcs.c:1344:9: sparse: left side has type restricted __le32
drivers/net/ethernet/qlogic/qed/qed_init_fw_funcs.c:1344:9: sparse: right side has type unsigned long long
drivers/net/ethernet/qlogic/qed/qed_init_fw_funcs.c:1347:17: sparse: sparse: invalid assignment: &=
drivers/net/ethernet/qlogic/qed/qed_init_fw_funcs.c:1347:17: sparse: left side has type restricted __le32
drivers/net/ethernet/qlogic/qed/qed_init_fw_funcs.c:1347:17: sparse: right side has type int
drivers/net/ethernet/qlogic/qed/qed_init_fw_funcs.c:1347:17: sparse: sparse: invalid assignment: |=
drivers/net/ethernet/qlogic/qed/qed_init_fw_funcs.c:1347:17: sparse: left side has type restricted __le32
drivers/net/ethernet/qlogic/qed/qed_init_fw_funcs.c:1347:17: sparse: right side has type unsigned long long
drivers/net/ethernet/qlogic/qed/qed_init_fw_funcs.c:1348:17: sparse: sparse: invalid assignment: &=
drivers/net/ethernet/qlogic/qed/qed_init_fw_funcs.c:1348:17: sparse: left side has type restricted __le32
drivers/net/ethernet/qlogic/qed/qed_init_fw_funcs.c:1348:17: sparse: right side has type int
drivers/net/ethernet/qlogic/qed/qed_init_fw_funcs.c:1348:17: sparse: sparse: invalid assignment: |=
drivers/net/ethernet/qlogic/qed/qed_init_fw_funcs.c:1348:17: sparse: left side has type restricted __le32
drivers/net/ethernet/qlogic/qed/qed_init_fw_funcs.c:1348:17: sparse: right side has type unsigned long long
drivers/net/ethernet/qlogic/qed/qed_init_fw_funcs.c:1349:17: sparse: sparse: invalid assignment: &=
drivers/net/ethernet/qlogic/qed/qed_init_fw_funcs.c:1349:17: sparse: left side has type restricted __le32
drivers/net/ethernet/qlogic/qed/qed_init_fw_funcs.c:1349:17: sparse: right side has type int
drivers/net/ethernet/qlogic/qed/qed_init_fw_funcs.c:1349:17: sparse: sparse: invalid assignment: |=
drivers/net/ethernet/qlogic/qed/qed_init_fw_funcs.c:1349:17: sparse: left side has type restricted __le32
drivers/net/ethernet/qlogic/qed/qed_init_fw_funcs.c:1349:17: sparse: right side has type unsigned long long
drivers/net/ethernet/qlogic/qed/qed_init_fw_funcs.c:1350:17: sparse: sparse: invalid assignment: &=
drivers/net/ethernet/qlogic/qed/qed_init_fw_funcs.c:1350:17: sparse: left side has type restricted __le32
drivers/net/ethernet/qlogic/qed/qed_init_fw_funcs.c:1350:17: sparse: right side has type int
drivers/net/ethernet/qlogic/qed/qed_init_fw_funcs.c:1350:17: sparse: sparse: invalid assignment: |=
drivers/net/ethernet/qlogic/qed/qed_init_fw_funcs.c:1350:17: sparse: left side has type restricted __le32
drivers/net/ethernet/qlogic/qed/qed_init_fw_funcs.c:1350:17: sparse: right side has type unsigned long long
drivers/net/ethernet/qlogic/qed/qed_init_fw_funcs.c:1351:17: sparse: sparse: invalid assignment: &=
drivers/net/ethernet/qlogic/qed/qed_init_fw_funcs.c:1351:17: sparse: left side has type restricted __le32
drivers/net/ethernet/qlogic/qed/qed_init_fw_funcs.c:1351:17: sparse: right side has type int
drivers/net/ethernet/qlogic/qed/qed_init_fw_funcs.c:1351:17: sparse: sparse: invalid assignment: |=
drivers/net/ethernet/qlogic/qed/qed_init_fw_funcs.c:1351:17: sparse: left side has type restricted __le32
drivers/net/ethernet/qlogic/qed/qed_init_fw_funcs.c:1351:17: sparse: right side has type unsigned long long
drivers/net/ethernet/qlogic/qed/qed_init_fw_funcs.c:1352:17: sparse: sparse: invalid assignment: &=
drivers/net/ethernet/qlogic/qed/qed_init_fw_funcs.c:1352:17: sparse: left side has type restricted __le32
drivers/net/ethernet/qlogic/qed/qed_init_fw_funcs.c:1352:17: sparse: right side has type int
drivers/net/ethernet/qlogic/qed/qed_init_fw_funcs.c:1352:17: sparse: sparse: invalid assignment: |=
drivers/net/ethernet/qlogic/qed/qed_init_fw_funcs.c:1352:17: sparse: left side has type restricted __le32
drivers/net/ethernet/qlogic/qed/qed_init_fw_funcs.c:1352:17: sparse: right side has type unsigned long long
drivers/net/ethernet/qlogic/qed/qed_init_fw_funcs.c:1354:17: sparse: sparse: invalid assignment: &=
drivers/net/ethernet/qlogic/qed/qed_init_fw_funcs.c:1354:17: sparse: left side has type restricted __le32
drivers/net/ethernet/qlogic/qed/qed_init_fw_funcs.c:1354:17: sparse: right side has type int
drivers/net/ethernet/qlogic/qed/qed_init_fw_funcs.c:1354:17: sparse: sparse: invalid assignment: |=
drivers/net/ethernet/qlogic/qed/qed_init_fw_funcs.c:1354:17: sparse: left side has type restricted __le32
drivers/net/ethernet/qlogic/qed/qed_init_fw_funcs.c:1354:17: sparse: right side has type unsigned long long
drivers/net/ethernet/qlogic/qed/qed_init_fw_funcs.c:1355:17: sparse: sparse: invalid assignment: &=
drivers/net/ethernet/qlogic/qed/qed_init_fw_funcs.c:1355:17: sparse: left side has type restricted __le32
drivers/net/ethernet/qlogic/qed/qed_init_fw_funcs.c:1355:17: sparse: right side has type int
drivers/net/ethernet/qlogic/qed/qed_init_fw_funcs.c:1355:17: sparse: sparse: invalid assignment: |=
drivers/net/ethernet/qlogic/qed/qed_init_fw_funcs.c:1355:17: sparse: left side has type restricted __le32
drivers/net/ethernet/qlogic/qed/qed_init_fw_funcs.c:1355:17: sparse: right side has type unsigned long long
drivers/net/ethernet/qlogic/qed/qed_init_fw_funcs.c:1356:17: sparse: sparse: invalid assignment: &=
drivers/net/ethernet/qlogic/qed/qed_init_fw_funcs.c:1356:17: sparse: left side has type restricted __le32
drivers/net/ethernet/qlogic/qed/qed_init_fw_funcs.c:1356:17: sparse: right side has type int
drivers/net/ethernet/qlogic/qed/qed_init_fw_funcs.c:1356:17: sparse: sparse: invalid assignment: |=
drivers/net/ethernet/qlogic/qed/qed_init_fw_funcs.c:1356:17: sparse: left side has type restricted __le32
drivers/net/ethernet/qlogic/qed/qed_init_fw_funcs.c:1356:17: sparse: right side has type unsigned long long
drivers/net/ethernet/qlogic/qed/qed_init_fw_funcs.c:1358:17: sparse: sparse: invalid assignment: &=
drivers/net/ethernet/qlogic/qed/qed_init_fw_funcs.c:1358:17: sparse: left side has type restricted __le32
drivers/net/ethernet/qlogic/qed/qed_init_fw_funcs.c:1358:17: sparse: right side has type int
drivers/net/ethernet/qlogic/qed/qed_init_fw_funcs.c:1358:17: sparse: sparse: invalid assignment: |=
drivers/net/ethernet/qlogic/qed/qed_init_fw_funcs.c:1358:17: sparse: left side has type restricted __le32
drivers/net/ethernet/qlogic/qed/qed_init_fw_funcs.c:1358:17: sparse: right side has type unsigned long long
drivers/net/ethernet/qlogic/qed/qed_init_fw_funcs.c:1359:17: sparse: sparse: invalid assignment: &=
drivers/net/ethernet/qlogic/qed/qed_init_fw_funcs.c:1359:17: sparse: left side has type restricted __le32
drivers/net/ethernet/qlogic/qed/qed_init_fw_funcs.c:1359:17: sparse: right side has type int
drivers/net/ethernet/qlogic/qed/qed_init_fw_funcs.c:1359:17: sparse: sparse: invalid assignment: |=
drivers/net/ethernet/qlogic/qed/qed_init_fw_funcs.c:1359:17: sparse: left side has type restricted __le32
drivers/net/ethernet/qlogic/qed/qed_init_fw_funcs.c:1359:17: sparse: right side has type unsigned long long
drivers/net/ethernet/qlogic/qed/qed_init_fw_funcs.c:1361:17: sparse: sparse: invalid assignment: &=
drivers/net/ethernet/qlogic/qed/qed_init_fw_funcs.c:1361:17: sparse: left side has type restricted __le32
drivers/net/ethernet/qlogic/qed/qed_init_fw_funcs.c:1361:17: sparse: right side has type int
drivers/net/ethernet/qlogic/qed/qed_init_fw_funcs.c:1361:17: sparse: sparse: invalid assignment: |=
drivers/net/ethernet/qlogic/qed/qed_init_fw_funcs.c:1361:17: sparse: left side has type restricted __le32
drivers/net/ethernet/qlogic/qed/qed_init_fw_funcs.c:1361:17: sparse: right side has type unsigned long long
drivers/net/ethernet/qlogic/qed/qed_init_fw_funcs.c:1362:17: sparse: sparse: invalid assignment: &=
drivers/net/ethernet/qlogic/qed/qed_init_fw_funcs.c:1362:17: sparse: left side has type restricted __le32
drivers/net/ethernet/qlogic/qed/qed_init_fw_funcs.c:1362:17: sparse: right side has type int
drivers/net/ethernet/qlogic/qed/qed_init_fw_funcs.c:1362:17: sparse: sparse: invalid assignment: |=
drivers/net/ethernet/qlogic/qed/qed_init_fw_funcs.c:1362:17: sparse: left side has type restricted __le32
drivers/net/ethernet/qlogic/qed/qed_init_fw_funcs.c:1362:17: sparse: right side has type unsigned long long
drivers/net/ethernet/qlogic/qed/qed_init_fw_funcs.c:1364:17: sparse: sparse: invalid assignment: &=
drivers/net/ethernet/qlogic/qed/qed_init_fw_funcs.c:1364:17: sparse: left side has type restricted __le32
drivers/net/ethernet/qlogic/qed/qed_init_fw_funcs.c:1364:17: sparse: right side has type int
drivers/net/ethernet/qlogic/qed/qed_init_fw_funcs.c:1364:17: sparse: sparse: invalid assignment: |=
drivers/net/ethernet/qlogic/qed/qed_init_fw_funcs.c:1364:17: sparse: left side has type restricted __le32
drivers/net/ethernet/qlogic/qed/qed_init_fw_funcs.c:1364:17: sparse: right side has type unsigned long long
>> drivers/net/ethernet/qlogic/qed/qed_init_fw_funcs.c:1377:21: sparse: sparse: incorrect type in assignment (different base types) @@ expected restricted __le32 [addressable] [usertype] lo @@ got unsigned int @@
drivers/net/ethernet/qlogic/qed/qed_init_fw_funcs.c:1377:21: sparse: expected restricted __le32 [addressable] [usertype] lo
drivers/net/ethernet/qlogic/qed/qed_init_fw_funcs.c:1377:21: sparse: got unsigned int
>> drivers/net/ethernet/qlogic/qed/qed_init_fw_funcs.c:1378:21: sparse: sparse: incorrect type in assignment (different base types) @@ expected restricted __le32 [addressable] [usertype] hi @@ got int @@
drivers/net/ethernet/qlogic/qed/qed_init_fw_funcs.c:1378:21: sparse: expected restricted __le32 [addressable] [usertype] hi
drivers/net/ethernet/qlogic/qed/qed_init_fw_funcs.c:1378:21: sparse: got int
drivers/net/ethernet/qlogic/qed/qed_init_fw_funcs.c:1419:23: sparse: sparse: cast to restricted __be32
drivers/net/ethernet/qlogic/qed/qed_init_fw_funcs.c:1419:23: sparse: sparse: cast to restricted __be32
drivers/net/ethernet/qlogic/qed/qed_init_fw_funcs.c:1419:23: sparse: sparse: cast to restricted __be32
drivers/net/ethernet/qlogic/qed/qed_init_fw_funcs.c:1419:23: sparse: sparse: cast to restricted __be32
drivers/net/ethernet/qlogic/qed/qed_init_fw_funcs.c:1419:23: sparse: sparse: cast to restricted __be32
drivers/net/ethernet/qlogic/qed/qed_init_fw_funcs.c:1419:23: sparse: sparse: cast to restricted __be32
vim +1377 drivers/net/ethernet/qlogic/qed/qed_init_fw_funcs.c
1263
1264 void qed_gft_config(struct qed_hwfn *p_hwfn,
1265 struct qed_ptt *p_ptt,
1266 u16 pf_id,
1267 bool tcp,
1268 bool udp,
1269 bool ipv4, bool ipv6, enum gft_profile_type profile_type)
1270 {
1271 u32 reg_val, cam_line, search_non_ip_as_gft;
1272 struct regpair ram_line = { };
1273
1274 if (!ipv6 && !ipv4)
1275 DP_NOTICE(p_hwfn,
1276 "gft_config: must accept at least on of - ipv4 or ipv6'\n");
1277 if (!tcp && !udp)
1278 DP_NOTICE(p_hwfn,
1279 "gft_config: must accept at least on of - udp or tcp\n");
1280 if (profile_type >= MAX_GFT_PROFILE_TYPE)
1281 DP_NOTICE(p_hwfn, "gft_config: unsupported gft_profile_type\n");
1282
1283 /* Set RFS event ID to be awakened i Tstorm By Prs */
1284 reg_val = T_ETH_PACKET_MATCH_RFS_EVENTID <<
1285 PRS_REG_CM_HDR_GFT_EVENT_ID_SHIFT;
1286 reg_val |= PARSER_ETH_CONN_CM_HDR << PRS_REG_CM_HDR_GFT_CM_HDR_SHIFT;
1287 qed_wr(p_hwfn, p_ptt, PRS_REG_CM_HDR_GFT, reg_val);
1288
1289 /* Do not load context only cid in PRS on match. */
1290 qed_wr(p_hwfn, p_ptt, PRS_REG_LOAD_L2_FILTER, 0);
1291
1292 /* Do not use tenant ID exist bit for gft search */
1293 qed_wr(p_hwfn, p_ptt, PRS_REG_SEARCH_TENANT_ID, 0);
1294
1295 /* Set Cam */
1296 cam_line = 0;
1297 SET_FIELD(cam_line, GFT_CAM_LINE_MAPPED_VALID, 1);
1298
1299 /* Filters are per PF!! */
1300 SET_FIELD(cam_line,
1301 GFT_CAM_LINE_MAPPED_PF_ID_MASK,
1302 GFT_CAM_LINE_MAPPED_PF_ID_MASK_MASK);
1303 SET_FIELD(cam_line, GFT_CAM_LINE_MAPPED_PF_ID, pf_id);
1304
1305 if (!(tcp && udp)) {
1306 SET_FIELD(cam_line,
1307 GFT_CAM_LINE_MAPPED_UPPER_PROTOCOL_TYPE_MASK,
1308 GFT_CAM_LINE_MAPPED_UPPER_PROTOCOL_TYPE_MASK_MASK);
1309 if (tcp)
1310 SET_FIELD(cam_line,
1311 GFT_CAM_LINE_MAPPED_UPPER_PROTOCOL_TYPE,
1312 GFT_PROFILE_TCP_PROTOCOL);
1313 else
1314 SET_FIELD(cam_line,
1315 GFT_CAM_LINE_MAPPED_UPPER_PROTOCOL_TYPE,
1316 GFT_PROFILE_UDP_PROTOCOL);
1317 }
1318
1319 if (!(ipv4 && ipv6)) {
1320 SET_FIELD(cam_line, GFT_CAM_LINE_MAPPED_IP_VERSION_MASK, 1);
1321 if (ipv4)
1322 SET_FIELD(cam_line,
1323 GFT_CAM_LINE_MAPPED_IP_VERSION,
1324 GFT_PROFILE_IPV4);
1325 else
1326 SET_FIELD(cam_line,
1327 GFT_CAM_LINE_MAPPED_IP_VERSION,
1328 GFT_PROFILE_IPV6);
1329 }
1330
1331 /* Write characteristics to cam */
1332 qed_wr(p_hwfn, p_ptt, PRS_REG_GFT_CAM + CAM_LINE_SIZE * pf_id,
1333 cam_line);
1334 cam_line =
1335 qed_rd(p_hwfn, p_ptt, PRS_REG_GFT_CAM + CAM_LINE_SIZE * pf_id);
1336
1337 /* Write line to RAM - compare to filter 4 tuple */
1338
1339 /* Search no IP as GFT */
1340 search_non_ip_as_gft = 0;
1341
1342 /* Tunnel type */
1343 SET_FIELD(ram_line.lo, GFT_RAM_LINE_TUNNEL_DST_PORT, 1);
1344 SET_FIELD(ram_line.lo, GFT_RAM_LINE_TUNNEL_OVER_IP_PROTOCOL, 1);
1345
1346 if (profile_type == GFT_PROFILE_TYPE_4_TUPLE) {
1347 SET_FIELD(ram_line.hi, GFT_RAM_LINE_DST_IP, 1);
1348 SET_FIELD(ram_line.hi, GFT_RAM_LINE_SRC_IP, 1);
1349 SET_FIELD(ram_line.hi, GFT_RAM_LINE_OVER_IP_PROTOCOL, 1);
1350 SET_FIELD(ram_line.lo, GFT_RAM_LINE_ETHERTYPE, 1);
1351 SET_FIELD(ram_line.lo, GFT_RAM_LINE_SRC_PORT, 1);
1352 SET_FIELD(ram_line.lo, GFT_RAM_LINE_DST_PORT, 1);
1353 } else if (profile_type == GFT_PROFILE_TYPE_L4_DST_PORT) {
1354 SET_FIELD(ram_line.hi, GFT_RAM_LINE_OVER_IP_PROTOCOL, 1);
1355 SET_FIELD(ram_line.lo, GFT_RAM_LINE_ETHERTYPE, 1);
1356 SET_FIELD(ram_line.lo, GFT_RAM_LINE_DST_PORT, 1);
1357 } else if (profile_type == GFT_PROFILE_TYPE_IP_DST_ADDR) {
1358 SET_FIELD(ram_line.hi, GFT_RAM_LINE_DST_IP, 1);
1359 SET_FIELD(ram_line.lo, GFT_RAM_LINE_ETHERTYPE, 1);
1360 } else if (profile_type == GFT_PROFILE_TYPE_IP_SRC_ADDR) {
1361 SET_FIELD(ram_line.hi, GFT_RAM_LINE_SRC_IP, 1);
1362 SET_FIELD(ram_line.lo, GFT_RAM_LINE_ETHERTYPE, 1);
1363 } else if (profile_type == GFT_PROFILE_TYPE_TUNNEL_TYPE) {
1364 SET_FIELD(ram_line.lo, GFT_RAM_LINE_TUNNEL_ETHERTYPE, 1);
1365
1366 /* Allow tunneled traffic without inner IP */
1367 search_non_ip_as_gft = 1;
1368 }
1369
1370 qed_wr(p_hwfn,
1371 p_ptt, PRS_REG_SEARCH_NON_IP_AS_GFT, search_non_ip_as_gft);
1372 qed_dmae_to_grc(p_hwfn, p_ptt, (u32 *)&ram_line,
1373 PRS_REG_GFT_PROFILE_MASK_RAM + RAM_LINE_SIZE * pf_id,
1374 sizeof(ram_line) / REG_SIZE);
1375
1376 /* Set default profile so that no filter match will happen */
> 1377 ram_line.lo = 0xffffffff;
> 1378 ram_line.hi = 0x3ff;
1379 qed_dmae_to_grc(p_hwfn, p_ptt, (u32 *)&ram_line,
1380 PRS_REG_GFT_PROFILE_MASK_RAM + RAM_LINE_SIZE *
1381 PRS_GFT_CAM_LINES_NO_MATCH,
1382 sizeof(ram_line) / REG_SIZE);
1383
1384 /* Enable gft search */
1385 qed_wr(p_hwfn, p_ptt, PRS_REG_SEARCH_GFT, 1);
1386 }
1387
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@xxxxxxxxxxxx
Attachment:
.config.gz
Description: application/gzip