[linux-next:master 11414/14048] drivers/net/ethernet/renesas/ravb_main.c:2086:6: warning: variable 'priv' is used uninitialized whenever 'if' condition is true

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi Adam,

FYI, the error/warning still remains.

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git master
head:   593ef1658ecf61d3619885bdbbcfffa3d1417891
commit: 8ef7adc6beb2ef0bce83513dc9e4505e7b21e8c2 [11414/14048] net: ethernet: ravb: Enable optional refclk
config: mips-randconfig-r031-20210421 (attached as .config)
compiler: clang version 13.0.0 (https://github.com/llvm/llvm-project d87b9b81ccb95217181ce75515c6c68bbb408ca4)
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
        # install mips cross compiling tool for clang build
        # apt-get install binutils-mips-linux-gnu
        # https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git/commit/?id=8ef7adc6beb2ef0bce83513dc9e4505e7b21e8c2
        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 8ef7adc6beb2ef0bce83513dc9e4505e7b21e8c2
        # save the attached .config to linux build tree
        COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross W=1 ARCH=mips 

If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@xxxxxxxxx>

All warnings (new ones prefixed by >>):

>> drivers/net/ethernet/renesas/ravb_main.c:2086:6: warning: variable 'priv' is used uninitialized whenever 'if' condition is true [-Wsometimes-uninitialized]
           if (irq < 0) {
               ^~~~~~~
   drivers/net/ethernet/renesas/ravb_main.c:2254:24: note: uninitialized use occurs here
           clk_disable_unprepare(priv->refclk);
                                 ^~~~
   drivers/net/ethernet/renesas/ravb_main.c:2086:2: note: remove the 'if' if its condition is always false
           if (irq < 0) {
           ^~~~~~~~~~~~~~
   drivers/net/ethernet/renesas/ravb_main.c:2046:27: note: initialize the variable 'priv' to silence this warning
           struct ravb_private *priv;
                                    ^
                                     = NULL
   1 warning generated.


vim +2086 drivers/net/ethernet/renesas/ravb_main.c

61fccb2d6274f7 drivers/net/ethernet/renesas/ravb_main.c Kazuya Mizuguchi   2017-01-27  2042  
c156633f135326 drivers/net/ethernet/renesas/ravb.c      Sergei Shtylyov    2015-06-11  2043  static int ravb_probe(struct platform_device *pdev)
c156633f135326 drivers/net/ethernet/renesas/ravb.c      Sergei Shtylyov    2015-06-11  2044  {
c156633f135326 drivers/net/ethernet/renesas/ravb.c      Sergei Shtylyov    2015-06-11  2045  	struct device_node *np = pdev->dev.of_node;
c156633f135326 drivers/net/ethernet/renesas/ravb.c      Sergei Shtylyov    2015-06-11  2046  	struct ravb_private *priv;
22d4df8ff3a3cc drivers/net/ethernet/renesas/ravb_main.c Kazuya Mizuguchi   2015-09-30  2047  	enum ravb_chip_id chip_id;
c156633f135326 drivers/net/ethernet/renesas/ravb.c      Sergei Shtylyov    2015-06-11  2048  	struct net_device *ndev;
c156633f135326 drivers/net/ethernet/renesas/ravb.c      Sergei Shtylyov    2015-06-11  2049  	int error, irq, q;
c156633f135326 drivers/net/ethernet/renesas/ravb.c      Sergei Shtylyov    2015-06-11  2050  	struct resource *res;
f51bdc236b6c58 drivers/net/ethernet/renesas/ravb_main.c Kazuya Mizuguchi   2016-04-03  2051  	int i;
c156633f135326 drivers/net/ethernet/renesas/ravb.c      Sergei Shtylyov    2015-06-11  2052  
c156633f135326 drivers/net/ethernet/renesas/ravb.c      Sergei Shtylyov    2015-06-11  2053  	if (!np) {
c156633f135326 drivers/net/ethernet/renesas/ravb.c      Sergei Shtylyov    2015-06-11  2054  		dev_err(&pdev->dev,
c156633f135326 drivers/net/ethernet/renesas/ravb.c      Sergei Shtylyov    2015-06-11  2055  			"this driver is required to be instantiated from device tree\n");
c156633f135326 drivers/net/ethernet/renesas/ravb.c      Sergei Shtylyov    2015-06-11  2056  		return -EINVAL;
c156633f135326 drivers/net/ethernet/renesas/ravb.c      Sergei Shtylyov    2015-06-11  2057  	}
c156633f135326 drivers/net/ethernet/renesas/ravb.c      Sergei Shtylyov    2015-06-11  2058  
c156633f135326 drivers/net/ethernet/renesas/ravb.c      Sergei Shtylyov    2015-06-11  2059  	/* Get base address */
c156633f135326 drivers/net/ethernet/renesas/ravb.c      Sergei Shtylyov    2015-06-11  2060  	res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
c156633f135326 drivers/net/ethernet/renesas/ravb.c      Sergei Shtylyov    2015-06-11  2061  	if (!res) {
c156633f135326 drivers/net/ethernet/renesas/ravb.c      Sergei Shtylyov    2015-06-11  2062  		dev_err(&pdev->dev, "invalid resource\n");
c156633f135326 drivers/net/ethernet/renesas/ravb.c      Sergei Shtylyov    2015-06-11  2063  		return -EINVAL;
c156633f135326 drivers/net/ethernet/renesas/ravb.c      Sergei Shtylyov    2015-06-11  2064  	}
c156633f135326 drivers/net/ethernet/renesas/ravb.c      Sergei Shtylyov    2015-06-11  2065  
c156633f135326 drivers/net/ethernet/renesas/ravb.c      Sergei Shtylyov    2015-06-11  2066  	ndev = alloc_etherdev_mqs(sizeof(struct ravb_private),
c156633f135326 drivers/net/ethernet/renesas/ravb.c      Sergei Shtylyov    2015-06-11  2067  				  NUM_TX_QUEUE, NUM_RX_QUEUE);
c156633f135326 drivers/net/ethernet/renesas/ravb.c      Sergei Shtylyov    2015-06-11  2068  	if (!ndev)
c156633f135326 drivers/net/ethernet/renesas/ravb.c      Sergei Shtylyov    2015-06-11  2069  		return -ENOMEM;
c156633f135326 drivers/net/ethernet/renesas/ravb.c      Sergei Shtylyov    2015-06-11  2070  
4d86d381862714 drivers/net/ethernet/renesas/ravb_main.c Simon Horman       2017-10-04  2071  	ndev->features = NETIF_F_RXCSUM;
4d86d381862714 drivers/net/ethernet/renesas/ravb_main.c Simon Horman       2017-10-04  2072  	ndev->hw_features = NETIF_F_RXCSUM;
4d86d381862714 drivers/net/ethernet/renesas/ravb_main.c Simon Horman       2017-10-04  2073  
c156633f135326 drivers/net/ethernet/renesas/ravb.c      Sergei Shtylyov    2015-06-11  2074  	pm_runtime_enable(&pdev->dev);
c156633f135326 drivers/net/ethernet/renesas/ravb.c      Sergei Shtylyov    2015-06-11  2075  	pm_runtime_get_sync(&pdev->dev);
c156633f135326 drivers/net/ethernet/renesas/ravb.c      Sergei Shtylyov    2015-06-11  2076  
c156633f135326 drivers/net/ethernet/renesas/ravb.c      Sergei Shtylyov    2015-06-11  2077  	/* The Ether-specific entries in the device structure. */
c156633f135326 drivers/net/ethernet/renesas/ravb.c      Sergei Shtylyov    2015-06-11  2078  	ndev->base_addr = res->start;
22d4df8ff3a3cc drivers/net/ethernet/renesas/ravb_main.c Kazuya Mizuguchi   2015-09-30  2079  
e866863066a4e6 drivers/net/ethernet/renesas/ravb_main.c Wolfram Sang       2016-03-01  2080  	chip_id = (enum ravb_chip_id)of_device_get_match_data(&pdev->dev);
22d4df8ff3a3cc drivers/net/ethernet/renesas/ravb_main.c Kazuya Mizuguchi   2015-09-30  2081  
22d4df8ff3a3cc drivers/net/ethernet/renesas/ravb_main.c Kazuya Mizuguchi   2015-09-30  2082  	if (chip_id == RCAR_GEN3)
22d4df8ff3a3cc drivers/net/ethernet/renesas/ravb_main.c Kazuya Mizuguchi   2015-09-30  2083  		irq = platform_get_irq_byname(pdev, "ch22");
22d4df8ff3a3cc drivers/net/ethernet/renesas/ravb_main.c Kazuya Mizuguchi   2015-09-30  2084  	else
c156633f135326 drivers/net/ethernet/renesas/ravb.c      Sergei Shtylyov    2015-06-11  2085  		irq = platform_get_irq(pdev, 0);
c156633f135326 drivers/net/ethernet/renesas/ravb.c      Sergei Shtylyov    2015-06-11 @2086  	if (irq < 0) {
f375339e497582 drivers/net/ethernet/renesas/ravb_main.c Sergei Shtylyov    2015-08-28  2087  		error = irq;
c156633f135326 drivers/net/ethernet/renesas/ravb.c      Sergei Shtylyov    2015-06-11  2088  		goto out_release;
c156633f135326 drivers/net/ethernet/renesas/ravb.c      Sergei Shtylyov    2015-06-11  2089  	}
c156633f135326 drivers/net/ethernet/renesas/ravb.c      Sergei Shtylyov    2015-06-11  2090  	ndev->irq = irq;
c156633f135326 drivers/net/ethernet/renesas/ravb.c      Sergei Shtylyov    2015-06-11  2091  
c156633f135326 drivers/net/ethernet/renesas/ravb.c      Sergei Shtylyov    2015-06-11  2092  	SET_NETDEV_DEV(ndev, &pdev->dev);
c156633f135326 drivers/net/ethernet/renesas/ravb.c      Sergei Shtylyov    2015-06-11  2093  
c156633f135326 drivers/net/ethernet/renesas/ravb.c      Sergei Shtylyov    2015-06-11  2094  	priv = netdev_priv(ndev);
c156633f135326 drivers/net/ethernet/renesas/ravb.c      Sergei Shtylyov    2015-06-11  2095  	priv->ndev = ndev;
c156633f135326 drivers/net/ethernet/renesas/ravb.c      Sergei Shtylyov    2015-06-11  2096  	priv->pdev = pdev;
c156633f135326 drivers/net/ethernet/renesas/ravb.c      Sergei Shtylyov    2015-06-11  2097  	priv->num_tx_ring[RAVB_BE] = BE_TX_RING_SIZE;
c156633f135326 drivers/net/ethernet/renesas/ravb.c      Sergei Shtylyov    2015-06-11  2098  	priv->num_rx_ring[RAVB_BE] = BE_RX_RING_SIZE;
c156633f135326 drivers/net/ethernet/renesas/ravb.c      Sergei Shtylyov    2015-06-11  2099  	priv->num_tx_ring[RAVB_NC] = NC_TX_RING_SIZE;
c156633f135326 drivers/net/ethernet/renesas/ravb.c      Sergei Shtylyov    2015-06-11  2100  	priv->num_rx_ring[RAVB_NC] = NC_RX_RING_SIZE;
c156633f135326 drivers/net/ethernet/renesas/ravb.c      Sergei Shtylyov    2015-06-11  2101  	priv->addr = devm_ioremap_resource(&pdev->dev, res);
c156633f135326 drivers/net/ethernet/renesas/ravb.c      Sergei Shtylyov    2015-06-11  2102  	if (IS_ERR(priv->addr)) {
c156633f135326 drivers/net/ethernet/renesas/ravb.c      Sergei Shtylyov    2015-06-11  2103  		error = PTR_ERR(priv->addr);
c156633f135326 drivers/net/ethernet/renesas/ravb.c      Sergei Shtylyov    2015-06-11  2104  		goto out_release;
c156633f135326 drivers/net/ethernet/renesas/ravb.c      Sergei Shtylyov    2015-06-11  2105  	}
c156633f135326 drivers/net/ethernet/renesas/ravb.c      Sergei Shtylyov    2015-06-11  2106  
c156633f135326 drivers/net/ethernet/renesas/ravb.c      Sergei Shtylyov    2015-06-11  2107  	spin_lock_init(&priv->lock);
c156633f135326 drivers/net/ethernet/renesas/ravb.c      Sergei Shtylyov    2015-06-11  2108  	INIT_WORK(&priv->work, ravb_tx_timeout_work);
c156633f135326 drivers/net/ethernet/renesas/ravb.c      Sergei Shtylyov    2015-06-11  2109  
0c65b2b90d13c1 drivers/net/ethernet/renesas/ravb_main.c Andrew Lunn        2019-11-04  2110  	error = of_get_phy_mode(np, &priv->phy_interface);
0c65b2b90d13c1 drivers/net/ethernet/renesas/ravb_main.c Andrew Lunn        2019-11-04  2111  	if (error && error != -ENODEV)
0c65b2b90d13c1 drivers/net/ethernet/renesas/ravb_main.c Andrew Lunn        2019-11-04  2112  		goto out_release;
c156633f135326 drivers/net/ethernet/renesas/ravb.c      Sergei Shtylyov    2015-06-11  2113  
c156633f135326 drivers/net/ethernet/renesas/ravb.c      Sergei Shtylyov    2015-06-11  2114  	priv->no_avb_link = of_property_read_bool(np, "renesas,no-ether-link");
c156633f135326 drivers/net/ethernet/renesas/ravb.c      Sergei Shtylyov    2015-06-11  2115  	priv->avb_link_active_low =
c156633f135326 drivers/net/ethernet/renesas/ravb.c      Sergei Shtylyov    2015-06-11  2116  		of_property_read_bool(np, "renesas,ether-link-active-low");
c156633f135326 drivers/net/ethernet/renesas/ravb.c      Sergei Shtylyov    2015-06-11  2117  
22d4df8ff3a3cc drivers/net/ethernet/renesas/ravb_main.c Kazuya Mizuguchi   2015-09-30  2118  	if (chip_id == RCAR_GEN3) {
22d4df8ff3a3cc drivers/net/ethernet/renesas/ravb_main.c Kazuya Mizuguchi   2015-09-30  2119  		irq = platform_get_irq_byname(pdev, "ch24");
22d4df8ff3a3cc drivers/net/ethernet/renesas/ravb_main.c Kazuya Mizuguchi   2015-09-30  2120  		if (irq < 0) {
22d4df8ff3a3cc drivers/net/ethernet/renesas/ravb_main.c Kazuya Mizuguchi   2015-09-30  2121  			error = irq;
22d4df8ff3a3cc drivers/net/ethernet/renesas/ravb_main.c Kazuya Mizuguchi   2015-09-30  2122  			goto out_release;
22d4df8ff3a3cc drivers/net/ethernet/renesas/ravb_main.c Kazuya Mizuguchi   2015-09-30  2123  		}
22d4df8ff3a3cc drivers/net/ethernet/renesas/ravb_main.c Kazuya Mizuguchi   2015-09-30  2124  		priv->emac_irq = irq;
f51bdc236b6c58 drivers/net/ethernet/renesas/ravb_main.c Kazuya Mizuguchi   2016-04-03  2125  		for (i = 0; i < NUM_RX_QUEUE; i++) {
f51bdc236b6c58 drivers/net/ethernet/renesas/ravb_main.c Kazuya Mizuguchi   2016-04-03  2126  			irq = platform_get_irq_byname(pdev, ravb_rx_irqs[i]);
f51bdc236b6c58 drivers/net/ethernet/renesas/ravb_main.c Kazuya Mizuguchi   2016-04-03  2127  			if (irq < 0) {
f51bdc236b6c58 drivers/net/ethernet/renesas/ravb_main.c Kazuya Mizuguchi   2016-04-03  2128  				error = irq;
f51bdc236b6c58 drivers/net/ethernet/renesas/ravb_main.c Kazuya Mizuguchi   2016-04-03  2129  				goto out_release;
f51bdc236b6c58 drivers/net/ethernet/renesas/ravb_main.c Kazuya Mizuguchi   2016-04-03  2130  			}
f51bdc236b6c58 drivers/net/ethernet/renesas/ravb_main.c Kazuya Mizuguchi   2016-04-03  2131  			priv->rx_irqs[i] = irq;
f51bdc236b6c58 drivers/net/ethernet/renesas/ravb_main.c Kazuya Mizuguchi   2016-04-03  2132  		}
f51bdc236b6c58 drivers/net/ethernet/renesas/ravb_main.c Kazuya Mizuguchi   2016-04-03  2133  		for (i = 0; i < NUM_TX_QUEUE; i++) {
f51bdc236b6c58 drivers/net/ethernet/renesas/ravb_main.c Kazuya Mizuguchi   2016-04-03  2134  			irq = platform_get_irq_byname(pdev, ravb_tx_irqs[i]);
f51bdc236b6c58 drivers/net/ethernet/renesas/ravb_main.c Kazuya Mizuguchi   2016-04-03  2135  			if (irq < 0) {
f51bdc236b6c58 drivers/net/ethernet/renesas/ravb_main.c Kazuya Mizuguchi   2016-04-03  2136  				error = irq;
f51bdc236b6c58 drivers/net/ethernet/renesas/ravb_main.c Kazuya Mizuguchi   2016-04-03  2137  				goto out_release;
f51bdc236b6c58 drivers/net/ethernet/renesas/ravb_main.c Kazuya Mizuguchi   2016-04-03  2138  			}
f51bdc236b6c58 drivers/net/ethernet/renesas/ravb_main.c Kazuya Mizuguchi   2016-04-03  2139  			priv->tx_irqs[i] = irq;
f51bdc236b6c58 drivers/net/ethernet/renesas/ravb_main.c Kazuya Mizuguchi   2016-04-03  2140  		}
22d4df8ff3a3cc drivers/net/ethernet/renesas/ravb_main.c Kazuya Mizuguchi   2015-09-30  2141  	}
22d4df8ff3a3cc drivers/net/ethernet/renesas/ravb_main.c Kazuya Mizuguchi   2015-09-30  2142  
22d4df8ff3a3cc drivers/net/ethernet/renesas/ravb_main.c Kazuya Mizuguchi   2015-09-30  2143  	priv->chip_id = chip_id;
22d4df8ff3a3cc drivers/net/ethernet/renesas/ravb_main.c Kazuya Mizuguchi   2015-09-30  2144  
3e3d647715d401 drivers/net/ethernet/renesas/ravb_main.c Niklas Söderlund   2017-08-01  2145  	priv->clk = devm_clk_get(&pdev->dev, NULL);
ab104615e01c2c drivers/net/ethernet/renesas/ravb_main.c Geert Uytterhoeven 2017-10-12  2146  	if (IS_ERR(priv->clk)) {
ab104615e01c2c drivers/net/ethernet/renesas/ravb_main.c Geert Uytterhoeven 2017-10-12  2147  		error = PTR_ERR(priv->clk);
ab104615e01c2c drivers/net/ethernet/renesas/ravb_main.c Geert Uytterhoeven 2017-10-12  2148  		goto out_release;
ab104615e01c2c drivers/net/ethernet/renesas/ravb_main.c Geert Uytterhoeven 2017-10-12  2149  	}
3e3d647715d401 drivers/net/ethernet/renesas/ravb_main.c Niklas Söderlund   2017-08-01  2150  
8ef7adc6beb2ef drivers/net/ethernet/renesas/ravb_main.c Adam Ford          2021-04-12  2151  	priv->refclk = devm_clk_get_optional(&pdev->dev, "refclk");
8ef7adc6beb2ef drivers/net/ethernet/renesas/ravb_main.c Adam Ford          2021-04-12  2152  	if (IS_ERR(priv->refclk)) {
8ef7adc6beb2ef drivers/net/ethernet/renesas/ravb_main.c Adam Ford          2021-04-12  2153  		error = PTR_ERR(priv->refclk);
8ef7adc6beb2ef drivers/net/ethernet/renesas/ravb_main.c Adam Ford          2021-04-12  2154  		goto out_release;
8ef7adc6beb2ef drivers/net/ethernet/renesas/ravb_main.c Adam Ford          2021-04-12  2155  	}
8ef7adc6beb2ef drivers/net/ethernet/renesas/ravb_main.c Adam Ford          2021-04-12  2156  	clk_prepare_enable(priv->refclk);
8ef7adc6beb2ef drivers/net/ethernet/renesas/ravb_main.c Adam Ford          2021-04-12  2157  
75efa06f457bbe drivers/net/ethernet/renesas/ravb_main.c Niklas Söderlund   2018-02-16  2158  	ndev->max_mtu = 2048 - (ETH_HLEN + VLAN_HLEN + ETH_FCS_LEN);
75efa06f457bbe drivers/net/ethernet/renesas/ravb_main.c Niklas Söderlund   2018-02-16  2159  	ndev->min_mtu = ETH_MIN_MTU;
75efa06f457bbe drivers/net/ethernet/renesas/ravb_main.c Niklas Söderlund   2018-02-16  2160  
f543305da9b5a5 drivers/net/ethernet/renesas/ravb_main.c Kazuya Mizuguchi   2018-09-19  2161  	priv->num_tx_desc = chip_id == RCAR_GEN2 ?
f543305da9b5a5 drivers/net/ethernet/renesas/ravb_main.c Kazuya Mizuguchi   2018-09-19  2162  		NUM_TX_DESC_GEN2 : NUM_TX_DESC_GEN3;
f543305da9b5a5 drivers/net/ethernet/renesas/ravb_main.c Kazuya Mizuguchi   2018-09-19  2163  
c156633f135326 drivers/net/ethernet/renesas/ravb.c      Sergei Shtylyov    2015-06-11  2164  	/* Set function */
c156633f135326 drivers/net/ethernet/renesas/ravb.c      Sergei Shtylyov    2015-06-11  2165  	ndev->netdev_ops = &ravb_netdev_ops;
c156633f135326 drivers/net/ethernet/renesas/ravb.c      Sergei Shtylyov    2015-06-11  2166  	ndev->ethtool_ops = &ravb_ethtool_ops;
c156633f135326 drivers/net/ethernet/renesas/ravb.c      Sergei Shtylyov    2015-06-11  2167  
c156633f135326 drivers/net/ethernet/renesas/ravb.c      Sergei Shtylyov    2015-06-11  2168  	/* Set AVB config mode */
0184165b2f42c4 drivers/net/ethernet/renesas/ravb_main.c Niklas Söderlund   2016-08-03  2169  	ravb_set_config_mode(ndev);
c156633f135326 drivers/net/ethernet/renesas/ravb.c      Sergei Shtylyov    2015-06-11  2170  
c156633f135326 drivers/net/ethernet/renesas/ravb.c      Sergei Shtylyov    2015-06-11  2171  	/* Set GTI value */
b3d39a8805c510 drivers/net/ethernet/renesas/ravb_main.c Simon Horman       2015-11-20  2172  	error = ravb_set_gti(ndev);
b3d39a8805c510 drivers/net/ethernet/renesas/ravb_main.c Simon Horman       2015-11-20  2173  	if (error)
b3d39a8805c510 drivers/net/ethernet/renesas/ravb_main.c Simon Horman       2015-11-20  2174  		goto out_release;
c156633f135326 drivers/net/ethernet/renesas/ravb.c      Sergei Shtylyov    2015-06-11  2175  
c156633f135326 drivers/net/ethernet/renesas/ravb.c      Sergei Shtylyov    2015-06-11  2176  	/* Request GTI loading */
568b3ce7a8efdc drivers/net/ethernet/renesas/ravb_main.c Sergei Shtylyov    2016-02-10  2177  	ravb_modify(ndev, GCCR, GCCR_LTI, GCCR_LTI);
c156633f135326 drivers/net/ethernet/renesas/ravb.c      Sergei Shtylyov    2015-06-11  2178  
ce19a9eb53be2f drivers/net/ethernet/renesas/ravb_main.c Geert Uytterhoeven 2020-10-01  2179  	if (priv->chip_id != RCAR_GEN2) {
a6f51f2efa742d drivers/net/ethernet/renesas/ravb_main.c Geert Uytterhoeven 2020-10-01  2180  		ravb_parse_delay_mode(np, ndev);
61fccb2d6274f7 drivers/net/ethernet/renesas/ravb_main.c Kazuya Mizuguchi   2017-01-27  2181  		ravb_set_delay_mode(ndev);
ce19a9eb53be2f drivers/net/ethernet/renesas/ravb_main.c Geert Uytterhoeven 2020-10-01  2182  	}
61fccb2d6274f7 drivers/net/ethernet/renesas/ravb_main.c Kazuya Mizuguchi   2017-01-27  2183  
c156633f135326 drivers/net/ethernet/renesas/ravb.c      Sergei Shtylyov    2015-06-11  2184  	/* Allocate descriptor base address table */
c156633f135326 drivers/net/ethernet/renesas/ravb.c      Sergei Shtylyov    2015-06-11  2185  	priv->desc_bat_size = sizeof(struct ravb_desc) * DBAT_ENTRY_NUM;
e2dbb33ad9545d drivers/net/ethernet/renesas/ravb_main.c Kazuya Mizuguchi   2015-09-30  2186  	priv->desc_bat = dma_alloc_coherent(ndev->dev.parent, priv->desc_bat_size,
c156633f135326 drivers/net/ethernet/renesas/ravb.c      Sergei Shtylyov    2015-06-11  2187  					    &priv->desc_bat_dma, GFP_KERNEL);
c156633f135326 drivers/net/ethernet/renesas/ravb.c      Sergei Shtylyov    2015-06-11  2188  	if (!priv->desc_bat) {
c451113291c193 drivers/net/ethernet/renesas/ravb_main.c Simon Horman       2015-11-02  2189  		dev_err(&pdev->dev,
c156633f135326 drivers/net/ethernet/renesas/ravb.c      Sergei Shtylyov    2015-06-11  2190  			"Cannot allocate desc base address table (size %d bytes)\n",
c156633f135326 drivers/net/ethernet/renesas/ravb.c      Sergei Shtylyov    2015-06-11  2191  			priv->desc_bat_size);
c156633f135326 drivers/net/ethernet/renesas/ravb.c      Sergei Shtylyov    2015-06-11  2192  		error = -ENOMEM;
c156633f135326 drivers/net/ethernet/renesas/ravb.c      Sergei Shtylyov    2015-06-11  2193  		goto out_release;
c156633f135326 drivers/net/ethernet/renesas/ravb.c      Sergei Shtylyov    2015-06-11  2194  	}
c156633f135326 drivers/net/ethernet/renesas/ravb.c      Sergei Shtylyov    2015-06-11  2195  	for (q = RAVB_BE; q < DBAT_ENTRY_NUM; q++)
c156633f135326 drivers/net/ethernet/renesas/ravb.c      Sergei Shtylyov    2015-06-11  2196  		priv->desc_bat[q].die_dt = DT_EOS;
c156633f135326 drivers/net/ethernet/renesas/ravb.c      Sergei Shtylyov    2015-06-11  2197  	ravb_write(ndev, priv->desc_bat_dma, DBAT);
c156633f135326 drivers/net/ethernet/renesas/ravb.c      Sergei Shtylyov    2015-06-11  2198  
c156633f135326 drivers/net/ethernet/renesas/ravb.c      Sergei Shtylyov    2015-06-11  2199  	/* Initialise HW timestamp list */
c156633f135326 drivers/net/ethernet/renesas/ravb.c      Sergei Shtylyov    2015-06-11  2200  	INIT_LIST_HEAD(&priv->ts_skb_list);
c156633f135326 drivers/net/ethernet/renesas/ravb.c      Sergei Shtylyov    2015-06-11  2201  
f5d7837f96e53a drivers/net/ethernet/renesas/ravb_main.c Kazuya Mizuguchi   2015-12-02  2202  	/* Initialise PTP Clock driver */
f5d7837f96e53a drivers/net/ethernet/renesas/ravb_main.c Kazuya Mizuguchi   2015-12-02  2203  	if (chip_id != RCAR_GEN2)
f5d7837f96e53a drivers/net/ethernet/renesas/ravb_main.c Kazuya Mizuguchi   2015-12-02  2204  		ravb_ptp_init(ndev, pdev);
f5d7837f96e53a drivers/net/ethernet/renesas/ravb_main.c Kazuya Mizuguchi   2015-12-02  2205  
c156633f135326 drivers/net/ethernet/renesas/ravb.c      Sergei Shtylyov    2015-06-11  2206  	/* Debug message level */
c156633f135326 drivers/net/ethernet/renesas/ravb.c      Sergei Shtylyov    2015-06-11  2207  	priv->msg_enable = RAVB_DEF_MSG_ENABLE;
c156633f135326 drivers/net/ethernet/renesas/ravb.c      Sergei Shtylyov    2015-06-11  2208  
c156633f135326 drivers/net/ethernet/renesas/ravb.c      Sergei Shtylyov    2015-06-11  2209  	/* Read and set MAC address */
c156633f135326 drivers/net/ethernet/renesas/ravb.c      Sergei Shtylyov    2015-06-11  2210  	ravb_read_mac_address(ndev, of_get_mac_address(np));
c156633f135326 drivers/net/ethernet/renesas/ravb.c      Sergei Shtylyov    2015-06-11  2211  	if (!is_valid_ether_addr(ndev->dev_addr)) {
c156633f135326 drivers/net/ethernet/renesas/ravb.c      Sergei Shtylyov    2015-06-11  2212  		dev_warn(&pdev->dev,
c156633f135326 drivers/net/ethernet/renesas/ravb.c      Sergei Shtylyov    2015-06-11  2213  			 "no valid MAC address supplied, using a random one\n");
c156633f135326 drivers/net/ethernet/renesas/ravb.c      Sergei Shtylyov    2015-06-11  2214  		eth_hw_addr_random(ndev);
c156633f135326 drivers/net/ethernet/renesas/ravb.c      Sergei Shtylyov    2015-06-11  2215  	}
c156633f135326 drivers/net/ethernet/renesas/ravb.c      Sergei Shtylyov    2015-06-11  2216  
77972b55fb9d35 drivers/net/ethernet/renesas/ravb_main.c Geert Uytterhoeven 2020-09-22  2217  	/* MDIO bus init */
77972b55fb9d35 drivers/net/ethernet/renesas/ravb_main.c Geert Uytterhoeven 2020-09-22  2218  	error = ravb_mdio_init(priv);
77972b55fb9d35 drivers/net/ethernet/renesas/ravb_main.c Geert Uytterhoeven 2020-09-22  2219  	if (error) {
77972b55fb9d35 drivers/net/ethernet/renesas/ravb_main.c Geert Uytterhoeven 2020-09-22  2220  		dev_err(&pdev->dev, "failed to initialize MDIO\n");
77972b55fb9d35 drivers/net/ethernet/renesas/ravb_main.c Geert Uytterhoeven 2020-09-22  2221  		goto out_dma_free;
77972b55fb9d35 drivers/net/ethernet/renesas/ravb_main.c Geert Uytterhoeven 2020-09-22  2222  	}
77972b55fb9d35 drivers/net/ethernet/renesas/ravb_main.c Geert Uytterhoeven 2020-09-22  2223  
c156633f135326 drivers/net/ethernet/renesas/ravb.c      Sergei Shtylyov    2015-06-11  2224  	netif_napi_add(ndev, &priv->napi[RAVB_BE], ravb_poll, 64);
c156633f135326 drivers/net/ethernet/renesas/ravb.c      Sergei Shtylyov    2015-06-11  2225  	netif_napi_add(ndev, &priv->napi[RAVB_NC], ravb_poll, 64);
c156633f135326 drivers/net/ethernet/renesas/ravb.c      Sergei Shtylyov    2015-06-11  2226  
c156633f135326 drivers/net/ethernet/renesas/ravb.c      Sergei Shtylyov    2015-06-11  2227  	/* Network device register */
c156633f135326 drivers/net/ethernet/renesas/ravb.c      Sergei Shtylyov    2015-06-11  2228  	error = register_netdev(ndev);
c156633f135326 drivers/net/ethernet/renesas/ravb.c      Sergei Shtylyov    2015-06-11  2229  	if (error)
c156633f135326 drivers/net/ethernet/renesas/ravb.c      Sergei Shtylyov    2015-06-11  2230  		goto out_napi_del;
c156633f135326 drivers/net/ethernet/renesas/ravb.c      Sergei Shtylyov    2015-06-11  2231  
3e3d647715d401 drivers/net/ethernet/renesas/ravb_main.c Niklas Söderlund   2017-08-01  2232  	device_set_wakeup_capable(&pdev->dev, 1);
3e3d647715d401 drivers/net/ethernet/renesas/ravb_main.c Niklas Söderlund   2017-08-01  2233  
c156633f135326 drivers/net/ethernet/renesas/ravb.c      Sergei Shtylyov    2015-06-11  2234  	/* Print device information */
c156633f135326 drivers/net/ethernet/renesas/ravb.c      Sergei Shtylyov    2015-06-11  2235  	netdev_info(ndev, "Base address at %#x, %pM, IRQ %d.\n",
c156633f135326 drivers/net/ethernet/renesas/ravb.c      Sergei Shtylyov    2015-06-11  2236  		    (u32)ndev->base_addr, ndev->dev_addr, ndev->irq);
c156633f135326 drivers/net/ethernet/renesas/ravb.c      Sergei Shtylyov    2015-06-11  2237  
c156633f135326 drivers/net/ethernet/renesas/ravb.c      Sergei Shtylyov    2015-06-11  2238  	platform_set_drvdata(pdev, ndev);
c156633f135326 drivers/net/ethernet/renesas/ravb.c      Sergei Shtylyov    2015-06-11  2239  
c156633f135326 drivers/net/ethernet/renesas/ravb.c      Sergei Shtylyov    2015-06-11  2240  	return 0;
c156633f135326 drivers/net/ethernet/renesas/ravb.c      Sergei Shtylyov    2015-06-11  2241  
c156633f135326 drivers/net/ethernet/renesas/ravb.c      Sergei Shtylyov    2015-06-11  2242  out_napi_del:
c156633f135326 drivers/net/ethernet/renesas/ravb.c      Sergei Shtylyov    2015-06-11  2243  	netif_napi_del(&priv->napi[RAVB_NC]);
c156633f135326 drivers/net/ethernet/renesas/ravb.c      Sergei Shtylyov    2015-06-11  2244  	netif_napi_del(&priv->napi[RAVB_BE]);
77972b55fb9d35 drivers/net/ethernet/renesas/ravb_main.c Geert Uytterhoeven 2020-09-22  2245  	ravb_mdio_release(priv);
77972b55fb9d35 drivers/net/ethernet/renesas/ravb_main.c Geert Uytterhoeven 2020-09-22  2246  out_dma_free:
e2dbb33ad9545d drivers/net/ethernet/renesas/ravb_main.c Kazuya Mizuguchi   2015-09-30  2247  	dma_free_coherent(ndev->dev.parent, priv->desc_bat_size, priv->desc_bat,
c156633f135326 drivers/net/ethernet/renesas/ravb.c      Sergei Shtylyov    2015-06-11  2248  			  priv->desc_bat_dma);
f5d7837f96e53a drivers/net/ethernet/renesas/ravb_main.c Kazuya Mizuguchi   2015-12-02  2249  
f5d7837f96e53a drivers/net/ethernet/renesas/ravb_main.c Kazuya Mizuguchi   2015-12-02  2250  	/* Stop PTP Clock driver */
f5d7837f96e53a drivers/net/ethernet/renesas/ravb_main.c Kazuya Mizuguchi   2015-12-02  2251  	if (chip_id != RCAR_GEN2)
f5d7837f96e53a drivers/net/ethernet/renesas/ravb_main.c Kazuya Mizuguchi   2015-12-02  2252  		ravb_ptp_stop(ndev);
c156633f135326 drivers/net/ethernet/renesas/ravb.c      Sergei Shtylyov    2015-06-11  2253  out_release:
8ef7adc6beb2ef drivers/net/ethernet/renesas/ravb_main.c Adam Ford          2021-04-12  2254  	clk_disable_unprepare(priv->refclk);
c156633f135326 drivers/net/ethernet/renesas/ravb.c      Sergei Shtylyov    2015-06-11  2255  	free_netdev(ndev);
c156633f135326 drivers/net/ethernet/renesas/ravb.c      Sergei Shtylyov    2015-06-11  2256  
c156633f135326 drivers/net/ethernet/renesas/ravb.c      Sergei Shtylyov    2015-06-11  2257  	pm_runtime_put(&pdev->dev);
c156633f135326 drivers/net/ethernet/renesas/ravb.c      Sergei Shtylyov    2015-06-11  2258  	pm_runtime_disable(&pdev->dev);
c156633f135326 drivers/net/ethernet/renesas/ravb.c      Sergei Shtylyov    2015-06-11  2259  	return error;
c156633f135326 drivers/net/ethernet/renesas/ravb.c      Sergei Shtylyov    2015-06-11  2260  }
c156633f135326 drivers/net/ethernet/renesas/ravb.c      Sergei Shtylyov    2015-06-11  2261  

:::::: The code at line 2086 was first introduced by commit
:::::: c156633f1353264634135dea86ffcae74f2122fc Renesas Ethernet AVB driver proper

:::::: TO: Sergei Shtylyov <sergei.shtylyov@xxxxxxxxxxxxxxxxxx>
:::::: CC: David S. Miller <davem@xxxxxxxxxxxxx>

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

Attachment: .config.gz
Description: application/gzip


[Index of Archives]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Bugtraq]     [Linux OMAP]     [Linux MIPS]     [eCos]     [Asterisk Internet PBX]     [Linux API]

  Powered by Linux