tree: https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git master head: 9ae1fbdeabd3b3f668ad0bcb47d64b3a9fb4f8fc commit: 1e9258c389ee58b34238abaa600c10270b081af8 [10657/11322] fddi: defxx,defza: use dev_addr_set() config: mips-decstation_defconfig (attached as .config) compiler: mipsel-linux-gcc (GCC) 11.2.0 reproduce (this is a W=1 build): wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross chmod +x ~/bin/make.cross # https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git/commit/?id=1e9258c389ee58b34238abaa600c10270b081af8 git remote add linux-next https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git git fetch --no-tags linux-next master git checkout 1e9258c389ee58b34238abaa600c10270b081af8 # save the attached .config to linux build tree COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-11.2.0 make.cross ARCH=mips If you fix the issue, kindly add following tag as appropriate Reported-by: kernel test robot <lkp@xxxxxxxxx> All errors (new ones prefixed by >>): drivers/net/fddi/defza.c: In function 'fza_probe': >> drivers/net/fddi/defza.c:1383:27: error: passing argument 2 of 'dev_addr_set' from incompatible pointer type [-Werror=incompatible-pointer-types] 1383 | dev_addr_set(dev, &hw_addr); | ^~~~~~~~ | | | uint (*)[2] {aka unsigned int (*)[2]} In file included from drivers/net/fddi/defza.c:41: include/linux/netdevice.h:4651:67: note: expected 'const u8 *' {aka 'const unsigned char *'} but argument is of type 'uint (*)[2]' {aka 'unsigned int (*)[2]'} 4651 | static inline void dev_addr_set(struct net_device *dev, const u8 *addr) | ~~~~~~~~~~^~~~ cc1: some warnings being treated as errors vim +/dev_addr_set +1383 drivers/net/fddi/defza.c 1272 1273 static int fza_probe(struct device *bdev) 1274 { 1275 static const struct net_device_ops netdev_ops = { 1276 .ndo_open = fza_open, 1277 .ndo_stop = fza_close, 1278 .ndo_start_xmit = fza_start_xmit, 1279 .ndo_set_rx_mode = fza_set_rx_mode, 1280 .ndo_set_mac_address = fza_set_mac_address, 1281 .ndo_get_stats = fza_get_stats, 1282 }; 1283 static int version_printed; 1284 char rom_rev[4], fw_rev[4], rmc_rev[4]; 1285 struct tc_dev *tdev = to_tc_dev(bdev); 1286 struct fza_cmd_init __iomem *init; 1287 resource_size_t start, len; 1288 struct net_device *dev; 1289 struct fza_private *fp; 1290 uint smt_ver, pmd_type; 1291 void __iomem *mmio; 1292 uint hw_addr[2]; 1293 int ret, i; 1294 1295 if (!version_printed) { 1296 pr_info("%s", version); 1297 version_printed = 1; 1298 } 1299 1300 dev = alloc_fddidev(sizeof(*fp)); 1301 if (!dev) 1302 return -ENOMEM; 1303 SET_NETDEV_DEV(dev, bdev); 1304 1305 fp = netdev_priv(dev); 1306 dev_set_drvdata(bdev, dev); 1307 1308 fp->bdev = bdev; 1309 fp->name = dev_name(bdev); 1310 1311 /* Request the I/O MEM resource. */ 1312 start = tdev->resource.start; 1313 len = tdev->resource.end - start + 1; 1314 if (!request_mem_region(start, len, dev_name(bdev))) { 1315 pr_err("%s: cannot reserve MMIO region\n", fp->name); 1316 ret = -EBUSY; 1317 goto err_out_kfree; 1318 } 1319 1320 /* MMIO mapping setup. */ 1321 mmio = ioremap(start, len); 1322 if (!mmio) { 1323 pr_err("%s: cannot map MMIO\n", fp->name); 1324 ret = -ENOMEM; 1325 goto err_out_resource; 1326 } 1327 1328 /* Initialize the new device structure. */ 1329 switch (loopback) { 1330 case FZA_LOOP_NORMAL: 1331 case FZA_LOOP_INTERN: 1332 case FZA_LOOP_EXTERN: 1333 break; 1334 default: 1335 loopback = FZA_LOOP_NORMAL; 1336 } 1337 1338 fp->mmio = mmio; 1339 dev->irq = tdev->interrupt; 1340 1341 pr_info("%s: DEC FDDIcontroller 700 or 700-C at 0x%08llx, irq %d\n", 1342 fp->name, (long long)tdev->resource.start, dev->irq); 1343 pr_debug("%s: mapped at: 0x%p\n", fp->name, mmio); 1344 1345 fp->regs = mmio + FZA_REG_BASE; 1346 fp->ring_cmd = mmio + FZA_RING_CMD; 1347 fp->ring_uns = mmio + FZA_RING_UNS; 1348 1349 init_waitqueue_head(&fp->state_chg_wait); 1350 init_waitqueue_head(&fp->cmd_done_wait); 1351 spin_lock_init(&fp->lock); 1352 fp->int_mask = FZA_MASK_NORMAL; 1353 1354 timer_setup(&fp->reset_timer, fza_reset_timer, 0); 1355 1356 /* Sanitize the board. */ 1357 fza_regs_dump(fp); 1358 fza_do_shutdown(fp); 1359 1360 ret = request_irq(dev->irq, fza_interrupt, IRQF_SHARED, fp->name, dev); 1361 if (ret != 0) { 1362 pr_err("%s: unable to get IRQ %d!\n", fp->name, dev->irq); 1363 goto err_out_map; 1364 } 1365 1366 /* Enable the driver mode. */ 1367 writew_o(FZA_CONTROL_B_DRIVER, &fp->regs->control_b); 1368 1369 /* For some reason transmit done interrupts can trigger during 1370 * reset. This avoids a division error in the handler. 1371 */ 1372 fp->ring_rmc_tx_size = FZA_RING_TX_SIZE; 1373 1374 ret = fza_reset(fp); 1375 if (ret != 0) 1376 goto err_out_irq; 1377 1378 ret = fza_init_send(dev, &init); 1379 if (ret != 0) 1380 goto err_out_irq; 1381 1382 fza_reads(&init->hw_addr, &hw_addr, sizeof(hw_addr)); > 1383 dev_addr_set(dev, &hw_addr); 1384 1385 fza_reads(&init->rom_rev, &rom_rev, sizeof(rom_rev)); 1386 fza_reads(&init->fw_rev, &fw_rev, sizeof(fw_rev)); 1387 fza_reads(&init->rmc_rev, &rmc_rev, sizeof(rmc_rev)); 1388 for (i = 3; i >= 0 && rom_rev[i] == ' '; i--) 1389 rom_rev[i] = 0; 1390 for (i = 3; i >= 0 && fw_rev[i] == ' '; i--) 1391 fw_rev[i] = 0; 1392 for (i = 3; i >= 0 && rmc_rev[i] == ' '; i--) 1393 rmc_rev[i] = 0; 1394 1395 fp->ring_rmc_tx = mmio + readl_u(&init->rmc_tx); 1396 fp->ring_rmc_tx_size = readl_u(&init->rmc_tx_size); 1397 fp->ring_hst_rx = mmio + readl_u(&init->hst_rx); 1398 fp->ring_hst_rx_size = readl_u(&init->hst_rx_size); 1399 fp->ring_smt_tx = mmio + readl_u(&init->smt_tx); 1400 fp->ring_smt_tx_size = readl_u(&init->smt_tx_size); 1401 fp->ring_smt_rx = mmio + readl_u(&init->smt_rx); 1402 fp->ring_smt_rx_size = readl_u(&init->smt_rx_size); 1403 1404 fp->buffer_tx = mmio + FZA_TX_BUFFER_ADDR(readl_u(&init->rmc_tx)); 1405 1406 fp->t_max = readl_u(&init->def_t_max); 1407 fp->t_req = readl_u(&init->def_t_req); 1408 fp->tvx = readl_u(&init->def_tvx); 1409 fp->lem_threshold = readl_u(&init->lem_threshold); 1410 fza_reads(&init->def_station_id, &fp->station_id, 1411 sizeof(fp->station_id)); 1412 fp->rtoken_timeout = readl_u(&init->rtoken_timeout); 1413 fp->ring_purger = readl_u(&init->ring_purger); 1414 1415 smt_ver = readl_u(&init->smt_ver); 1416 pmd_type = readl_u(&init->pmd_type); 1417 1418 pr_debug("%s: INIT parameters:\n", fp->name); 1419 pr_debug(" tx_mode: %u\n", readl_u(&init->tx_mode)); 1420 pr_debug(" hst_rx_size: %u\n", readl_u(&init->hst_rx_size)); 1421 pr_debug(" rmc_rev: %.4s\n", rmc_rev); 1422 pr_debug(" rom_rev: %.4s\n", rom_rev); 1423 pr_debug(" fw_rev: %.4s\n", fw_rev); 1424 pr_debug(" mop_type: %u\n", readl_u(&init->mop_type)); 1425 pr_debug(" hst_rx: 0x%08x\n", readl_u(&init->hst_rx)); 1426 pr_debug(" rmc_tx: 0x%08x\n", readl_u(&init->rmc_tx)); 1427 pr_debug(" rmc_tx_size: %u\n", readl_u(&init->rmc_tx_size)); 1428 pr_debug(" smt_tx: 0x%08x\n", readl_u(&init->smt_tx)); 1429 pr_debug(" smt_tx_size: %u\n", readl_u(&init->smt_tx_size)); 1430 pr_debug(" smt_rx: 0x%08x\n", readl_u(&init->smt_rx)); 1431 pr_debug(" smt_rx_size: %u\n", readl_u(&init->smt_rx_size)); 1432 /* TC systems are always LE, so don't bother swapping. */ 1433 pr_debug(" hw_addr: 0x%02x%02x%02x%02x%02x%02x%02x%02x\n", 1434 (readl_u(&init->hw_addr[0]) >> 0) & 0xff, 1435 (readl_u(&init->hw_addr[0]) >> 8) & 0xff, 1436 (readl_u(&init->hw_addr[0]) >> 16) & 0xff, 1437 (readl_u(&init->hw_addr[0]) >> 24) & 0xff, 1438 (readl_u(&init->hw_addr[1]) >> 0) & 0xff, 1439 (readl_u(&init->hw_addr[1]) >> 8) & 0xff, 1440 (readl_u(&init->hw_addr[1]) >> 16) & 0xff, 1441 (readl_u(&init->hw_addr[1]) >> 24) & 0xff); 1442 pr_debug(" def_t_req: %u\n", readl_u(&init->def_t_req)); 1443 pr_debug(" def_tvx: %u\n", readl_u(&init->def_tvx)); 1444 pr_debug(" def_t_max: %u\n", readl_u(&init->def_t_max)); 1445 pr_debug(" lem_threshold: %u\n", readl_u(&init->lem_threshold)); 1446 /* Don't bother swapping, see above. */ 1447 pr_debug(" def_station_id: 0x%02x%02x%02x%02x%02x%02x%02x%02x\n", 1448 (readl_u(&init->def_station_id[0]) >> 0) & 0xff, 1449 (readl_u(&init->def_station_id[0]) >> 8) & 0xff, 1450 (readl_u(&init->def_station_id[0]) >> 16) & 0xff, 1451 (readl_u(&init->def_station_id[0]) >> 24) & 0xff, 1452 (readl_u(&init->def_station_id[1]) >> 0) & 0xff, 1453 (readl_u(&init->def_station_id[1]) >> 8) & 0xff, 1454 (readl_u(&init->def_station_id[1]) >> 16) & 0xff, 1455 (readl_u(&init->def_station_id[1]) >> 24) & 0xff); 1456 pr_debug(" pmd_type_alt: %u\n", readl_u(&init->pmd_type_alt)); 1457 pr_debug(" smt_ver: %u\n", readl_u(&init->smt_ver)); 1458 pr_debug(" rtoken_timeout: %u\n", readl_u(&init->rtoken_timeout)); 1459 pr_debug(" ring_purger: %u\n", readl_u(&init->ring_purger)); 1460 pr_debug(" smt_ver_max: %u\n", readl_u(&init->smt_ver_max)); 1461 pr_debug(" smt_ver_min: %u\n", readl_u(&init->smt_ver_min)); 1462 pr_debug(" pmd_type: %u\n", readl_u(&init->pmd_type)); 1463 1464 pr_info("%s: model %s, address %pMF\n", 1465 fp->name, 1466 pmd_type == FZA_PMD_TYPE_TW ? 1467 "700-C (DEFZA-CA), ThinWire PMD selected" : 1468 pmd_type == FZA_PMD_TYPE_STP ? 1469 "700-C (DEFZA-CA), STP PMD selected" : 1470 "700 (DEFZA-AA), MMF PMD", 1471 dev->dev_addr); 1472 pr_info("%s: ROM rev. %.4s, firmware rev. %.4s, RMC rev. %.4s, " 1473 "SMT ver. %u\n", fp->name, rom_rev, fw_rev, rmc_rev, smt_ver); 1474 1475 /* Now that we fetched initial parameters just shut the interface 1476 * until opened. 1477 */ 1478 ret = fza_close(dev); 1479 if (ret != 0) 1480 goto err_out_irq; 1481 1482 /* The FZA-specific entries in the device structure. */ 1483 dev->netdev_ops = &netdev_ops; 1484 1485 ret = register_netdev(dev); 1486 if (ret != 0) 1487 goto err_out_irq; 1488 1489 pr_info("%s: registered as %s\n", fp->name, dev->name); 1490 fp->name = (const char *)dev->name; 1491 1492 get_device(bdev); 1493 return 0; 1494 1495 err_out_irq: 1496 del_timer_sync(&fp->reset_timer); 1497 fza_do_shutdown(fp); 1498 free_irq(dev->irq, dev); 1499 1500 err_out_map: 1501 iounmap(mmio); 1502 1503 err_out_resource: 1504 release_mem_region(start, len); 1505 1506 err_out_kfree: 1507 pr_err("%s: initialization failure, aborting!\n", fp->name); 1508 free_netdev(dev); 1509 return ret; 1510 } 1511 --- 0-DAY CI Kernel Test Service, Intel Corporation https://lists.01.org/hyperkitty/list/kbuild-all@xxxxxxxxxxxx
Attachment:
.config.gz
Description: application/gzip