[PATCH] spi-nor: Remove unused spi-nor.o rule
kernel test robot
lkp at intel.com
Sun Jul 26 08:16:13 EDT 2020
Hi Joel,
I love your patch! Yet something to improve:
[auto build test ERROR on linus/master]
[also build test ERROR on v5.8-rc6 next-20200724]
[If your patch is applied to the wrong git tree, kindly drop us a note.
And when submitting patch, we suggest to use '--base' as documented in
https://git-scm.com/docs/git-format-patch]
url: https://github.com/0day-ci/linux/commits/Joel-Stanley/spi-nor-Remove-unused-spi-nor-o-rule/20200722-170150
base: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git 4fa640dc52302b5e62b01b05c755b055549633ae
config: arm-randconfig-r036-20200726 (attached as .config)
compiler: arm-linux-gnueabi-gcc (GCC) 9.3.0
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
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-9.3.0 make.cross ARCH=arm
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp at intel.com>
All errors (new ones prefixed by >>):
arm-linux-gnueabi-ld: drivers/mtd/spi-nor/controllers/aspeed-smc.o: in function `aspeed_smc_setup_flash':
>> drivers/mtd/spi-nor/controllers/aspeed-smc.c:829: undefined reference to `spi_nor_scan'
vim +829 drivers/mtd/spi-nor/controllers/aspeed-smc.c
45397787536434 drivers/mtd/spi-nor/aspeed-smc.c Tudor Ambarus 2019-09-24 758
ceb720c71b6309 drivers/mtd/spi-nor/aspeed-smc.c Cédric Le Goater 2016-12-21 759 static int aspeed_smc_setup_flash(struct aspeed_smc_controller *controller,
ceb720c71b6309 drivers/mtd/spi-nor/aspeed-smc.c Cédric Le Goater 2016-12-21 760 struct device_node *np, struct resource *r)
ceb720c71b6309 drivers/mtd/spi-nor/aspeed-smc.c Cédric Le Goater 2016-12-21 761 {
cfc5604c488ccd drivers/mtd/spi-nor/aspeed-smc.c Cyrille Pitchen 2017-04-25 762 const struct spi_nor_hwcaps hwcaps = {
cfc5604c488ccd drivers/mtd/spi-nor/aspeed-smc.c Cyrille Pitchen 2017-04-25 763 .mask = SNOR_HWCAPS_READ |
cfc5604c488ccd drivers/mtd/spi-nor/aspeed-smc.c Cyrille Pitchen 2017-04-25 764 SNOR_HWCAPS_READ_FAST |
cfc5604c488ccd drivers/mtd/spi-nor/aspeed-smc.c Cyrille Pitchen 2017-04-25 765 SNOR_HWCAPS_PP,
cfc5604c488ccd drivers/mtd/spi-nor/aspeed-smc.c Cyrille Pitchen 2017-04-25 766 };
ceb720c71b6309 drivers/mtd/spi-nor/aspeed-smc.c Cédric Le Goater 2016-12-21 767 const struct aspeed_smc_info *info = controller->info;
ceb720c71b6309 drivers/mtd/spi-nor/aspeed-smc.c Cédric Le Goater 2016-12-21 768 struct device *dev = controller->dev;
ceb720c71b6309 drivers/mtd/spi-nor/aspeed-smc.c Cédric Le Goater 2016-12-21 769 struct device_node *child;
ceb720c71b6309 drivers/mtd/spi-nor/aspeed-smc.c Cédric Le Goater 2016-12-21 770 unsigned int cs;
ceb720c71b6309 drivers/mtd/spi-nor/aspeed-smc.c Cédric Le Goater 2016-12-21 771 int ret = -ENODEV;
ceb720c71b6309 drivers/mtd/spi-nor/aspeed-smc.c Cédric Le Goater 2016-12-21 772
ceb720c71b6309 drivers/mtd/spi-nor/aspeed-smc.c Cédric Le Goater 2016-12-21 773 for_each_available_child_of_node(np, child) {
ceb720c71b6309 drivers/mtd/spi-nor/aspeed-smc.c Cédric Le Goater 2016-12-21 774 struct aspeed_smc_chip *chip;
ceb720c71b6309 drivers/mtd/spi-nor/aspeed-smc.c Cédric Le Goater 2016-12-21 775 struct spi_nor *nor;
ceb720c71b6309 drivers/mtd/spi-nor/aspeed-smc.c Cédric Le Goater 2016-12-21 776 struct mtd_info *mtd;
ceb720c71b6309 drivers/mtd/spi-nor/aspeed-smc.c Cédric Le Goater 2016-12-21 777
ceb720c71b6309 drivers/mtd/spi-nor/aspeed-smc.c Cédric Le Goater 2016-12-21 778 /* This driver does not support NAND or NOR flash devices. */
ceb720c71b6309 drivers/mtd/spi-nor/aspeed-smc.c Cédric Le Goater 2016-12-21 779 if (!of_device_is_compatible(child, "jedec,spi-nor"))
ceb720c71b6309 drivers/mtd/spi-nor/aspeed-smc.c Cédric Le Goater 2016-12-21 780 continue;
ceb720c71b6309 drivers/mtd/spi-nor/aspeed-smc.c Cédric Le Goater 2016-12-21 781
ceb720c71b6309 drivers/mtd/spi-nor/aspeed-smc.c Cédric Le Goater 2016-12-21 782 ret = of_property_read_u32(child, "reg", &cs);
ceb720c71b6309 drivers/mtd/spi-nor/aspeed-smc.c Cédric Le Goater 2016-12-21 783 if (ret) {
ceb720c71b6309 drivers/mtd/spi-nor/aspeed-smc.c Cédric Le Goater 2016-12-21 784 dev_err(dev, "Couldn't not read chip select.\n");
ceb720c71b6309 drivers/mtd/spi-nor/aspeed-smc.c Cédric Le Goater 2016-12-21 785 break;
ceb720c71b6309 drivers/mtd/spi-nor/aspeed-smc.c Cédric Le Goater 2016-12-21 786 }
ceb720c71b6309 drivers/mtd/spi-nor/aspeed-smc.c Cédric Le Goater 2016-12-21 787
ceb720c71b6309 drivers/mtd/spi-nor/aspeed-smc.c Cédric Le Goater 2016-12-21 788 if (cs >= info->nce) {
ceb720c71b6309 drivers/mtd/spi-nor/aspeed-smc.c Cédric Le Goater 2016-12-21 789 dev_err(dev, "Chip select %d out of range.\n",
ceb720c71b6309 drivers/mtd/spi-nor/aspeed-smc.c Cédric Le Goater 2016-12-21 790 cs);
ceb720c71b6309 drivers/mtd/spi-nor/aspeed-smc.c Cédric Le Goater 2016-12-21 791 ret = -ERANGE;
ceb720c71b6309 drivers/mtd/spi-nor/aspeed-smc.c Cédric Le Goater 2016-12-21 792 break;
ceb720c71b6309 drivers/mtd/spi-nor/aspeed-smc.c Cédric Le Goater 2016-12-21 793 }
ceb720c71b6309 drivers/mtd/spi-nor/aspeed-smc.c Cédric Le Goater 2016-12-21 794
ceb720c71b6309 drivers/mtd/spi-nor/aspeed-smc.c Cédric Le Goater 2016-12-21 795 if (controller->chips[cs]) {
ceb720c71b6309 drivers/mtd/spi-nor/aspeed-smc.c Cédric Le Goater 2016-12-21 796 dev_err(dev, "Chip select %d already in use by %s\n",
ceb720c71b6309 drivers/mtd/spi-nor/aspeed-smc.c Cédric Le Goater 2016-12-21 797 cs, dev_name(controller->chips[cs]->nor.dev));
ceb720c71b6309 drivers/mtd/spi-nor/aspeed-smc.c Cédric Le Goater 2016-12-21 798 ret = -EBUSY;
ceb720c71b6309 drivers/mtd/spi-nor/aspeed-smc.c Cédric Le Goater 2016-12-21 799 break;
ceb720c71b6309 drivers/mtd/spi-nor/aspeed-smc.c Cédric Le Goater 2016-12-21 800 }
ceb720c71b6309 drivers/mtd/spi-nor/aspeed-smc.c Cédric Le Goater 2016-12-21 801
ceb720c71b6309 drivers/mtd/spi-nor/aspeed-smc.c Cédric Le Goater 2016-12-21 802 chip = devm_kzalloc(controller->dev, sizeof(*chip), GFP_KERNEL);
ceb720c71b6309 drivers/mtd/spi-nor/aspeed-smc.c Cédric Le Goater 2016-12-21 803 if (!chip) {
ceb720c71b6309 drivers/mtd/spi-nor/aspeed-smc.c Cédric Le Goater 2016-12-21 804 ret = -ENOMEM;
ceb720c71b6309 drivers/mtd/spi-nor/aspeed-smc.c Cédric Le Goater 2016-12-21 805 break;
ceb720c71b6309 drivers/mtd/spi-nor/aspeed-smc.c Cédric Le Goater 2016-12-21 806 }
ceb720c71b6309 drivers/mtd/spi-nor/aspeed-smc.c Cédric Le Goater 2016-12-21 807
ceb720c71b6309 drivers/mtd/spi-nor/aspeed-smc.c Cédric Le Goater 2016-12-21 808 chip->controller = controller;
ceb720c71b6309 drivers/mtd/spi-nor/aspeed-smc.c Cédric Le Goater 2016-12-21 809 chip->ctl = controller->regs + info->ctl0 + cs * 4;
ceb720c71b6309 drivers/mtd/spi-nor/aspeed-smc.c Cédric Le Goater 2016-12-21 810 chip->cs = cs;
ceb720c71b6309 drivers/mtd/spi-nor/aspeed-smc.c Cédric Le Goater 2016-12-21 811
ceb720c71b6309 drivers/mtd/spi-nor/aspeed-smc.c Cédric Le Goater 2016-12-21 812 nor = &chip->nor;
ceb720c71b6309 drivers/mtd/spi-nor/aspeed-smc.c Cédric Le Goater 2016-12-21 813 mtd = &nor->mtd;
ceb720c71b6309 drivers/mtd/spi-nor/aspeed-smc.c Cédric Le Goater 2016-12-21 814
ceb720c71b6309 drivers/mtd/spi-nor/aspeed-smc.c Cédric Le Goater 2016-12-21 815 nor->dev = dev;
ceb720c71b6309 drivers/mtd/spi-nor/aspeed-smc.c Cédric Le Goater 2016-12-21 816 nor->priv = chip;
ceb720c71b6309 drivers/mtd/spi-nor/aspeed-smc.c Cédric Le Goater 2016-12-21 817 spi_nor_set_flash_node(nor, child);
45397787536434 drivers/mtd/spi-nor/aspeed-smc.c Tudor Ambarus 2019-09-24 818 nor->controller_ops = &aspeed_smc_controller_ops;
ceb720c71b6309 drivers/mtd/spi-nor/aspeed-smc.c Cédric Le Goater 2016-12-21 819
ceb720c71b6309 drivers/mtd/spi-nor/aspeed-smc.c Cédric Le Goater 2016-12-21 820 ret = aspeed_smc_chip_setup_init(chip, r);
ceb720c71b6309 drivers/mtd/spi-nor/aspeed-smc.c Cédric Le Goater 2016-12-21 821 if (ret)
ceb720c71b6309 drivers/mtd/spi-nor/aspeed-smc.c Cédric Le Goater 2016-12-21 822 break;
ceb720c71b6309 drivers/mtd/spi-nor/aspeed-smc.c Cédric Le Goater 2016-12-21 823
ceb720c71b6309 drivers/mtd/spi-nor/aspeed-smc.c Cédric Le Goater 2016-12-21 824 /*
cfc5604c488ccd drivers/mtd/spi-nor/aspeed-smc.c Cyrille Pitchen 2017-04-25 825 * TODO: Add support for Dual and Quad SPI protocols
ceb720c71b6309 drivers/mtd/spi-nor/aspeed-smc.c Cédric Le Goater 2016-12-21 826 * attach when board support is present as determined
ceb720c71b6309 drivers/mtd/spi-nor/aspeed-smc.c Cédric Le Goater 2016-12-21 827 * by of property.
ceb720c71b6309 drivers/mtd/spi-nor/aspeed-smc.c Cédric Le Goater 2016-12-21 828 */
cfc5604c488ccd drivers/mtd/spi-nor/aspeed-smc.c Cyrille Pitchen 2017-04-25 @829 ret = spi_nor_scan(nor, NULL, &hwcaps);
ceb720c71b6309 drivers/mtd/spi-nor/aspeed-smc.c Cédric Le Goater 2016-12-21 830 if (ret)
ceb720c71b6309 drivers/mtd/spi-nor/aspeed-smc.c Cédric Le Goater 2016-12-21 831 break;
ceb720c71b6309 drivers/mtd/spi-nor/aspeed-smc.c Cédric Le Goater 2016-12-21 832
ceb720c71b6309 drivers/mtd/spi-nor/aspeed-smc.c Cédric Le Goater 2016-12-21 833 ret = aspeed_smc_chip_setup_finish(chip);
ceb720c71b6309 drivers/mtd/spi-nor/aspeed-smc.c Cédric Le Goater 2016-12-21 834 if (ret)
ceb720c71b6309 drivers/mtd/spi-nor/aspeed-smc.c Cédric Le Goater 2016-12-21 835 break;
ceb720c71b6309 drivers/mtd/spi-nor/aspeed-smc.c Cédric Le Goater 2016-12-21 836
ceb720c71b6309 drivers/mtd/spi-nor/aspeed-smc.c Cédric Le Goater 2016-12-21 837 ret = mtd_device_register(mtd, NULL, 0);
ceb720c71b6309 drivers/mtd/spi-nor/aspeed-smc.c Cédric Le Goater 2016-12-21 838 if (ret)
ceb720c71b6309 drivers/mtd/spi-nor/aspeed-smc.c Cédric Le Goater 2016-12-21 839 break;
ceb720c71b6309 drivers/mtd/spi-nor/aspeed-smc.c Cédric Le Goater 2016-12-21 840
ceb720c71b6309 drivers/mtd/spi-nor/aspeed-smc.c Cédric Le Goater 2016-12-21 841 controller->chips[cs] = chip;
ceb720c71b6309 drivers/mtd/spi-nor/aspeed-smc.c Cédric Le Goater 2016-12-21 842 }
ceb720c71b6309 drivers/mtd/spi-nor/aspeed-smc.c Cédric Le Goater 2016-12-21 843
6597f0b0516ab0 drivers/mtd/spi-nor/aspeed-smc.c Nishka Dasgupta 2019-08-08 844 if (ret) {
6597f0b0516ab0 drivers/mtd/spi-nor/aspeed-smc.c Nishka Dasgupta 2019-08-08 845 of_node_put(child);
ceb720c71b6309 drivers/mtd/spi-nor/aspeed-smc.c Cédric Le Goater 2016-12-21 846 aspeed_smc_unregister(controller);
6597f0b0516ab0 drivers/mtd/spi-nor/aspeed-smc.c Nishka Dasgupta 2019-08-08 847 }
ceb720c71b6309 drivers/mtd/spi-nor/aspeed-smc.c Cédric Le Goater 2016-12-21 848
ceb720c71b6309 drivers/mtd/spi-nor/aspeed-smc.c Cédric Le Goater 2016-12-21 849 return ret;
ceb720c71b6309 drivers/mtd/spi-nor/aspeed-smc.c Cédric Le Goater 2016-12-21 850 }
ceb720c71b6309 drivers/mtd/spi-nor/aspeed-smc.c Cédric Le Goater 2016-12-21 851
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
-------------- next part --------------
A non-text attachment was scrubbed...
Name: .config.gz
Type: application/gzip
Size: 34561 bytes
Desc: not available
URL: <http://lists.infradead.org/pipermail/linux-mtd/attachments/20200726/02b0cddf/attachment-0001.gz>
More information about the linux-mtd
mailing list