lkml.org 
[lkml]   [2015]   [Nov]   [16]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH] mtd: fsl-quadspi: possible NULL reference
Hi Brian,

[auto build test WARNING on mtd/master]
[also build test WARNING on v4.4-rc1 next-20151116]

url: https://github.com/0day-ci/linux/commits/Brian-Norris/mtd-fsl-quadspi-possible-NULL-reference/20151117-024430
base: git://git.infradead.org/linux-mtd.git master
config: i386-allmodconfig (attached as .config)
reproduce:
# save the attached .config to linux build tree
make ARCH=i386

All warnings (new ones prefixed by >>):

drivers/mtd/spi-nor/fsl-quadspi.c: In function 'fsl_qspi_probe':
>> drivers/mtd/spi-nor/fsl-quadspi.c:947:18: warning: assignment discards 'const' qualifier from pointer target type [-Wdiscarded-qualifiers]
q->devtype_data = of_device_get_match_data(dev);
^

vim +/const +947 drivers/mtd/spi-nor/fsl-quadspi.c

931 struct device *dev = &pdev->dev;
932 struct fsl_qspi *q;
933 struct resource *res;
934 struct spi_nor *nor;
935 struct mtd_info *mtd;
936 int ret, i = 0;
937
938 q = devm_kzalloc(dev, sizeof(*q), GFP_KERNEL);
939 if (!q)
940 return -ENOMEM;
941
942 q->nor_num = of_get_child_count(dev->of_node);
943 if (!q->nor_num || q->nor_num > FSL_QSPI_MAX_CHIP)
944 return -ENODEV;
945
946 q->dev = dev;
> 947 q->devtype_data = of_device_get_match_data(dev);
948 if (!q->devtype_data)
949 return -ENODEV;
950 platform_set_drvdata(pdev, q);
951
952 /* find the resources */
953 res = platform_get_resource_byname(pdev, IORESOURCE_MEM, "QuadSPI");
954 q->iobase = devm_ioremap_resource(dev, res);
955 if (IS_ERR(q->iobase))

---
0-DAY kernel test infrastructure Open Source Technology Center
https://lists.01.org/pipermail/kbuild-all Intel Corporation
[unhandled content-type:application/octet-stream]
\
 
 \ /
  Last update: 2015-11-16 21:01    [W:0.079 / U:0.096 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site