[spi:for-next 1/2] drivers/spi/spi-fsl-spi.c:749: undefined reference to `of_irq_to_resource'

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

 



Hi Mark,

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

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/broonie/spi.git for-next
head:   d661a226ebf2961631a3961f2463f5db1b132430
commit: 6f2e2fffd91fd9b4364fbefb78ebbe46d05b0bdd [1/2] Merge branch 'spi-5.5' into spi-linus
config: sparc64-randconfig-a001-20191209 (attached as .config)
compiler: sparc64-linux-gcc (GCC) 7.5.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 6f2e2fffd91fd9b4364fbefb78ebbe46d05b0bdd
        # save the attached .config to linux build tree
        GCC_VERSION=7.5.0 make.cross ARCH=sparc64 

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

All errors (new ones prefixed by >>):

   drivers/spi/spi-fsl-spi.o: In function `of_fsl_spi_probe':
>> drivers/spi/spi-fsl-spi.c:749: undefined reference to `of_irq_to_resource'

vim +749 drivers/spi/spi-fsl-spi.c

35b4b3c0c1265f drivers/spi/spi_mpc83xx.c Anton Vorontsov  2009-03-31  702  
fd4a319bc933ae drivers/spi/spi-fsl-spi.c Grant Likely     2012-12-07  703  static int of_fsl_spi_probe(struct platform_device *ofdev)
35b4b3c0c1265f drivers/spi/spi_mpc83xx.c Anton Vorontsov  2009-03-31  704  {
35b4b3c0c1265f drivers/spi/spi_mpc83xx.c Anton Vorontsov  2009-03-31  705  	struct device *dev = &ofdev->dev;
61c7a080a5a061 drivers/spi/spi_mpc8xxx.c Grant Likely     2010-04-13  706  	struct device_node *np = ofdev->dev.of_node;
35b4b3c0c1265f drivers/spi/spi_mpc83xx.c Anton Vorontsov  2009-03-31  707  	struct spi_master *master;
35b4b3c0c1265f drivers/spi/spi_mpc83xx.c Anton Vorontsov  2009-03-31  708  	struct resource mem;
500a32abaf818b drivers/spi/spi-fsl-spi.c Liu Xiang        2017-03-09  709  	int irq = 0, type;
35b4b3c0c1265f drivers/spi/spi_mpc83xx.c Anton Vorontsov  2009-03-31  710  	int ret = -ENOMEM;
35b4b3c0c1265f drivers/spi/spi_mpc83xx.c Anton Vorontsov  2009-03-31  711  
18d306d1375696 drivers/spi/spi_fsl_spi.c Grant Likely     2011-02-22  712  	ret = of_mpc8xxx_spi_probe(ofdev);
b36ece832512c1 drivers/spi/spi_fsl_spi.c Mingkai Hu       2010-10-12  713  	if (ret)
b36ece832512c1 drivers/spi/spi_fsl_spi.c Mingkai Hu       2010-10-12  714  		return ret;
35b4b3c0c1265f drivers/spi/spi_mpc83xx.c Anton Vorontsov  2009-03-31  715  
447b0c7b939f1d drivers/spi/spi-fsl-spi.c Andreas Larsson  2013-02-15  716  	type = fsl_spi_get_type(&ofdev->dev);
447b0c7b939f1d drivers/spi/spi-fsl-spi.c Andreas Larsson  2013-02-15  717  	if (type == TYPE_FSL) {
0f0581b24bd019 drivers/spi/spi-fsl-spi.c Linus Walleij    2019-08-04  718  		struct fsl_spi_platform_data *pdata = dev_get_platdata(dev);
0f0581b24bd019 drivers/spi/spi-fsl-spi.c Linus Walleij    2019-08-04  719  #if IS_ENABLED(CONFIG_FSL_SOC)
0f0581b24bd019 drivers/spi/spi-fsl-spi.c Linus Walleij    2019-08-04  720  		struct mpc8xxx_spi_probe_info *pinfo = to_of_pinfo(pdata);
0f0581b24bd019 drivers/spi/spi-fsl-spi.c Linus Walleij    2019-08-04  721  		bool spisel_boot = of_property_read_bool(np, "fsl,spisel_boot");
0f0581b24bd019 drivers/spi/spi-fsl-spi.c Linus Walleij    2019-08-04  722  
0f0581b24bd019 drivers/spi/spi-fsl-spi.c Linus Walleij    2019-08-04  723  		if (spisel_boot) {
0f0581b24bd019 drivers/spi/spi-fsl-spi.c Linus Walleij    2019-08-04  724  			pinfo->immr_spi_cs = ioremap(get_immrbase() + IMMR_SPI_CS_OFFSET, 4);
0f0581b24bd019 drivers/spi/spi-fsl-spi.c Linus Walleij    2019-08-04  725  			if (!pinfo->immr_spi_cs) {
0f0581b24bd019 drivers/spi/spi-fsl-spi.c Linus Walleij    2019-08-04  726  				ret = -ENOMEM;
35b4b3c0c1265f drivers/spi/spi_mpc83xx.c Anton Vorontsov  2009-03-31  727  				goto err;
447b0c7b939f1d drivers/spi/spi-fsl-spi.c Andreas Larsson  2013-02-15  728  			}
0f0581b24bd019 drivers/spi/spi-fsl-spi.c Linus Walleij    2019-08-04  729  		}
0f0581b24bd019 drivers/spi/spi-fsl-spi.c Linus Walleij    2019-08-04  730  #endif
7251953d784baf drivers/spi/spi-fsl-spi.c Linus Walleij    2019-11-28  731  		/*
7251953d784baf drivers/spi/spi-fsl-spi.c Linus Walleij    2019-11-28  732  		 * Handle the case where we have one hardwired (always selected)
7251953d784baf drivers/spi/spi-fsl-spi.c Linus Walleij    2019-11-28  733  		 * device on the first "chipselect". Else we let the core code
7251953d784baf drivers/spi/spi-fsl-spi.c Linus Walleij    2019-11-28  734  		 * handle any GPIOs or native chip selects and assign the
7251953d784baf drivers/spi/spi-fsl-spi.c Linus Walleij    2019-11-28  735  		 * appropriate callback for dealing with the CS lines. This isn't
7251953d784baf drivers/spi/spi-fsl-spi.c Linus Walleij    2019-11-28  736  		 * supported on the GRLIB variant.
7251953d784baf drivers/spi/spi-fsl-spi.c Linus Walleij    2019-11-28  737  		 */
7251953d784baf drivers/spi/spi-fsl-spi.c Linus Walleij    2019-11-28  738  		ret = gpiod_count(dev, "cs");
7251953d784baf drivers/spi/spi-fsl-spi.c Linus Walleij    2019-11-28  739  		if (ret <= 0)
7251953d784baf drivers/spi/spi-fsl-spi.c Linus Walleij    2019-11-28  740  			pdata->max_chipselect = 1;
7251953d784baf drivers/spi/spi-fsl-spi.c Linus Walleij    2019-11-28  741  		else
0f0581b24bd019 drivers/spi/spi-fsl-spi.c Linus Walleij    2019-08-04  742  			pdata->cs_control = fsl_spi_cs_control;
0f0581b24bd019 drivers/spi/spi-fsl-spi.c Linus Walleij    2019-08-04  743  	}
35b4b3c0c1265f drivers/spi/spi_mpc83xx.c Anton Vorontsov  2009-03-31  744  
35b4b3c0c1265f drivers/spi/spi_mpc83xx.c Anton Vorontsov  2009-03-31  745  	ret = of_address_to_resource(np, 0, &mem);
35b4b3c0c1265f drivers/spi/spi_mpc83xx.c Anton Vorontsov  2009-03-31  746  	if (ret)
35b4b3c0c1265f drivers/spi/spi_mpc83xx.c Anton Vorontsov  2009-03-31  747  		goto err;
35b4b3c0c1265f drivers/spi/spi_mpc83xx.c Anton Vorontsov  2009-03-31  748  
3194d2533efffa drivers/spi/spi-fsl-spi.c Christophe Leroy 2019-12-09 @749  	irq = of_irq_to_resource(np, 0, NULL);
3194d2533efffa drivers/spi/spi-fsl-spi.c Christophe Leroy 2019-12-09  750  	if (irq <= 0) {
35b4b3c0c1265f drivers/spi/spi_mpc83xx.c Anton Vorontsov  2009-03-31  751  		ret = -EINVAL;
35b4b3c0c1265f drivers/spi/spi_mpc83xx.c Anton Vorontsov  2009-03-31  752  		goto err;
35b4b3c0c1265f drivers/spi/spi_mpc83xx.c Anton Vorontsov  2009-03-31  753  	}
35b4b3c0c1265f drivers/spi/spi_mpc83xx.c Anton Vorontsov  2009-03-31  754  
e8beacbb85a5c1 drivers/spi/spi-fsl-spi.c Andreas Larsson  2013-02-15  755  	master = fsl_spi_probe(dev, &mem, irq);
35b4b3c0c1265f drivers/spi/spi_mpc83xx.c Anton Vorontsov  2009-03-31  756  	if (IS_ERR(master)) {
35b4b3c0c1265f drivers/spi/spi_mpc83xx.c Anton Vorontsov  2009-03-31  757  		ret = PTR_ERR(master);
35b4b3c0c1265f drivers/spi/spi_mpc83xx.c Anton Vorontsov  2009-03-31  758  		goto err;
35b4b3c0c1265f drivers/spi/spi_mpc83xx.c Anton Vorontsov  2009-03-31  759  	}
35b4b3c0c1265f drivers/spi/spi_mpc83xx.c Anton Vorontsov  2009-03-31  760  
35b4b3c0c1265f drivers/spi/spi_mpc83xx.c Anton Vorontsov  2009-03-31  761  	return 0;
35b4b3c0c1265f drivers/spi/spi_mpc83xx.c Anton Vorontsov  2009-03-31  762  
35b4b3c0c1265f drivers/spi/spi_mpc83xx.c Anton Vorontsov  2009-03-31  763  err:
35b4b3c0c1265f drivers/spi/spi_mpc83xx.c Anton Vorontsov  2009-03-31  764  	return ret;
35b4b3c0c1265f drivers/spi/spi_mpc83xx.c Anton Vorontsov  2009-03-31  765  }
35b4b3c0c1265f drivers/spi/spi_mpc83xx.c Anton Vorontsov  2009-03-31  766  

:::::: The code at line 749 was first introduced by commit
:::::: 3194d2533efffae8b815d84729ecc58b6a9000ab spi: fsl: don't map irq during probe

:::::: TO: Christophe Leroy <christophe.leroy@xxxxxx>
:::::: CC: Mark Brown <broonie@xxxxxxxxxx>

---
0-DAY kernel test infrastructure                 Open Source Technology Center
https://lists.01.org/hyperkitty/list/kbuild-all@xxxxxxxxxxxx Intel Corporation

Attachment: .config.gz
Description: application/gzip


[Index of Archives]     [Linux Kernel]     [Linux ARM (vger)]     [Linux ARM MSM]     [Linux Omap]     [Linux Arm]     [Linux Tegra]     [Fedora ARM]     [Linux for Samsung SOC]     [eCos]     [Linux Fastboot]     [Gcc Help]     [Git]     [DCCP]     [IETF Announce]     [Security]     [Linux MIPS]     [Yosemite Campsites]

  Powered by Linux