tree:
https://git.kernel.org/pub/scm/linux/kernel/git/sashal/linux-stable.git queue-4.9
head: c69d59f2561388cc090fd06ef01ab4bb8d014bd6
commit: 8fb2dccd2de9eadc5c3d6bb74815022facd7655d [91/99] mtd: rawnand: Pass a nand_chip
object to nand_release()
config: arm-allyesconfig (attached as .config)
compiler: arm-linux-gnueabi-gcc (GCC) 7.5.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
git checkout 8fb2dccd2de9eadc5c3d6bb74815022facd7655d
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-7.5.0 make.cross ARCH=arm
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp(a)intel.com>
All errors (new ones prefixed by >>):
drivers/mtd/nand/pxa3xx_nand.c: In function 'pxa3xx_nand_remove':
> drivers/mtd/nand/pxa3xx_nand.c:1910:16: error: passing argument 1
of 'nand_release' from incompatible pointer type
[-Werror=incompatible-pointer-types]
nand_release(nand_to_mtd(&info->host[cs]->chip));
^~~~~~~~~~~
In file included from drivers/mtd/nand/pxa3xx_nand.c:24:0:
include/linux/mtd/nand.h:43:6: note: expected 'struct nand_chip *' but argument
is of type 'struct mtd_info *'
void nand_release(struct nand_chip *chip);
^~~~~~~~~~~~
cc1: some warnings being treated as errors
--
drivers/mtd/nand/qcom_nandc.c: In function 'qcom_nandc_probe':
> drivers/mtd/nand/qcom_nandc.c:2166:16: error: passing argument 1
of 'nand_release' from incompatible pointer type
[-Werror=incompatible-pointer-types]
nand_release(nand_to_mtd(&host->chip));
^~~~~~~~~~~
In file included from drivers/mtd/nand/qcom_nandc.c:20:0:
include/linux/mtd/nand.h:43:6: note: expected 'struct nand_chip *' but argument
is of type 'struct mtd_info *'
void nand_release(struct nand_chip *chip);
^~~~~~~~~~~~
cc1: some warnings being treated as errors
vim +/nand_release +1910 drivers/mtd/nand/pxa3xx_nand.c
fe69af002e26ca eric miao 2008-02-14 1880
fe69af002e26ca eric miao 2008-02-14 1881 static int pxa3xx_nand_remove(struct
platform_device *pdev)
fe69af002e26ca eric miao 2008-02-14 1882 {
e353a20afaee1e Lei Wen 2011-03-03 1883 struct pxa3xx_nand_info *info =
platform_get_drvdata(pdev);
f3c8cfc237927c Lei Wen 2011-07-14 1884 struct pxa3xx_nand_platform_data
*pdata;
f3c8cfc237927c Lei Wen 2011-07-14 1885 int irq, cs;
fe69af002e26ca eric miao 2008-02-14 1886
d456882b41b84e Lei Wen 2011-07-14 1887 if (!info)
d456882b41b84e Lei Wen 2011-07-14 1888 return 0;
d456882b41b84e Lei Wen 2011-07-14 1889
453810b79571ff Jingoo Han 2013-07-30 1890 pdata =
dev_get_platdata(&pdev->dev);
fe69af002e26ca eric miao 2008-02-14 1891
dbf5986aed6262 Haojian Zhuang 2009-09-10 1892 irq = platform_get_irq(pdev, 0);
dbf5986aed6262 Haojian Zhuang 2009-09-10 1893 if (irq >= 0)
dbf5986aed6262 Haojian Zhuang 2009-09-10 1894 free_irq(irq, info);
498b6145b8878c Ezequiel Garcia 2013-04-17 1895 pxa3xx_nand_free_buff(info);
82a72d108b4fbc Mike Rapoport 2009-02-17 1896
e971affaf92d53 Robert Jarzmik 2015-09-28 1897 /*
e971affaf92d53 Robert Jarzmik 2015-09-28 1898 * In the pxa3xx case, the DFI bus is
shared between the SMC and NFC.
e971affaf92d53 Robert Jarzmik 2015-09-28 1899 * In order to prevent a lockup of the
system bus, the DFI bus
e971affaf92d53 Robert Jarzmik 2015-09-28 1900 * arbitration is granted to SMC upon
driver removal. This is done by
e971affaf92d53 Robert Jarzmik 2015-09-28 1901 * setting the x_ARB_CNTL bit, which
also prevents the NAND to have
e971affaf92d53 Robert Jarzmik 2015-09-28 1902 * access to the bus anymore.
e971affaf92d53 Robert Jarzmik 2015-09-28 1903 */
e971affaf92d53 Robert Jarzmik 2015-09-28 1904 nand_writel(info, NDCR,
e971affaf92d53 Robert Jarzmik 2015-09-28 1905 (nand_readl(info, NDCR) &
~NDCR_ND_ARB_EN) |
e971affaf92d53 Robert Jarzmik 2015-09-28 1906 NFCV1_NDCR_ARB_CNTL);
fb32061ffaa9da Ezequiel Garcia 2013-04-17 1907 clk_disable_unprepare(info->clk);
82a72d108b4fbc Mike Rapoport 2009-02-17 1908
f3c8cfc237927c Lei Wen 2011-07-14 1909 for (cs = 0; cs < pdata->num_cs;
cs++)
063294a36e8e8c Boris Brezillon 2015-12-10 @1910
nand_release(nand_to_mtd(&info->host[cs]->chip));
fe69af002e26ca eric miao 2008-02-14 1911 return 0;
fe69af002e26ca eric miao 2008-02-14 1912 }
fe69af002e26ca eric miao 2008-02-14 1913
:::::: The code at line 1910 was first introduced by commit
:::::: 063294a36e8e8c2642b6c63a709d6792a609ec33 mtd: nand: pxa3xx: use the mtd instance
embedded in struct nand_chip
:::::: TO: Boris BREZILLON <boris.brezillon(a)free-electrons.com>
:::::: CC: Brian Norris <computersforpeace(a)gmail.com>
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org