[mkl-can-next:v5.4/mcp25xxfd 6/99] drivers/net/can/spi/mcp25xxfd/mcp25xxfd-core.c:1729:18: error: 'struct mcp25xxfd_priv' has no member named 'cnt'

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

 



tree:   https://git.kernel.org/pub/scm/linux/kernel/git/mkl/linux-can-next.git v5.4/mcp25xxfd
head:   cdcc21e4acc1a753bc4fb151b938ba292ecf686b
commit: 95b61f9fae984d9add2e6873962d4f1a58695f07 [6/99] can: mcp25xxfd: add logging support
config: i386-randconfig-b003-20200210 (attached as .config)
compiler: gcc-7 (Debian 7.5.0-3) 7.5.0
reproduce:
        git checkout 95b61f9fae984d9add2e6873962d4f1a58695f07
        # save the attached .config to linux build tree
        make ARCH=i386 

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

All errors (new ones prefixed by >>):

   drivers/net/can/spi/mcp25xxfd/mcp25xxfd-core.c: In function 'mcp25xxfd_probe':
>> drivers/net/can/spi/mcp25xxfd/mcp25xxfd-core.c:1729:18: error: 'struct mcp25xxfd_priv' has no member named 'cnt'
     atomic_set(&priv->cnt, 0);
                     ^~

vim +1729 drivers/net/can/spi/mcp25xxfd/mcp25xxfd-core.c

  1666	
  1667	static int mcp25xxfd_probe(struct spi_device *spi)
  1668	{
  1669		const void *match;
  1670		struct net_device *ndev;
  1671		struct mcp25xxfd_priv *priv;
  1672		struct regulator *reg_vdd, *reg_xceiver;
  1673		struct clk *clk;
  1674		u32 freq;
  1675		int err;
  1676	
  1677		reg_vdd = devm_regulator_get_optional(&spi->dev, "vdd");
  1678		if (PTR_ERR(reg_vdd) == -EPROBE_DEFER)
  1679			return -EPROBE_DEFER;
  1680		else if (PTR_ERR(reg_vdd) == -ENODEV)
  1681			reg_vdd = NULL;
  1682		else
  1683			return PTR_ERR(reg_vdd);
  1684	
  1685		reg_xceiver = devm_regulator_get_optional(&spi->dev, "xceiver");
  1686		if (PTR_ERR(reg_xceiver) == -EPROBE_DEFER)
  1687			return -EPROBE_DEFER;
  1688		else if (PTR_ERR(reg_xceiver) == -ENODEV)
  1689			reg_xceiver = NULL;
  1690		else
  1691			return PTR_ERR(reg_xceiver);
  1692	
  1693		clk = devm_clk_get(&spi->dev, NULL);
  1694		if (IS_ERR(clk)) {
  1695			dev_err(&spi->dev, "no OSC clock defined\n");
  1696			return PTR_ERR(clk);
  1697		}
  1698		freq = clk_get_rate(clk);
  1699	
  1700		/* Sanity check */
  1701		if (freq < MCP25XXFD_SYSCLOCK_HZ_MIN ||
  1702		    freq > MCP25XXFD_SYSCLOCK_HZ_MAX)
  1703			return -ERANGE;
  1704	
  1705		ndev = alloc_candev(sizeof(struct mcp25xxfd_priv),
  1706				    MCP25XXFD_TX_OBJ_NUM_MAX);
  1707		if (!ndev)
  1708			return -ENOMEM;
  1709	
  1710		SET_NETDEV_DEV(ndev, &spi->dev);
  1711	
  1712		ndev->netdev_ops = &mcp25xxfd_netdev_ops;
  1713		ndev->irq = spi->irq;
  1714		ndev->flags |= IFF_ECHO;
  1715	
  1716		priv = netdev_priv(ndev);
  1717		spi_set_drvdata(spi, priv);
  1718		priv->can.clock.freq = freq;
  1719		//priv->can.do_set_mode = mcp25xxfd_do_set_mode;
  1720		priv->can.do_get_berr_counter = mcp25xxfd_get_berr_counter;
  1721		priv->can.bittiming_const = &mcp25xxfd_bittiming_const;
  1722		priv->can.data_bittiming_const = &mcp25xxfd_data_bittiming_const;
  1723		priv->can.ctrlmode_supported = CAN_CTRLMODE_ONE_SHOT | CAN_CTRLMODE_FD;
  1724		priv->ndev = ndev;
  1725		priv->spi = spi;
  1726		priv->clk = clk;
  1727		priv->reg_vdd = reg_vdd;
  1728		priv->reg_xceiver = reg_xceiver;
> 1729		atomic_set(&priv->cnt, 0);
  1730	
  1731		match = device_get_match_data(&spi->dev);
  1732		if (match)
  1733			priv->model = (enum mcp25xxfd_model)match;
  1734		else
  1735			priv->model = spi_get_device_id(spi)->driver_data;
  1736	
  1737		/* If we have an oscillator clock that is <= 4MHz, enable the PLL */
  1738		if (freq <= MCP25XXFD_SYSCLOCK_HZ_MAX /
  1739		    MCP25XXFD_OSC_PLL_MULTIPLIER) {
  1740			priv->osc_pllen = true;
  1741			freq *= MCP25XXFD_OSC_PLL_MULTIPLIER;
  1742		}
  1743	
  1744		spi->bits_per_word = 8;
  1745		/* SPI clock must be less or equal SYSCLOCK / 2 */
  1746		spi->max_speed_hz = min(spi->max_speed_hz, freq / 2);
  1747		err = spi_setup(spi);
  1748		if (err)
  1749			goto out_free_candev;
  1750	
  1751		err = mcp25xxfd_regmap_init(priv);
  1752		if (err)
  1753			goto out_free_candev;
  1754	
  1755		err = can_rx_offload_add_manual(ndev, &priv->offload,
  1756						MCP25XXFD_NAPI_WEIGHT);
  1757		if (err)
  1758			goto out_free_candev;
  1759	
  1760		err = mcp25xxfd_register(priv);
  1761		if (err)
  1762			goto out_free_candev;
  1763	
  1764		return 0;
  1765	
  1766	 out_free_candev:
  1767		free_candev(ndev);
  1768	
  1769		return err;
  1770	}
  1771	

---
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]     [Automotive Discussions]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Security]     [Bugtraq]     [Linux]     [Linux OMAP]     [Linux MIPS]     [eCos]     [Asterisk Internet PBX]     [Linux API]     [CAN Bus]

  Powered by Linux