tree: https://git.kernel.org/pub/scm/linux/kernel/git/davem/net-next.git master head: c5e62a24278ab343819dc35fee3684e6b4ba755d commit: 533dd11a12f698c571a12271b20f235792d3e148 [1147/1193] net: socionext: Add Synquacer NetSec driver config: m68k-allyesconfig (attached as .config) compiler: m68k-linux-gnu-gcc (Debian 7.2.0-11) 7.2.0 reproduce: wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross chmod +x ~/bin/make.cross git checkout 533dd11a12f698c571a12271b20f235792d3e148 # save the attached .config to linux build tree make.cross ARCH=m68k
All errors (new ones prefixed by >>): drivers/net/ethernet/socionext/netsec.c: In function 'netsec_probe': >> drivers/net/ethernet/socionext/netsec.c:1583:17: error: implicit declaration >> of function 'devm_ioremap'; did you mean '__ioremap'? >> [-Werror=implicit-function-declaration] priv->ioaddr = devm_ioremap(&pdev->dev, mmio_res->start, ^~~~~~~~~~~~ __ioremap drivers/net/ethernet/socionext/netsec.c:1583:15: warning: assignment makes pointer from integer without a cast [-Wint-conversion] priv->ioaddr = devm_ioremap(&pdev->dev, mmio_res->start, ^ drivers/net/ethernet/socionext/netsec.c:1591:20: warning: assignment makes pointer from integer without a cast [-Wint-conversion] priv->eeprom_base = devm_ioremap(&pdev->dev, eeprom_res->start, ^ cc1: some warnings being treated as errors vim +1583 drivers/net/ethernet/socionext/netsec.c 1532 1533 static int netsec_probe(struct platform_device *pdev) 1534 { 1535 struct resource *mmio_res, *eeprom_res, *irq_res; 1536 u8 *mac, macbuf[ETH_ALEN]; 1537 struct netsec_priv *priv; 1538 u32 hw_ver, phy_addr = 0; 1539 struct net_device *ndev; 1540 int ret; 1541 1542 mmio_res = platform_get_resource(pdev, IORESOURCE_MEM, 0); 1543 if (!mmio_res) { 1544 dev_err(&pdev->dev, "No MMIO resource found.\n"); 1545 return -ENODEV; 1546 } 1547 1548 eeprom_res = platform_get_resource(pdev, IORESOURCE_MEM, 1); 1549 if (!eeprom_res) { 1550 dev_info(&pdev->dev, "No EEPROM resource found.\n"); 1551 return -ENODEV; 1552 } 1553 1554 irq_res = platform_get_resource(pdev, IORESOURCE_IRQ, 0); 1555 if (!irq_res) { 1556 dev_err(&pdev->dev, "No IRQ resource found.\n"); 1557 return -ENODEV; 1558 } 1559 1560 ndev = alloc_etherdev(sizeof(*priv)); 1561 if (!ndev) 1562 return -ENOMEM; 1563 1564 priv = netdev_priv(ndev); 1565 1566 spin_lock_init(&priv->reglock); 1567 SET_NETDEV_DEV(ndev, &pdev->dev); 1568 platform_set_drvdata(pdev, priv); 1569 ndev->irq = irq_res->start; 1570 priv->dev = &pdev->dev; 1571 priv->ndev = ndev; 1572 1573 priv->msg_enable = NETIF_MSG_TX_ERR | NETIF_MSG_HW | NETIF_MSG_DRV | 1574 NETIF_MSG_LINK | NETIF_MSG_PROBE; 1575 1576 priv->phy_interface = device_get_phy_mode(&pdev->dev); 1577 if (priv->phy_interface < 0) { 1578 dev_err(&pdev->dev, "missing required property 'phy-mode'\n"); 1579 ret = -ENODEV; 1580 goto free_ndev; 1581 } 1582 > 1583 priv->ioaddr = devm_ioremap(&pdev->dev, mmio_res->start, 1584 resource_size(mmio_res)); 1585 if (!priv->ioaddr) { 1586 dev_err(&pdev->dev, "devm_ioremap() failed\n"); 1587 ret = -ENXIO; 1588 goto free_ndev; 1589 } 1590 1591 priv->eeprom_base = devm_ioremap(&pdev->dev, eeprom_res->start, 1592 resource_size(eeprom_res)); 1593 if (!priv->eeprom_base) { 1594 dev_err(&pdev->dev, "devm_ioremap() failed for EEPROM\n"); 1595 ret = -ENXIO; 1596 goto free_ndev; 1597 } 1598 1599 mac = device_get_mac_address(&pdev->dev, macbuf, sizeof(macbuf)); 1600 if (mac) 1601 ether_addr_copy(ndev->dev_addr, mac); 1602 1603 if (priv->eeprom_base && 1604 (!mac || !is_valid_ether_addr(ndev->dev_addr))) { 1605 void __iomem *macp = priv->eeprom_base + 1606 NETSEC_EEPROM_MAC_ADDRESS; 1607 1608 ndev->dev_addr[0] = readb(macp + 3); 1609 ndev->dev_addr[1] = readb(macp + 2); 1610 ndev->dev_addr[2] = readb(macp + 1); 1611 ndev->dev_addr[3] = readb(macp + 0); 1612 ndev->dev_addr[4] = readb(macp + 7); 1613 ndev->dev_addr[5] = readb(macp + 6); 1614 } 1615 1616 if (!is_valid_ether_addr(ndev->dev_addr)) { 1617 dev_warn(&pdev->dev, "No MAC address found, using random\n"); 1618 eth_hw_addr_random(ndev); 1619 } 1620 1621 if (dev_of_node(&pdev->dev)) 1622 ret = netsec_of_probe(pdev, priv); 1623 else 1624 ret = netsec_acpi_probe(pdev, priv, &phy_addr); 1625 if (ret) 1626 goto free_ndev; 1627 1628 if (!priv->freq) { 1629 dev_err(&pdev->dev, "missing PHY reference clock frequency\n"); 1630 ret = -ENODEV; 1631 goto free_ndev; 1632 } 1633 1634 /* default for throughput */ 1635 priv->et_coalesce.rx_coalesce_usecs = 500; 1636 priv->et_coalesce.rx_max_coalesced_frames = 8; 1637 priv->et_coalesce.tx_coalesce_usecs = 500; 1638 priv->et_coalesce.tx_max_coalesced_frames = 8; 1639 1640 ret = device_property_read_u32(&pdev->dev, "max-frame-size", 1641 &ndev->max_mtu); 1642 if (ret < 0) 1643 ndev->max_mtu = ETH_DATA_LEN; 1644 1645 /* runtime_pm coverage just for probe, open/close also cover it */ 1646 pm_runtime_enable(&pdev->dev); 1647 pm_runtime_get_sync(&pdev->dev); 1648 1649 hw_ver = netsec_read(priv, NETSEC_REG_F_TAIKI_VER); 1650 /* this driver only supports F_TAIKI style NETSEC */ 1651 if (NETSEC_F_NETSEC_VER_MAJOR_NUM(hw_ver) != 1652 NETSEC_F_NETSEC_VER_MAJOR_NUM(NETSEC_REG_NETSEC_VER_F_TAIKI)) { 1653 ret = -ENODEV; 1654 goto pm_disable; 1655 } 1656 1657 dev_info(&pdev->dev, "hardware revision %d.%d\n", 1658 hw_ver >> 16, hw_ver & 0xffff); 1659 1660 netif_napi_add(ndev, &priv->napi, netsec_napi_poll, NAPI_BUDGET); 1661 1662 ndev->netdev_ops = &netsec_netdev_ops; 1663 ndev->ethtool_ops = &netsec_ethtool_ops; 1664 1665 ndev->features |= NETIF_F_HIGHDMA | NETIF_F_RXCSUM | NETIF_F_GSO | 1666 NETIF_F_IP_CSUM | NETIF_F_IPV6_CSUM; 1667 ndev->hw_features = ndev->features; 1668 1669 priv->rx_cksum_offload_flag = true; 1670 1671 ret = netsec_register_mdio(priv, phy_addr); 1672 if (ret) 1673 goto unreg_napi; 1674 1675 if (dma_set_mask_and_coherent(&pdev->dev, DMA_BIT_MASK(64))) 1676 dev_warn(&pdev->dev, "Failed to enable 64-bit DMA\n"); 1677 1678 ret = register_netdev(ndev); 1679 if (ret) { 1680 netif_err(priv, probe, ndev, "register_netdev() failed\n"); 1681 goto unreg_mii; 1682 } 1683 1684 pm_runtime_put_sync(&pdev->dev); 1685 return 0; 1686 1687 unreg_mii: 1688 netsec_unregister_mdio(priv); 1689 unreg_napi: 1690 netif_napi_del(&priv->napi); 1691 pm_disable: 1692 pm_runtime_put_sync(&pdev->dev); 1693 pm_runtime_disable(&pdev->dev); 1694 free_ndev: 1695 free_netdev(ndev); 1696 dev_err(&pdev->dev, "init failed\n"); 1697 1698 return ret; 1699 } 1700 --- 0-DAY kernel test infrastructure Open Source Technology Center https://lists.01.org/pipermail/kbuild-all Intel Corporation
.config.gz
Description: application/gzip