lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [day] [month] [year] [list]
Message-ID: <202005242032.Kn1Imbky%lkp@intel.com>
Date:   Sun, 24 May 2020 20:16:37 +0800
From:   kbuild test robot <lkp@...el.com>
To:     Brendan Higgins <brendanhiggins@...gle.com>
Cc:     kbuild-all@...ts.01.org, linux-kernel@...r.kernel.org,
        Greg Kroah-Hartman <gregkh@...uxfoundation.org>
Subject: drivers/net/ethernet/xilinx/xilinx_axienet_main.c:1680: undefined
 reference to `devm_ioremap_resource'

Hi Brendan,

It's probably a bug fix that unveils the link errors.

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head:   caffb99b6929f41a69edbb5aef3a359bf45f3315
commit: 0e31e3573f0cd94d7b821117db854187ffc85765 lkdtm/bugs: fix build error in lkdtm_UNSET_SMEP
date:   4 months ago
config: um-randconfig-s001-20200524 (attached as .config)
compiler: gcc-7 (Ubuntu 7.5.0-6ubuntu2) 7.5.0
reproduce:
        # apt-get install sparse
        # sparse version: v0.6.1-193-gb8fad4bc-dirty
        git checkout 0e31e3573f0cd94d7b821117db854187ffc85765
        # save the attached .config to linux build tree
        make W=1 C=1 ARCH=um CF='-fdiagnostic-prefix -D__CHECK_ENDIAN__'

If you fix the issue, kindly add following tag as appropriate
Reported-by: kbuild test robot <lkp@...el.com>

All errors (new ones prefixed by >>, old ones prefixed by <<):

/usr/bin/ld: drivers/net/ethernet/xilinx/xilinx_axienet_main.o: in function `axienet_probe':
>> drivers/net/ethernet/xilinx/xilinx_axienet_main.c:1680: undefined reference to `devm_ioremap_resource'
collect2: error: ld returned 1 exit status

vim +1680 drivers/net/ethernet/xilinx/xilinx_axienet_main.c

8a3b7a252dca9f Daniel Borkmann     2012-01-19  1633  
8a3b7a252dca9f Daniel Borkmann     2012-01-19  1634  /**
2be586205ca2b8 Srikanth Thokala    2015-05-05  1635   * axienet_probe - Axi Ethernet probe function.
95219aa538e11d Srikanth Thokala    2015-05-05  1636   * @pdev:	Pointer to platform device structure.
8a3b7a252dca9f Daniel Borkmann     2012-01-19  1637   *
b0d081c524b46c Michal Simek        2015-05-05  1638   * Return: 0, on success
8a3b7a252dca9f Daniel Borkmann     2012-01-19  1639   *	    Non-zero error value on failure.
8a3b7a252dca9f Daniel Borkmann     2012-01-19  1640   *
8a3b7a252dca9f Daniel Borkmann     2012-01-19  1641   * This is the probe routine for Axi Ethernet driver. This is called before
8a3b7a252dca9f Daniel Borkmann     2012-01-19  1642   * any other driver routines are invoked. It allocates and sets up the Ethernet
8a3b7a252dca9f Daniel Borkmann     2012-01-19  1643   * device. Parses through device tree and populates fields of
8a3b7a252dca9f Daniel Borkmann     2012-01-19  1644   * axienet_local. It registers the Ethernet device.
8a3b7a252dca9f Daniel Borkmann     2012-01-19  1645   */
2be586205ca2b8 Srikanth Thokala    2015-05-05  1646  static int axienet_probe(struct platform_device *pdev)
8a3b7a252dca9f Daniel Borkmann     2012-01-19  1647  {
8495659bf93c8e Srikanth Thokala    2015-05-05  1648  	int ret;
8a3b7a252dca9f Daniel Borkmann     2012-01-19  1649  	struct device_node *np;
8a3b7a252dca9f Daniel Borkmann     2012-01-19  1650  	struct axienet_local *lp;
8a3b7a252dca9f Daniel Borkmann     2012-01-19  1651  	struct net_device *ndev;
da90e38003e2f0 Tobias Klauser      2016-12-07  1652  	const void *mac_addr;
28ef9ebdb64c6f Robert Hancock      2019-06-06  1653  	struct resource *ethres;
8495659bf93c8e Srikanth Thokala    2015-05-05  1654  	u32 value;
8a3b7a252dca9f Daniel Borkmann     2012-01-19  1655  
8a3b7a252dca9f Daniel Borkmann     2012-01-19  1656  	ndev = alloc_etherdev(sizeof(*lp));
41de8d4cff21a2 Joe Perches         2012-01-29  1657  	if (!ndev)
8a3b7a252dca9f Daniel Borkmann     2012-01-19  1658  		return -ENOMEM;
8a3b7a252dca9f Daniel Borkmann     2012-01-19  1659  
95219aa538e11d Srikanth Thokala    2015-05-05  1660  	platform_set_drvdata(pdev, ndev);
8a3b7a252dca9f Daniel Borkmann     2012-01-19  1661  
95219aa538e11d Srikanth Thokala    2015-05-05  1662  	SET_NETDEV_DEV(ndev, &pdev->dev);
8a3b7a252dca9f Daniel Borkmann     2012-01-19  1663  	ndev->flags &= ~IFF_MULTICAST;  /* clear multicast */
28e24c62ab3062 Eric Dumazet        2013-12-02  1664  	ndev->features = NETIF_F_SG;
8a3b7a252dca9f Daniel Borkmann     2012-01-19  1665  	ndev->netdev_ops = &axienet_netdev_ops;
8a3b7a252dca9f Daniel Borkmann     2012-01-19  1666  	ndev->ethtool_ops = &axienet_ethtool_ops;
8a3b7a252dca9f Daniel Borkmann     2012-01-19  1667  
d894be57ca92c8 Jarod Wilson        2016-10-20  1668  	/* MTU range: 64 - 9000 */
d894be57ca92c8 Jarod Wilson        2016-10-20  1669  	ndev->min_mtu = 64;
d894be57ca92c8 Jarod Wilson        2016-10-20  1670  	ndev->max_mtu = XAE_JUMBO_MTU;
d894be57ca92c8 Jarod Wilson        2016-10-20  1671  
8a3b7a252dca9f Daniel Borkmann     2012-01-19  1672  	lp = netdev_priv(ndev);
8a3b7a252dca9f Daniel Borkmann     2012-01-19  1673  	lp->ndev = ndev;
95219aa538e11d Srikanth Thokala    2015-05-05  1674  	lp->dev = &pdev->dev;
8a3b7a252dca9f Daniel Borkmann     2012-01-19  1675  	lp->options = XAE_OPTION_DEFAULTS;
8b09ca823ffb4e Robert Hancock      2019-06-06  1676  	lp->rx_bd_num = RX_BD_NUM_DEFAULT;
8b09ca823ffb4e Robert Hancock      2019-06-06  1677  	lp->tx_bd_num = TX_BD_NUM_DEFAULT;
8a3b7a252dca9f Daniel Borkmann     2012-01-19  1678  	/* Map device registers */
46aa27df885321 Srikanth Thokala    2015-05-05  1679  	ethres = platform_get_resource(pdev, IORESOURCE_MEM, 0);
46aa27df885321 Srikanth Thokala    2015-05-05 @1680  	lp->regs = devm_ioremap_resource(&pdev->dev, ethres);
fcc028c106e575 Krzysztof Kozlowski 2015-07-09  1681  	if (IS_ERR(lp->regs)) {
95219aa538e11d Srikanth Thokala    2015-05-05  1682  		dev_err(&pdev->dev, "could not map Axi Ethernet regs.\n");
fcc028c106e575 Krzysztof Kozlowski 2015-07-09  1683  		ret = PTR_ERR(lp->regs);
46aa27df885321 Srikanth Thokala    2015-05-05  1684  		goto free_netdev;
8a3b7a252dca9f Daniel Borkmann     2012-01-19  1685  	}
7fa0043d5c74c6 Robert Hancock      2019-06-11  1686  	lp->regs_start = ethres->start;
46aa27df885321 Srikanth Thokala    2015-05-05  1687  
8a3b7a252dca9f Daniel Borkmann     2012-01-19  1688  	/* Setup checksum offload, but default to off if not specified */
8a3b7a252dca9f Daniel Borkmann     2012-01-19  1689  	lp->features = 0;
8a3b7a252dca9f Daniel Borkmann     2012-01-19  1690  
8495659bf93c8e Srikanth Thokala    2015-05-05  1691  	ret = of_property_read_u32(pdev->dev.of_node, "xlnx,txcsum", &value);
8495659bf93c8e Srikanth Thokala    2015-05-05  1692  	if (!ret) {
8495659bf93c8e Srikanth Thokala    2015-05-05  1693  		switch (value) {
8a3b7a252dca9f Daniel Borkmann     2012-01-19  1694  		case 1:
8a3b7a252dca9f Daniel Borkmann     2012-01-19  1695  			lp->csum_offload_on_tx_path =
8a3b7a252dca9f Daniel Borkmann     2012-01-19  1696  				XAE_FEATURE_PARTIAL_TX_CSUM;
8a3b7a252dca9f Daniel Borkmann     2012-01-19  1697  			lp->features |= XAE_FEATURE_PARTIAL_TX_CSUM;
8a3b7a252dca9f Daniel Borkmann     2012-01-19  1698  			/* Can checksum TCP/UDP over IPv4. */
8a3b7a252dca9f Daniel Borkmann     2012-01-19  1699  			ndev->features |= NETIF_F_IP_CSUM;
8a3b7a252dca9f Daniel Borkmann     2012-01-19  1700  			break;
8a3b7a252dca9f Daniel Borkmann     2012-01-19  1701  		case 2:
8a3b7a252dca9f Daniel Borkmann     2012-01-19  1702  			lp->csum_offload_on_tx_path =
8a3b7a252dca9f Daniel Borkmann     2012-01-19  1703  				XAE_FEATURE_FULL_TX_CSUM;
8a3b7a252dca9f Daniel Borkmann     2012-01-19  1704  			lp->features |= XAE_FEATURE_FULL_TX_CSUM;
8a3b7a252dca9f Daniel Borkmann     2012-01-19  1705  			/* Can checksum TCP/UDP over IPv4. */
8a3b7a252dca9f Daniel Borkmann     2012-01-19  1706  			ndev->features |= NETIF_F_IP_CSUM;
8a3b7a252dca9f Daniel Borkmann     2012-01-19  1707  			break;
8a3b7a252dca9f Daniel Borkmann     2012-01-19  1708  		default:
8a3b7a252dca9f Daniel Borkmann     2012-01-19  1709  			lp->csum_offload_on_tx_path = XAE_NO_CSUM_OFFLOAD;
8a3b7a252dca9f Daniel Borkmann     2012-01-19  1710  		}
8a3b7a252dca9f Daniel Borkmann     2012-01-19  1711  	}
8495659bf93c8e Srikanth Thokala    2015-05-05  1712  	ret = of_property_read_u32(pdev->dev.of_node, "xlnx,rxcsum", &value);
8495659bf93c8e Srikanth Thokala    2015-05-05  1713  	if (!ret) {
8495659bf93c8e Srikanth Thokala    2015-05-05  1714  		switch (value) {
8a3b7a252dca9f Daniel Borkmann     2012-01-19  1715  		case 1:
8a3b7a252dca9f Daniel Borkmann     2012-01-19  1716  			lp->csum_offload_on_rx_path =
8a3b7a252dca9f Daniel Borkmann     2012-01-19  1717  				XAE_FEATURE_PARTIAL_RX_CSUM;
8a3b7a252dca9f Daniel Borkmann     2012-01-19  1718  			lp->features |= XAE_FEATURE_PARTIAL_RX_CSUM;
8a3b7a252dca9f Daniel Borkmann     2012-01-19  1719  			break;
8a3b7a252dca9f Daniel Borkmann     2012-01-19  1720  		case 2:
8a3b7a252dca9f Daniel Borkmann     2012-01-19  1721  			lp->csum_offload_on_rx_path =
8a3b7a252dca9f Daniel Borkmann     2012-01-19  1722  				XAE_FEATURE_FULL_RX_CSUM;
8a3b7a252dca9f Daniel Borkmann     2012-01-19  1723  			lp->features |= XAE_FEATURE_FULL_RX_CSUM;
8a3b7a252dca9f Daniel Borkmann     2012-01-19  1724  			break;
8a3b7a252dca9f Daniel Borkmann     2012-01-19  1725  		default:
8a3b7a252dca9f Daniel Borkmann     2012-01-19  1726  			lp->csum_offload_on_rx_path = XAE_NO_CSUM_OFFLOAD;
8a3b7a252dca9f Daniel Borkmann     2012-01-19  1727  		}
8a3b7a252dca9f Daniel Borkmann     2012-01-19  1728  	}
8a3b7a252dca9f Daniel Borkmann     2012-01-19  1729  	/* For supporting jumbo frames, the Axi Ethernet hardware must have
f080a8c35d8932 Srikanth Thokala    2015-05-05  1730  	 * a larger Rx/Tx Memory. Typically, the size must be large so that
f080a8c35d8932 Srikanth Thokala    2015-05-05  1731  	 * we can enable jumbo option and start supporting jumbo frames.
f080a8c35d8932 Srikanth Thokala    2015-05-05  1732  	 * Here we check for memory allocated for Rx/Tx in the hardware from
f080a8c35d8932 Srikanth Thokala    2015-05-05  1733  	 * the device-tree and accordingly set flags.
f080a8c35d8932 Srikanth Thokala    2015-05-05  1734  	 */
8495659bf93c8e Srikanth Thokala    2015-05-05  1735  	of_property_read_u32(pdev->dev.of_node, "xlnx,rxmem", &lp->rxmem);
ee06b1728b9564 Alvaro G. M         2017-07-17  1736  
ee06b1728b9564 Alvaro G. M         2017-07-17  1737  	/* Start with the proprietary, and broken phy_type */
ee06b1728b9564 Alvaro G. M         2017-07-17  1738  	ret = of_property_read_u32(pdev->dev.of_node, "xlnx,phy-type", &value);
ee06b1728b9564 Alvaro G. M         2017-07-17  1739  	if (!ret) {
ee06b1728b9564 Alvaro G. M         2017-07-17  1740  		netdev_warn(ndev, "Please upgrade your device tree binary blob to use phy-mode");
ee06b1728b9564 Alvaro G. M         2017-07-17  1741  		switch (value) {
ee06b1728b9564 Alvaro G. M         2017-07-17  1742  		case XAE_PHY_TYPE_MII:
ee06b1728b9564 Alvaro G. M         2017-07-17  1743  			lp->phy_mode = PHY_INTERFACE_MODE_MII;
ee06b1728b9564 Alvaro G. M         2017-07-17  1744  			break;
ee06b1728b9564 Alvaro G. M         2017-07-17  1745  		case XAE_PHY_TYPE_GMII:
ee06b1728b9564 Alvaro G. M         2017-07-17  1746  			lp->phy_mode = PHY_INTERFACE_MODE_GMII;
ee06b1728b9564 Alvaro G. M         2017-07-17  1747  			break;
ee06b1728b9564 Alvaro G. M         2017-07-17  1748  		case XAE_PHY_TYPE_RGMII_2_0:
ee06b1728b9564 Alvaro G. M         2017-07-17  1749  			lp->phy_mode = PHY_INTERFACE_MODE_RGMII_ID;
ee06b1728b9564 Alvaro G. M         2017-07-17  1750  			break;
ee06b1728b9564 Alvaro G. M         2017-07-17  1751  		case XAE_PHY_TYPE_SGMII:
ee06b1728b9564 Alvaro G. M         2017-07-17  1752  			lp->phy_mode = PHY_INTERFACE_MODE_SGMII;
ee06b1728b9564 Alvaro G. M         2017-07-17  1753  			break;
ee06b1728b9564 Alvaro G. M         2017-07-17  1754  		case XAE_PHY_TYPE_1000BASE_X:
ee06b1728b9564 Alvaro G. M         2017-07-17  1755  			lp->phy_mode = PHY_INTERFACE_MODE_1000BASEX;
ee06b1728b9564 Alvaro G. M         2017-07-17  1756  			break;
ee06b1728b9564 Alvaro G. M         2017-07-17  1757  		default:
ee06b1728b9564 Alvaro G. M         2017-07-17  1758  			ret = -EINVAL;
ee06b1728b9564 Alvaro G. M         2017-07-17  1759  			goto free_netdev;
ee06b1728b9564 Alvaro G. M         2017-07-17  1760  		}
ee06b1728b9564 Alvaro G. M         2017-07-17  1761  	} else {
0c65b2b90d13c1 Andrew Lunn         2019-11-04  1762  		ret = of_get_phy_mode(pdev->dev.of_node, &lp->phy_mode);
0c65b2b90d13c1 Andrew Lunn         2019-11-04  1763  		if (ret)
ee06b1728b9564 Alvaro G. M         2017-07-17  1764  			goto free_netdev;
ee06b1728b9564 Alvaro G. M         2017-07-17  1765  	}
8a3b7a252dca9f Daniel Borkmann     2012-01-19  1766  
8a3b7a252dca9f Daniel Borkmann     2012-01-19  1767  	/* Find the DMA node, map the DMA registers, and decode the DMA IRQs */
95219aa538e11d Srikanth Thokala    2015-05-05  1768  	np = of_parse_phandle(pdev->dev.of_node, "axistream-connected", 0);
28ef9ebdb64c6f Robert Hancock      2019-06-06  1769  	if (np) {
28ef9ebdb64c6f Robert Hancock      2019-06-06  1770  		struct resource dmares;
28ef9ebdb64c6f Robert Hancock      2019-06-06  1771  
46aa27df885321 Srikanth Thokala    2015-05-05  1772  		ret = of_address_to_resource(np, 0, &dmares);
46aa27df885321 Srikanth Thokala    2015-05-05  1773  		if (ret) {
28ef9ebdb64c6f Robert Hancock      2019-06-06  1774  			dev_err(&pdev->dev,
28ef9ebdb64c6f Robert Hancock      2019-06-06  1775  				"unable to get DMA resource\n");
fa3a419d2f674b Wen Yang            2019-03-22  1776  			of_node_put(np);
46aa27df885321 Srikanth Thokala    2015-05-05  1777  			goto free_netdev;
46aa27df885321 Srikanth Thokala    2015-05-05  1778  		}
28ef9ebdb64c6f Robert Hancock      2019-06-06  1779  		lp->dma_regs = devm_ioremap_resource(&pdev->dev,
28ef9ebdb64c6f Robert Hancock      2019-06-06  1780  						     &dmares);
28ef9ebdb64c6f Robert Hancock      2019-06-06  1781  		lp->rx_irq = irq_of_parse_and_map(np, 1);
28ef9ebdb64c6f Robert Hancock      2019-06-06  1782  		lp->tx_irq = irq_of_parse_and_map(np, 0);
28ef9ebdb64c6f Robert Hancock      2019-06-06  1783  		of_node_put(np);
28ef9ebdb64c6f Robert Hancock      2019-06-06  1784  		lp->eth_irq = platform_get_irq(pdev, 0);
28ef9ebdb64c6f Robert Hancock      2019-06-06  1785  	} else {
28ef9ebdb64c6f Robert Hancock      2019-06-06  1786  		/* Check for these resources directly on the Ethernet node. */
28ef9ebdb64c6f Robert Hancock      2019-06-06  1787  		struct resource *res = platform_get_resource(pdev,
28ef9ebdb64c6f Robert Hancock      2019-06-06  1788  							     IORESOURCE_MEM, 1);
28ef9ebdb64c6f Robert Hancock      2019-06-06  1789  		lp->dma_regs = devm_ioremap_resource(&pdev->dev, res);
28ef9ebdb64c6f Robert Hancock      2019-06-06  1790  		lp->rx_irq = platform_get_irq(pdev, 1);
28ef9ebdb64c6f Robert Hancock      2019-06-06  1791  		lp->tx_irq = platform_get_irq(pdev, 0);
28ef9ebdb64c6f Robert Hancock      2019-06-06  1792  		lp->eth_irq = platform_get_irq(pdev, 2);
28ef9ebdb64c6f Robert Hancock      2019-06-06  1793  	}
fcc028c106e575 Krzysztof Kozlowski 2015-07-09  1794  	if (IS_ERR(lp->dma_regs)) {
46aa27df885321 Srikanth Thokala    2015-05-05  1795  		dev_err(&pdev->dev, "could not map DMA regs\n");
fcc028c106e575 Krzysztof Kozlowski 2015-07-09  1796  		ret = PTR_ERR(lp->dma_regs);
46aa27df885321 Srikanth Thokala    2015-05-05  1797  		goto free_netdev;
8a3b7a252dca9f Daniel Borkmann     2012-01-19  1798  	}
cb59c87dbc8be2 Michal Simek        2013-01-10  1799  	if ((lp->rx_irq <= 0) || (lp->tx_irq <= 0)) {
95219aa538e11d Srikanth Thokala    2015-05-05  1800  		dev_err(&pdev->dev, "could not determine irqs\n");
8a3b7a252dca9f Daniel Borkmann     2012-01-19  1801  		ret = -ENOMEM;
46aa27df885321 Srikanth Thokala    2015-05-05  1802  		goto free_netdev;
8a3b7a252dca9f Daniel Borkmann     2012-01-19  1803  	}
8a3b7a252dca9f Daniel Borkmann     2012-01-19  1804  
522856cefaf09d Robert Hancock      2019-06-06  1805  	/* Check for Ethernet core IRQ (optional) */
522856cefaf09d Robert Hancock      2019-06-06  1806  	if (lp->eth_irq <= 0)
522856cefaf09d Robert Hancock      2019-06-06  1807  		dev_info(&pdev->dev, "Ethernet core IRQ not defined\n");
522856cefaf09d Robert Hancock      2019-06-06  1808  
8a3b7a252dca9f Daniel Borkmann     2012-01-19  1809  	/* Retrieve the MAC address */
da90e38003e2f0 Tobias Klauser      2016-12-07  1810  	mac_addr = of_get_mac_address(pdev->dev.of_node);
a51645f70f6384 Petr Štetiar        2019-05-06  1811  	if (IS_ERR(mac_addr)) {
d05a9ed5c3a773 Robert Hancock      2019-06-06  1812  		dev_warn(&pdev->dev, "could not find MAC address property: %ld\n",
d05a9ed5c3a773 Robert Hancock      2019-06-06  1813  			 PTR_ERR(mac_addr));
d05a9ed5c3a773 Robert Hancock      2019-06-06  1814  		mac_addr = NULL;
8a3b7a252dca9f Daniel Borkmann     2012-01-19  1815  	}
da90e38003e2f0 Tobias Klauser      2016-12-07  1816  	axienet_set_mac_address(ndev, mac_addr);
8a3b7a252dca9f Daniel Borkmann     2012-01-19  1817  
8a3b7a252dca9f Daniel Borkmann     2012-01-19  1818  	lp->coalesce_count_rx = XAXIDMA_DFT_RX_THRESHOLD;
8a3b7a252dca9f Daniel Borkmann     2012-01-19  1819  	lp->coalesce_count_tx = XAXIDMA_DFT_TX_THRESHOLD;
8a3b7a252dca9f Daniel Borkmann     2012-01-19  1820  
95219aa538e11d Srikanth Thokala    2015-05-05  1821  	lp->phy_node = of_parse_phandle(pdev->dev.of_node, "phy-handle", 0);
46aa27df885321 Srikanth Thokala    2015-05-05  1822  	if (lp->phy_node) {
09a0354cadec26 Robert Hancock      2019-06-06  1823  		lp->clk = devm_clk_get(&pdev->dev, NULL);
09a0354cadec26 Robert Hancock      2019-06-06  1824  		if (IS_ERR(lp->clk)) {
09a0354cadec26 Robert Hancock      2019-06-06  1825  			dev_warn(&pdev->dev, "Failed to get clock: %ld\n",
09a0354cadec26 Robert Hancock      2019-06-06  1826  				 PTR_ERR(lp->clk));
09a0354cadec26 Robert Hancock      2019-06-06  1827  			lp->clk = NULL;
09a0354cadec26 Robert Hancock      2019-06-06  1828  		} else {
09a0354cadec26 Robert Hancock      2019-06-06  1829  			ret = clk_prepare_enable(lp->clk);
09a0354cadec26 Robert Hancock      2019-06-06  1830  			if (ret) {
09a0354cadec26 Robert Hancock      2019-06-06  1831  				dev_err(&pdev->dev, "Unable to enable clock: %d\n",
09a0354cadec26 Robert Hancock      2019-06-06  1832  					ret);
09a0354cadec26 Robert Hancock      2019-06-06  1833  				goto free_netdev;
09a0354cadec26 Robert Hancock      2019-06-06  1834  			}
09a0354cadec26 Robert Hancock      2019-06-06  1835  		}
09a0354cadec26 Robert Hancock      2019-06-06  1836  
09a0354cadec26 Robert Hancock      2019-06-06  1837  		ret = axienet_mdio_setup(lp);
8a3b7a252dca9f Daniel Borkmann     2012-01-19  1838  		if (ret)
09a0354cadec26 Robert Hancock      2019-06-06  1839  			dev_warn(&pdev->dev,
09a0354cadec26 Robert Hancock      2019-06-06  1840  				 "error registering MDIO bus: %d\n", ret);
46aa27df885321 Srikanth Thokala    2015-05-05  1841  	}
8a3b7a252dca9f Daniel Borkmann     2012-01-19  1842  
f5203a3d9b25fa Robert Hancock      2019-06-06  1843  	lp->phylink_config.dev = &ndev->dev;
f5203a3d9b25fa Robert Hancock      2019-06-06  1844  	lp->phylink_config.type = PHYLINK_NETDEV;
f5203a3d9b25fa Robert Hancock      2019-06-06  1845  
f5203a3d9b25fa Robert Hancock      2019-06-06  1846  	lp->phylink = phylink_create(&lp->phylink_config, pdev->dev.fwnode,
f5203a3d9b25fa Robert Hancock      2019-06-06  1847  				     lp->phy_mode,
f5203a3d9b25fa Robert Hancock      2019-06-06  1848  				     &axienet_phylink_ops);
f5203a3d9b25fa Robert Hancock      2019-06-06  1849  	if (IS_ERR(lp->phylink)) {
f5203a3d9b25fa Robert Hancock      2019-06-06  1850  		ret = PTR_ERR(lp->phylink);
f5203a3d9b25fa Robert Hancock      2019-06-06  1851  		dev_err(&pdev->dev, "phylink_create error (%i)\n", ret);
f5203a3d9b25fa Robert Hancock      2019-06-06  1852  		goto free_netdev;
f5203a3d9b25fa Robert Hancock      2019-06-06  1853  	}
f5203a3d9b25fa Robert Hancock      2019-06-06  1854  
8a3b7a252dca9f Daniel Borkmann     2012-01-19  1855  	ret = register_netdev(lp->ndev);
8a3b7a252dca9f Daniel Borkmann     2012-01-19  1856  	if (ret) {
8a3b7a252dca9f Daniel Borkmann     2012-01-19  1857  		dev_err(lp->dev, "register_netdev() error (%i)\n", ret);
46aa27df885321 Srikanth Thokala    2015-05-05  1858  		goto free_netdev;
8a3b7a252dca9f Daniel Borkmann     2012-01-19  1859  	}
8a3b7a252dca9f Daniel Borkmann     2012-01-19  1860  
8a3b7a252dca9f Daniel Borkmann     2012-01-19  1861  	return 0;
8a3b7a252dca9f Daniel Borkmann     2012-01-19  1862  
46aa27df885321 Srikanth Thokala    2015-05-05  1863  free_netdev:
8a3b7a252dca9f Daniel Borkmann     2012-01-19  1864  	free_netdev(ndev);
46aa27df885321 Srikanth Thokala    2015-05-05  1865  
8a3b7a252dca9f Daniel Borkmann     2012-01-19  1866  	return ret;
8a3b7a252dca9f Daniel Borkmann     2012-01-19  1867  }
8a3b7a252dca9f Daniel Borkmann     2012-01-19  1868  

:::::: The code at line 1680 was first introduced by commit
:::::: 46aa27df88532146974628602b6f5cc587422388 net: axienet: Use devm_* calls

:::::: TO: Srikanth Thokala <srikanth.thokala@...inx.com>
:::::: CC: David S. Miller <davem@...emloft.net>

---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org

Download attachment ".config.gz" of type "application/gzip" (13761 bytes)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ