drivers/mmc/host/sdhci-of-esdhc.c:900:33: sparse: sparse: incorrect type in argument 1 (different address spaces)
by kernel test robot
Hi Krzysztof,
First bad commit (maybe != root cause):
tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head: 2c85ebc57b3e1817b6ce1a6b703928e113a90442
commit: 54d8454436a205682bd89d66d8d9eedbc8452d15 mmc: host: Enable compile testing of multiple drivers
date: 3 months ago
config: openrisc-randconfig-s031-20201214 (attached as .config)
compiler: or1k-linux-gcc (GCC) 9.3.0
reproduce:
wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
chmod +x ~/bin/make.cross
# apt-get install sparse
# sparse version: v0.6.3-184-g1b896707-dirty
# https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit...
git remote add linus https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
git fetch --no-tags linus master
git checkout 54d8454436a205682bd89d66d8d9eedbc8452d15
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-9.3.0 make.cross C=1 CF='-fdiagnostic-prefix -D__CHECK_ENDIAN__' ARCH=openrisc
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp(a)intel.com>
"sparse warnings: (new ones prefixed by >>)"
>> drivers/mmc/host/sdhci-of-esdhc.c:900:33: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected void *addr @@ got void [noderef] __iomem *[assigned] scfg_base @@
drivers/mmc/host/sdhci-of-esdhc.c:900:33: sparse: expected void *addr
drivers/mmc/host/sdhci-of-esdhc.c:900:33: sparse: got void [noderef] __iomem *[assigned] scfg_base
vim +900 drivers/mmc/host/sdhci-of-esdhc.c
ea35645a3c66a74 yangbo lu 2017-04-20 858
ea35645a3c66a74 yangbo lu 2017-04-20 859 static int esdhc_signal_voltage_switch(struct mmc_host *mmc,
ea35645a3c66a74 yangbo lu 2017-04-20 860 struct mmc_ios *ios)
ea35645a3c66a74 yangbo lu 2017-04-20 861 {
ea35645a3c66a74 yangbo lu 2017-04-20 862 struct sdhci_host *host = mmc_priv(mmc);
ea35645a3c66a74 yangbo lu 2017-04-20 863 struct device_node *scfg_node;
ea35645a3c66a74 yangbo lu 2017-04-20 864 void __iomem *scfg_base = NULL;
ea35645a3c66a74 yangbo lu 2017-04-20 865 u32 sdhciovselcr;
ea35645a3c66a74 yangbo lu 2017-04-20 866 u32 val;
ea35645a3c66a74 yangbo lu 2017-04-20 867
ea35645a3c66a74 yangbo lu 2017-04-20 868 /*
ea35645a3c66a74 yangbo lu 2017-04-20 869 * Signal Voltage Switching is only applicable for Host Controllers
ea35645a3c66a74 yangbo lu 2017-04-20 870 * v3.00 and above.
ea35645a3c66a74 yangbo lu 2017-04-20 871 */
ea35645a3c66a74 yangbo lu 2017-04-20 872 if (host->version < SDHCI_SPEC_300)
ea35645a3c66a74 yangbo lu 2017-04-20 873 return 0;
ea35645a3c66a74 yangbo lu 2017-04-20 874
ea35645a3c66a74 yangbo lu 2017-04-20 875 val = sdhci_readl(host, ESDHC_PROCTL);
ea35645a3c66a74 yangbo lu 2017-04-20 876
ea35645a3c66a74 yangbo lu 2017-04-20 877 switch (ios->signal_voltage) {
ea35645a3c66a74 yangbo lu 2017-04-20 878 case MMC_SIGNAL_VOLTAGE_330:
ea35645a3c66a74 yangbo lu 2017-04-20 879 val &= ~ESDHC_VOLT_SEL;
ea35645a3c66a74 yangbo lu 2017-04-20 880 sdhci_writel(host, val, ESDHC_PROCTL);
ea35645a3c66a74 yangbo lu 2017-04-20 881 return 0;
ea35645a3c66a74 yangbo lu 2017-04-20 882 case MMC_SIGNAL_VOLTAGE_180:
ea35645a3c66a74 yangbo lu 2017-04-20 883 scfg_node = of_find_matching_node(NULL, scfg_device_ids);
ea35645a3c66a74 yangbo lu 2017-04-20 884 if (scfg_node)
ea35645a3c66a74 yangbo lu 2017-04-20 885 scfg_base = of_iomap(scfg_node, 0);
ea35645a3c66a74 yangbo lu 2017-04-20 886 if (scfg_base) {
ea35645a3c66a74 yangbo lu 2017-04-20 887 sdhciovselcr = SDHCIOVSELCR_TGLEN |
ea35645a3c66a74 yangbo lu 2017-04-20 888 SDHCIOVSELCR_VSELVAL;
ea35645a3c66a74 yangbo lu 2017-04-20 889 iowrite32be(sdhciovselcr,
ea35645a3c66a74 yangbo lu 2017-04-20 890 scfg_base + SCFG_SDHCIOVSELCR);
ea35645a3c66a74 yangbo lu 2017-04-20 891
ea35645a3c66a74 yangbo lu 2017-04-20 892 val |= ESDHC_VOLT_SEL;
ea35645a3c66a74 yangbo lu 2017-04-20 893 sdhci_writel(host, val, ESDHC_PROCTL);
ea35645a3c66a74 yangbo lu 2017-04-20 894 mdelay(5);
ea35645a3c66a74 yangbo lu 2017-04-20 895
ea35645a3c66a74 yangbo lu 2017-04-20 896 sdhciovselcr = SDHCIOVSELCR_TGLEN |
ea35645a3c66a74 yangbo lu 2017-04-20 897 SDHCIOVSELCR_SDHC_VS;
ea35645a3c66a74 yangbo lu 2017-04-20 898 iowrite32be(sdhciovselcr,
ea35645a3c66a74 yangbo lu 2017-04-20 899 scfg_base + SCFG_SDHCIOVSELCR);
ea35645a3c66a74 yangbo lu 2017-04-20 @900 iounmap(scfg_base);
ea35645a3c66a74 yangbo lu 2017-04-20 901 } else {
ea35645a3c66a74 yangbo lu 2017-04-20 902 val |= ESDHC_VOLT_SEL;
ea35645a3c66a74 yangbo lu 2017-04-20 903 sdhci_writel(host, val, ESDHC_PROCTL);
ea35645a3c66a74 yangbo lu 2017-04-20 904 }
ea35645a3c66a74 yangbo lu 2017-04-20 905 return 0;
ea35645a3c66a74 yangbo lu 2017-04-20 906 default:
ea35645a3c66a74 yangbo lu 2017-04-20 907 return 0;
ea35645a3c66a74 yangbo lu 2017-04-20 908 }
ea35645a3c66a74 yangbo lu 2017-04-20 909 }
ea35645a3c66a74 yangbo lu 2017-04-20 910
:::::: The code at line 900 was first introduced by commit
:::::: ea35645a3c66a74af92d3bbb4eb131220fc3e58a mmc: sdhci-of-esdhc: add support for signal voltage switch
:::::: TO: yangbo lu <yangbo.lu(a)nxp.com>
:::::: CC: Ulf Hansson <ulf.hansson(a)linaro.org>
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
1 year, 9 months
[microchip-ung-linux-upstream:v5.10-webstax 62/88] drivers/net/ethernet/vitesse/vc3fdma.c:1939:23: warning: assignment to 'void from 'int' makes pointer from integer without a cast
by kernel test robot
tree: https://github.com/microchip-ung/linux-upstream.git v5.10-webstax
head: 0c603c93d534e71ceee9485bfe1b0b75561efb0e
commit: 2e15507762cfc0c74bc1e597263005f2ad075881 [62/88] net: ethernet: Add MSCC/VTSS drivers
config: arm-allmodconfig (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
# https://github.com/microchip-ung/linux-upstream/commit/2e15507762cfc0c74b...
git remote add microchip-ung-linux-upstream https://github.com/microchip-ung/linux-upstream.git
git fetch --no-tags microchip-ung-linux-upstream v5.10-webstax
git checkout 2e15507762cfc0c74bc1e597263005f2ad075881
# 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(a)intel.com>
All warnings (new ones prefixed by >>):
drivers/net/ethernet/vitesse/vc3fdma.c: In function 'rx_buffer_add_to_ufdma':
drivers/net/ethernet/vitesse/vc3fdma.c:355:11: error: 'struct skb_shared_info' has no member named 'free'
355 | shinfo->free = rx_recycle;
| ^~
drivers/net/ethernet/vitesse/vc3fdma.c:367:15: error: 'struct skb_shared_info' has no member named 'free'
367 | shinfo->free = rx_no_recycle;
| ^~
drivers/net/ethernet/vitesse/vc3fdma.c: In function 'RX_buf_dscr_free':
drivers/net/ethernet/vitesse/vc3fdma.c:1272:15: error: 'struct skb_shared_info' has no member named 'free'
1272 | shinfo->free = recycle ? rx_recycle : rx_no_recycle;
| ^~
drivers/net/ethernet/vitesse/vc3fdma.c: In function 'CX_cache_flush':
drivers/net/ethernet/vitesse/vc3fdma.c:1446:5: error: implicit declaration of function 'dma_cache_wback' [-Werror=implicit-function-declaration]
1446 | dma_cache_wback((unsigned long)virt_addr, bytes);
| ^~~~~~~~~~~~~~~
drivers/net/ethernet/vitesse/vc3fdma.c: In function 'CX_cache_invalidate':
drivers/net/ethernet/vitesse/vc3fdma.c:1455:5: error: implicit declaration of function 'dma_cache_inv'; did you mean 'kmem_cache_init'? [-Werror=implicit-function-declaration]
1455 | dma_cache_inv((unsigned long)virt_addr, bytes);
| ^~~~~~~~~~~~~
| kmem_cache_init
drivers/net/ethernet/vitesse/vc3fdma.c: In function 'CX_trace_printf':
drivers/net/ethernet/vitesse/vc3fdma.c:1500:5: warning: function 'CX_trace_printf' might be a candidate for 'gnu_printf' format attribute [-Wsuggest-attribute=format]
1500 | vprintk_emit(0, -1, NULL, full_fmt, args);
| ^~~~~~~~~~~~
drivers/net/ethernet/vitesse/vc3fdma.c: In function 'vc3fdma_create':
drivers/net/ethernet/vitesse/vc3fdma.c:1920:18: error: implicit declaration of function 'device_get_match_data'; did you mean 'device_match_any'? [-Werror=implicit-function-declaration]
1920 | priv->chip = device_get_match_data(&pdev->dev);
| ^~~~~~~~~~~~~~~~~~~~~
| device_match_any
drivers/net/ethernet/vitesse/vc3fdma.c:1920:16: warning: assignment to 'const struct fdma_chip *' from 'int' makes pointer from integer without a cast [-Wint-conversion]
1920 | priv->chip = device_get_match_data(&pdev->dev);
| ^
drivers/net/ethernet/vitesse/vc3fdma.c:1939:25: error: implicit declaration of function 'devm_ioremap' [-Werror=implicit-function-declaration]
1939 | priv->map_origin1 = devm_ioremap(&pdev->dev, res->start, resource_size(res));
| ^~~~~~~~~~~~
>> drivers/net/ethernet/vitesse/vc3fdma.c:1939:23: warning: assignment to 'void *' from 'int' makes pointer from integer without a cast [-Wint-conversion]
1939 | priv->map_origin1 = devm_ioremap(&pdev->dev, res->start, resource_size(res));
| ^
drivers/net/ethernet/vitesse/vc3fdma.c:1948:23: warning: assignment to 'void *' from 'int' makes pointer from integer without a cast [-Wint-conversion]
1948 | priv->map_origin2 = devm_ioremap(&pdev->dev, res->start, resource_size(res));
| ^
drivers/net/ethernet/vitesse/vc3fdma.c: In function 'zc_poll':
drivers/net/ethernet/vitesse/vc3fdma.c:2239:27: error: 'struct skb_shared_info' has no member named 'free'
2239 | if (shinfo->free == rx_recycle) {
| ^~
drivers/net/ethernet/vitesse/vc3fdma.c: At top level:
drivers/net/ethernet/vitesse/vc3fdma.c:2533:34: error: array type has incomplete element type 'struct of_device_id'
2533 | static const struct of_device_id mscc_fdma_id_table[] = {
| ^~~~~~~~~~~~~~~~~~
drivers/net/ethernet/vitesse/vc3fdma.c:2535:9: error: field name not in record or union initializer
2535 | .compatible = "mscc,luton-fdma",
| ^
drivers/net/ethernet/vitesse/vc3fdma.c:2535:9: note: (near initialization for 'mscc_fdma_id_table')
drivers/net/ethernet/vitesse/vc3fdma.c:2536:9: error: field name not in record or union initializer
2536 | .data = &luton_chip,
| ^
drivers/net/ethernet/vitesse/vc3fdma.c:2536:9: note: (near initialization for 'mscc_fdma_id_table')
drivers/net/ethernet/vitesse/vc3fdma.c:2539:9: error: field name not in record or union initializer
2539 | .compatible = "mscc,serval-fdma",
| ^
drivers/net/ethernet/vitesse/vc3fdma.c:2539:9: note: (near initialization for 'mscc_fdma_id_table')
drivers/net/ethernet/vitesse/vc3fdma.c:2540:9: error: field name not in record or union initializer
2540 | .data = &serval_chip,
| ^
drivers/net/ethernet/vitesse/vc3fdma.c:2540:9: note: (near initialization for 'mscc_fdma_id_table')
drivers/net/ethernet/vitesse/vc3fdma.c:2543:9: error: field name not in record or union initializer
2543 | .compatible = "mscc,ocelot-fdma",
| ^
drivers/net/ethernet/vitesse/vc3fdma.c:2543:9: note: (near initialization for 'mscc_fdma_id_table')
drivers/net/ethernet/vitesse/vc3fdma.c:2544:9: error: field name not in record or union initializer
2544 | .data = &ocelot_chip,
| ^
drivers/net/ethernet/vitesse/vc3fdma.c:2544:9: note: (near initialization for 'mscc_fdma_id_table')
drivers/net/ethernet/vitesse/vc3fdma.c:2547:9: error: field name not in record or union initializer
2547 | .compatible = "mscc,servalt-fdma",
| ^
drivers/net/ethernet/vitesse/vc3fdma.c:2547:9: note: (near initialization for 'mscc_fdma_id_table')
drivers/net/ethernet/vitesse/vc3fdma.c:2548:9: error: field name not in record or union initializer
2548 | .data = &servalt_chip,
| ^
drivers/net/ethernet/vitesse/vc3fdma.c:2548:9: note: (near initialization for 'mscc_fdma_id_table')
drivers/net/ethernet/vitesse/vc3fdma.c:2551:9: error: field name not in record or union initializer
2551 | .compatible = "mscc,jaguar2-fdma",
| ^
drivers/net/ethernet/vitesse/vc3fdma.c:2551:9: note: (near initialization for 'mscc_fdma_id_table')
drivers/net/ethernet/vitesse/vc3fdma.c:2552:9: error: field name not in record or union initializer
2552 | .data = &jaguar2_chip,
| ^
drivers/net/ethernet/vitesse/vc3fdma.c:2552:9: note: (near initialization for 'mscc_fdma_id_table')
cc1: some warnings being treated as errors
vim +1939 drivers/net/ethernet/vitesse/vc3fdma.c
1902
1903 /****************************************************************************/
1904 // vc3fdma_create()
1905 /****************************************************************************/
1906 static struct net_device *vc3fdma_create(struct platform_device *pdev)
1907 {
1908 struct net_device *dev;
1909 struct vc3fdma_private *priv;
1910 struct resource *res;
1911
1912 if ((dev = alloc_etherdev(sizeof(struct vc3fdma_private))) == NULL) {
1913 return NULL;
1914 }
1915
1916 dev->netdev_ops = &vc3fdma_netdev_ops;
1917 priv = netdev_priv(dev);
1918 memset(priv, 0, sizeof(*priv));
1919 priv->netdev = dev; // Backlink
1920 priv->chip = device_get_match_data(&pdev->dev);
1921 vc3fdma_inst = priv; // Static pointer, ugly!
1922 ifh_encap[IFH_ID_OFF] = priv->chip->ifh_id; // Shared static data - ugly
1923
1924 /// This particular device adds no MAC header - must be part of data
1925 dev->hard_header_len = dev->min_header_len = 0;
1926
1927 // Set initial, bogus MAC address
1928 eth_hw_addr_random(dev);
1929 memset(&dev->broadcast[0], 0xff, 6);
1930
1931 // Memory regions
1932 res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
1933 if (!res) {
1934 dev_err(&pdev->dev, "Unable to map origin1\n");
1935 free_netdev(dev);
1936 return NULL;
1937 }
1938
> 1939 priv->map_origin1 = devm_ioremap(&pdev->dev, res->start, resource_size(res));
1940 priv->origin1 = *res;
1941 res = platform_get_resource(pdev, IORESOURCE_MEM, 1);
1942 if (!res) {
1943 dev_err(&pdev->dev, "Unable to map origin2\n");
1944 free_netdev(dev);
1945 return NULL;
1946 }
1947
1948 priv->map_origin2 = devm_ioremap(&pdev->dev, res->start, resource_size(res));
1949 priv->origin2 = *res;
1950 dev_dbg(&pdev->dev, "Mapped switch registers 0x%08x 0x%08x\n", (u32)priv->map_origin1, (u32)priv->map_origin2);
1951
1952 // Set arbitrarily high for direct injection (not rx)
1953 dev->mtu = IF_BUFSIZE_JUMBO;
1954 priv->rx_cfg.mtu = RX_MTU_DEFAULT;
1955
1956 priv->proc_fs_dump_file = proc_create(DRV_NAME, S_IRUGO, NULL, &ufdma_fops);
1957
1958 spin_lock_init(&priv->lock);
1959
1960 return dev;
1961 }
1962
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
1 year, 9 months
[microchip-ung-linux-upstream:v5.10-webstax 61/88] drivers/mfd/mscc_jaguar2_pci.c:198:18: warning: variable 'offset' set but not used
by kernel test robot
tree: https://github.com/microchip-ung/linux-upstream.git v5.10-webstax
head: 0c603c93d534e71ceee9485bfe1b0b75561efb0e
commit: 5b4a9de85b60edf37f6322a88a2c37970c81b875 [61/88] mfd: Add sparx5 and jaguar2 PCIe mfd drivers
config: x86_64-allyesconfig (attached as .config)
compiler: gcc-9 (Debian 9.3.0-15) 9.3.0
reproduce (this is a W=1 build):
# https://github.com/microchip-ung/linux-upstream/commit/5b4a9de85b60edf37f...
git remote add microchip-ung-linux-upstream https://github.com/microchip-ung/linux-upstream.git
git fetch --no-tags microchip-ung-linux-upstream v5.10-webstax
git checkout 5b4a9de85b60edf37f6322a88a2c37970c81b875
# save the attached .config to linux build tree
make W=1 ARCH=x86_64
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp(a)intel.com>
All warnings (new ones prefixed by >>):
drivers/mfd/mscc_jaguar2_pci.c: In function 'jaguar2_pci_probe':
>> drivers/mfd/mscc_jaguar2_pci.c:198:18: warning: variable 'offset' set but not used [-Wunused-but-set-variable]
198 | resource_size_t offset;
| ^~~~~~
vim +/offset +198 drivers/mfd/mscc_jaguar2_pci.c
192
193 static int jaguar2_pci_probe(struct pci_dev *pdev, const struct pci_device_id *id)
194 {
195 struct uio_jaguar2 *priv;
196 struct uio_info *info;
197 int ret;
> 198 resource_size_t offset;
199
200 if (!pdev->dev.of_node)
201 return -ENODEV;
202
203 ret = pcim_enable_device(pdev);
204 if (ret)
205 return ret;
206
207 ret = dma_set_mask_and_coherent(&pdev->dev, DMA_BIT_MASK(64));
208 if (ret) {
209 ret = dma_set_mask_and_coherent(&pdev->dev, DMA_BIT_MASK(32));
210 if (ret) {
211 dev_err(&pdev->dev,
212 "DMA configuration failed: 0x%x\n", ret);
213 return ret;
214 }
215 }
216
217 offset = pci_resource_start(pdev, JAGUAR2_SWITCH_BAR);
218
219 pci_set_master(pdev);
220 pci_enable_msi(pdev);
221
222 priv = devm_kzalloc(&pdev->dev, sizeof(*priv), GFP_KERNEL);
223 if (!priv)
224 return -ENOMEM;
225
226 info = &priv->uio;
227 info->priv = priv;
228
229 iomap = pcim_iomap(pdev, JAGUAR2_SWITCH_BAR, 0);
230 if (!iomap)
231 return -ENOMEM;
232
233 info->mem[0].addr = pci_resource_start(pdev, JAGUAR2_SWITCH_BAR);
234 info->mem[0].size = pci_resource_len(pdev, JAGUAR2_SWITCH_BAR);
235 info->mem[0].memtype = UIO_MEM_PHYS;
236 info->mem[0].internal_addr = iomap;
237
238 info->mem[1].addr = pci_resource_start(pdev, JAGUAR2_CONFIG_BAR);
239 info->mem[1].size = pci_resource_len(pdev, JAGUAR2_CONFIG_BAR);
240 info->mem[1].memtype = UIO_MEM_PHYS;
241
242 info->name = "vcoreiii_switch";
243 info->version = "0";
244 info->irq = UIO_IRQ_CUSTOM;
245 info->irqcontrol = jaguar2_irqcontrol;
246
247 spin_lock_init(&priv->lock);
248 priv->flags = 0; /* interrupt is enabled to begin with */
249 priv->pdev = pdev;
250
251 ret = uio_register_device(&pdev->dev, info);
252 if (ret)
253 return ret;
254
255 pci_set_drvdata(pdev, info);
256
257 dev_info(&pdev->dev, "JAGUAR2: %x\n",
258 (readl(iomap + 0x1010000) >> 12) & 0xffff);
259
260 /* Route IRQs to PCI IRQs (both legacy and MSI) */
261 writel(0xffffffff, ICPU_INTR_DST_INTR_MAP0 + iomap);
262 writel(0xffffffff, ICPU_INTR_DST_INTR_MAP1 + iomap);
263 writel(0xffffffff, ICPU_INTR_DST_INTR_MAP2 + iomap);
264 writel(0xffffffff, ICPU_INTR_DST_INTR_MAP3 + iomap);
265 writel(ICPU_PCIE_INTR_CFG_INTR_RISING_ENA |
266 ICPU_PCIE_INTR_CFG_INTR_FALLING_ENA, ICPU_PCIE_INTR_CFG0 +
267 iomap);
268 writel(ICPU_PCIE_INTR_CFG_INTR_RISING_ENA |
269 ICPU_PCIE_INTR_CFG_INTR_FALLING_ENA, ICPU_PCIE_INTR_CFG1 +
270 iomap);
271 writel(ICPU_PCIE_INTR_COMMON_CFG_PCIE_INTR_ENA,
272 ICPU_PCIE_INTR_COMMON_CFG + iomap);
273 jaguar2_irq_common_init(pdev, JAGUAR2_NR_IRQ, priv);
274
275 return of_platform_populate(pdev->dev.of_node, NULL, NULL, &pdev->dev);
276 }
277
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
1 year, 9 months
Re: [PATCH -next] scsi: qla2xxx: tcm_qla2xxx: fix spelling mistakes
by kernel test robot
In-Reply-To: <20201214093018.5920-1-zhengyongjun3(a)huawei.com>
References: <20201214093018.5920-1-zhengyongjun3(a)huawei.com>
TO: Zheng Yongjun <zhengyongjun3(a)huawei.com>
TO: jejb(a)linux.ibm.com
TO: martin.petersen(a)oracle.com
CC: linux-scsi(a)vger.kernel.org
CC: linux-kernel(a)vger.kernel.org
CC: Zheng Yongjun <zhengyongjun3(a)huawei.com>
Hi Zheng,
Thank you for the patch! Yet something to improve:
[auto build test ERROR on next-20201211]
url: https://github.com/0day-ci/linux/commits/Zheng-Yongjun/scsi-qla2xxx-tcm_q...
base: 3cc2bd440f2171f093b3a8480a4b54d8c270ed38
config: x86_64-randconfig-a002-20201214 (attached as .config)
compiler: clang version 12.0.0 (https://github.com/llvm/llvm-project d38205144febf4dc42c9270c6aa3d978f1ef65e1)
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
# install x86_64 cross compiling tool for clang build
# apt-get install binutils-x86-64-linux-gnu
# https://github.com/0day-ci/linux/commit/3fdd3c95cb566f5d795455e3e43369ec3...
git remote add linux-review https://github.com/0day-ci/linux
git fetch --no-tags linux-review Zheng-Yongjun/scsi-qla2xxx-tcm_qla2xxx-fix-spelling-mistakes/20201214-173340
git checkout 3fdd3c95cb566f5d795455e3e43369ec3d5f04ee
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross ARCH=x86_64
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 >>):
terminate called after throwing an instance of 'std::system_error'
what(): Resource temporarily unavailable
PLEASE submit a bug report to https://bugs.llvm.org/ and include the crash backtrace.
>> ld.lld: error: failed to open drivers/net/ethernet/chelsio/cxgb4/cxgb4.o: Cannot allocate memory
#0 0x000056087fdd6adc llvm::sys::PrintStackTrace(llvm::raw_ostream&, int) (/opt/cross/clang-d38205144f/bin/lld+0x8c6adc)
#1 0x000056087fdd4924 llvm::sys::RunSignalHandlers() (/opt/cross/clang-d38205144f/bin/lld+0x8c4924)
#2 0x000056087fdd4a78 SignalHandler(int) (/opt/cross/clang-d38205144f/bin/lld+0x8c4a78)
#3 0x00007f1fcf546730 __restore_rt (/lib/x86_64-linux-gnu/libpthread.so.0+0x12730)
#4 0x00007f1fcf0787bb raise (/lib/x86_64-linux-gnu/libc.so.6+0x377bb)
#5 0x00007f1fcf063535 abort (/lib/x86_64-linux-gnu/libc.so.6+0x22535)
#6 0x00007f1fcf42d983 (/usr/lib/x86_64-linux-gnu/libstdc++.so.6+0x8c983)
#7 0x00007f1fcf4338c6 (/usr/lib/x86_64-linux-gnu/libstdc++.so.6+0x928c6)
#8 0x00007f1fcf433901 (/usr/lib/x86_64-linux-gnu/libstdc++.so.6+0x92901)
#9 0x00007f1fcf433b34 (/usr/lib/x86_64-linux-gnu/libstdc++.so.6+0x92b34)
#10 0x00007f1fcf42fa55 (/usr/lib/x86_64-linux-gnu/libstdc++.so.6+0x8ea55)
#11 0x00007f1fcf45cdc9 (/usr/lib/x86_64-linux-gnu/libstdc++.so.6+0xbbdc9)
#12 0x0000560882ac5d61 std::thread::_State_impl<std::thread::_Invoker<std::tuple<llvm::parallel::detail::(anonymous namespace)::ThreadPoolExecutor::ThreadPoolExecutor(llvm::ThreadPoolStrategy)::'lambda'()> > >::_M_run() (/opt/cross/clang-d38205144f/bin/lld+0x35b5d61)
#13 0x00007f1fcf45cb2f (/usr/lib/x86_64-linux-gnu/libstdc++.so.6+0xbbb2f)
#14 0x00007f1fcf53bfa3 start_thread (/lib/x86_64-linux-gnu/libpthread.so.0+0x7fa3)
#15 0x00007f1fcf13a4cf clone (/lib/x86_64-linux-gnu/libc.so.6+0xf94cf)
/bin/bash: line 1: 184513 Aborted ld.lld -m elf_x86_64 -r -o drivers/net/ethernet/chelsio/cxgb4/cxgb4.o drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.o drivers/net/ethernet/chelsio/cxgb4/l2t.o drivers/net/ethernet/chelsio/cxgb4/smt.o drivers/net/ethernet/chelsio/cxgb4/t4_hw.o drivers/net/ethernet/chelsio/cxgb4/sge.o drivers/net/ethernet/chelsio/cxgb4/clip_tbl.o drivers/net/ethernet/chelsio/cxgb4/cxgb4_ethtool.o drivers/net/ethernet/chelsio/cxgb4/cxgb4_uld.o drivers/net/ethernet/chelsio/cxgb4/srq.o drivers/net/ethernet/chelsio/cxgb4/sched.o drivers/net/ethernet/chelsio/cxgb4/cxgb4_filter.o drivers/net/ethernet/chelsio/cxgb4/cxgb4_tc_u32.o drivers/net/ethernet/chelsio/cxgb4/cxgb4_ptp.o drivers/net/ethernet/chelsio/cxgb4/cxgb4_tc_flower.o drivers/net/ethernet/chelsio/cxgb4/cxgb4_cudbg.o drivers/net/ethernet/chelsio/cxgb4/cxgb4_mps.o drivers/net/ethernet/chelsio/cxgb4/cudbg_common.o drivers/net/ethernet/chelsio/cxgb4/cudbg_lib.o drivers/net/ethernet/chelsio/cxgb4/cudbg_zlib.o drivers/net/ethernet/chelsio/cxgb4/cxgb4_tc_mqprio.o drivers/net/ethernet/chelsio/cxgb4/cxgb4_tc_matchall.o drivers/net/ethernet/chelsio/cxgb4/cxgb4_debugfs.o drivers/net/ethernet/chelsio/cxgb4/cxgb4_thermal.o
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
1 year, 9 months
Re: [PATCH v1 net-next] net: phy: mchp: Add 1588 support for LAN8814 Quad PHY
by kernel test robot
Hi Divya,
Thank you for the patch! Perhaps something to improve:
[auto build test WARNING on net-next/master]
url: https://github.com/0day-ci/linux/commits/Divya-Koppera/net-phy-mchp-Add-1...
base: https://git.kernel.org/pub/scm/linux/kernel/git/davem/net-next.git 13458ffe0a953e17587f172a8e5059c243e6850a
config: s390-allyesconfig (attached as .config)
compiler: s390-linux-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
# https://github.com/0day-ci/linux/commit/d3b83e2903ca90bd2652d828d0e33f0d5...
git remote add linux-review https://github.com/0day-ci/linux
git fetch --no-tags linux-review Divya-Koppera/net-phy-mchp-Add-1588-support-for-LAN8814-Quad-PHY/20201214-205209
git checkout d3b83e2903ca90bd2652d828d0e33f0d5559757a
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-9.3.0 make.cross ARCH=s390
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp(a)intel.com>
All warnings (new ones prefixed by >>):
drivers/net/phy/micrel.c: In function 'lan8814_dequeue_skb':
>> drivers/net/phy/micrel.c:429:11: warning: variable 'rc' set but not used [-Wunused-but-set-variable]
429 | int len, rc;
| ^~
drivers/net/phy/micrel.c: At top level:
>> drivers/net/phy/micrel.c:492:13: warning: no previous prototype for 'lan8814_handle_ptp_interrupt' [-Wmissing-prototypes]
492 | irqreturn_t lan8814_handle_ptp_interrupt(struct phy_device *phydev)
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
>> drivers/net/phy/micrel.c:507:13: warning: no previous prototype for 'lan8814_handle_interrupt' [-Wmissing-prototypes]
507 | irqreturn_t lan8814_handle_interrupt(struct phy_device *phydev)
| ^~~~~~~~~~~~~~~~~~~~~~~~
drivers/net/phy/micrel.c: In function 'lan8814_ptp_clock_step':
>> drivers/net/phy/micrel.c:1911:8: warning: variable 'adjustment_value_lo' set but not used [-Wunused-but-set-variable]
1911 | u16 adjustment_value_lo, adjustment_value_hi;
| ^~~~~~~~~~~~~~~~~~~
drivers/net/phy/micrel.c:1926:8: warning: variable 'adjustment_value_lo' set but not used [-Wunused-but-set-variable]
1926 | u16 adjustment_value_lo, adjustment_value_hi;
| ^~~~~~~~~~~~~~~~~~~
drivers/net/phy/micrel.c: In function 'lan8814_txtstamp':
>> drivers/net/phy/micrel.c:1750:6: warning: this statement may fall through [-Wimplicit-fallthrough=]
1750 | if (is_sync(skb, type)) {
| ^
drivers/net/phy/micrel.c:1754:2: note: here
1754 | case HWTSTAMP_TX_ON:
| ^~~~
In file included from include/linux/bitmap.h:9,
from include/linux/cpumask.h:12,
from include/linux/smp.h:13,
from include/linux/lockdep.h:14,
from include/linux/spinlock.h:59,
from include/linux/mmzone.h:8,
from include/linux/gfp.h:6,
from include/linux/umh.h:4,
from include/linux/kmod.h:9,
from include/linux/module.h:16,
from drivers/net/phy/micrel.c:24:
In function 'memcmp',
inlined from 'lan8814_dequeue_skb' at drivers/net/phy/micrel.c:459:8,
inlined from 'lan8814_get_tx_ts' at drivers/net/phy/micrel.c:485:3,
inlined from 'lan8814_handle_ptp_interrupt' at drivers/net/phy/micrel.c:502:2:
include/linux/string.h:436:4: error: call to '__read_overflow2' declared with attribute error: detected read beyond size of object passed as 2nd parameter
436 | __read_overflow2();
| ^~~~~~~~~~~~~~~~~~
vim +/rc +429 drivers/net/phy/micrel.c
421
422 static void lan8814_dequeue_skb(struct lan8814_ptp *ptp)
423 {
424 struct lan8814_priv *priv = container_of(ptp, struct lan8814_priv, ptp);
425 struct phy_device *phydev = priv->phydev;
426 struct skb_shared_hwtstamps shhwtstamps;
427 struct sk_buff *skb;
428 u8 skb_sig[16];
> 429 int len, rc;
430 u32 reg, cnt;
431 u32 seconds, nsec, seq_id;
432
433 reg = lan8814_read_page_reg(phydev, 5, PTP_CAP_INFO);
434 cnt = PTP_CAP_INFO_TX_TS_CNT_GET_(reg);
435
436 /* FIFO is Empty*/
437 if (cnt == 0)
438 return;
439
440 len = skb_queue_len(&ptp->tx_queue);
441 if (len < 1)
442 return;
443
444 while (len--) {
445 skb = __skb_dequeue(&ptp->tx_queue);
446 if (!skb)
447 return;
448
449 /* Can't get the signature of the packet, won't ever
450 * be able to have one so let's dequeue the packet.
451 */
452 if (get_sig(skb, skb_sig) < 0) {
453 kfree_skb(skb);
454 continue;
455 }
456
457 lan8814_ptp_tx_ts_get(phydev, &seconds, &nsec, &seq_id);
458
459 rc = memcmp(skb_sig, &seq_id, sizeof(skb_sig));
460
461 /* Check if we found the signature we were looking for. */
462 if (memcmp(skb_sig, &seq_id, sizeof(skb_sig))) {
463 memset(&shhwtstamps, 0, sizeof(shhwtstamps));
464 shhwtstamps.hwtstamp = ktime_set(seconds, nsec);
465 skb_complete_tx_timestamp(skb, &shhwtstamps);
466
467 return;
468 }
469
470 /* Valid signature but does not match the one of the
471 * packet in the FIFO right now, reschedule it for later
472 * packets.
473 */
474 __skb_queue_tail(&ptp->tx_queue, skb);
475 }
476 }
477
478 static void lan8814_get_tx_ts(struct lan8814_ptp *ptp)
479 {
480 u32 reg;
481 struct lan8814_priv *priv = container_of(ptp, struct lan8814_priv, ptp);
482 struct phy_device *phydev = priv->phydev;
483
484 do {
485 lan8814_dequeue_skb(ptp);
486
487 /* If other timestamps are available in the FIFO, process them. */
488 reg = lan8814_read_page_reg(phydev, 5, PTP_CAP_INFO);
489 } while (PTP_CAP_INFO_TX_TS_CNT_GET_(reg) > 1);
490 }
491
> 492 irqreturn_t lan8814_handle_ptp_interrupt(struct phy_device *phydev)
493 {
494 struct lan8814_priv *lan8814 = phydev->priv;
495 int rc;
496
497 rc = lan8814_read_page_reg(phydev, 5, PTP_TSU_INT_STS);
498
499 if (!(rc & PTP_TSU_INT_STS_PTP_TX_TS_EN))
500 return IRQ_NONE;
501
502 lan8814_get_tx_ts(&lan8814->ptp);
503
504 return IRQ_HANDLED;
505 }
506
> 507 irqreturn_t lan8814_handle_interrupt(struct phy_device *phydev)
508 {
509 int irq_status;
510
511 irq_status = lan8814_read_page_reg(phydev, 4, LAN8814_INTR_STS_REG);
512 if (irq_status < 0)
513 return IRQ_NONE;
514
515 if (irq_status & LAN8814_INTR_STS_REG_1588_TSU0)
516 return lan8814_handle_ptp_interrupt(phydev);
517
518 irq_status = phy_read(phydev, LAN8814_INTS);
519 if (irq_status < 0)
520 return IRQ_NONE;
521
522 if (irq_status & LAN8814_INTS_ALL)
523 phy_mac_interrupt(phydev);
524
525 return IRQ_HANDLED;
526 }
527
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
1 year, 9 months
Re: [PATCH v1 net-next] net: phy: mchp: Add 1588 support for LAN8814 Quad PHY
by kernel test robot
Hi Divya,
Thank you for the patch! Perhaps something to improve:
[auto build test WARNING on net-next/master]
url: https://github.com/0day-ci/linux/commits/Divya-Koppera/net-phy-mchp-Add-1...
base: https://git.kernel.org/pub/scm/linux/kernel/git/davem/net-next.git 13458ffe0a953e17587f172a8e5059c243e6850a
config: microblaze-randconfig-r006-20201214 (attached as .config)
compiler: microblaze-linux-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
# https://github.com/0day-ci/linux/commit/d3b83e2903ca90bd2652d828d0e33f0d5...
git remote add linux-review https://github.com/0day-ci/linux
git fetch --no-tags linux-review Divya-Koppera/net-phy-mchp-Add-1588-support-for-LAN8814-Quad-PHY/20201214-205209
git checkout d3b83e2903ca90bd2652d828d0e33f0d5559757a
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-9.3.0 make.cross ARCH=microblaze
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp(a)intel.com>
All warnings (new ones prefixed by >>):
drivers/net/phy/micrel.c: In function 'lan8814_dequeue_skb':
>> drivers/net/phy/micrel.c:429:11: warning: variable 'rc' set but not used [-Wunused-but-set-variable]
429 | int len, rc;
| ^~
drivers/net/phy/micrel.c: At top level:
>> drivers/net/phy/micrel.c:492:13: warning: no previous prototype for 'lan8814_handle_ptp_interrupt' [-Wmissing-prototypes]
492 | irqreturn_t lan8814_handle_ptp_interrupt(struct phy_device *phydev)
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
>> drivers/net/phy/micrel.c:507:13: warning: no previous prototype for 'lan8814_handle_interrupt' [-Wmissing-prototypes]
507 | irqreturn_t lan8814_handle_interrupt(struct phy_device *phydev)
| ^~~~~~~~~~~~~~~~~~~~~~~~
drivers/net/phy/micrel.c: In function 'lan8814_ptp_clock_step':
>> drivers/net/phy/micrel.c:1911:8: warning: variable 'adjustment_value_lo' set but not used [-Wunused-but-set-variable]
1911 | u16 adjustment_value_lo, adjustment_value_hi;
| ^~~~~~~~~~~~~~~~~~~
drivers/net/phy/micrel.c:1926:8: warning: variable 'adjustment_value_lo' set but not used [-Wunused-but-set-variable]
1926 | u16 adjustment_value_lo, adjustment_value_hi;
| ^~~~~~~~~~~~~~~~~~~
drivers/net/phy/micrel.c: In function 'lan8814_txtstamp':
>> drivers/net/phy/micrel.c:1750:6: warning: this statement may fall through [-Wimplicit-fallthrough=]
1750 | if (is_sync(skb, type)) {
| ^
drivers/net/phy/micrel.c:1754:2: note: here
1754 | case HWTSTAMP_TX_ON:
| ^~~~
vim +/rc +429 drivers/net/phy/micrel.c
421
422 static void lan8814_dequeue_skb(struct lan8814_ptp *ptp)
423 {
424 struct lan8814_priv *priv = container_of(ptp, struct lan8814_priv, ptp);
425 struct phy_device *phydev = priv->phydev;
426 struct skb_shared_hwtstamps shhwtstamps;
427 struct sk_buff *skb;
428 u8 skb_sig[16];
> 429 int len, rc;
430 u32 reg, cnt;
431 u32 seconds, nsec, seq_id;
432
433 reg = lan8814_read_page_reg(phydev, 5, PTP_CAP_INFO);
434 cnt = PTP_CAP_INFO_TX_TS_CNT_GET_(reg);
435
436 /* FIFO is Empty*/
437 if (cnt == 0)
438 return;
439
440 len = skb_queue_len(&ptp->tx_queue);
441 if (len < 1)
442 return;
443
444 while (len--) {
445 skb = __skb_dequeue(&ptp->tx_queue);
446 if (!skb)
447 return;
448
449 /* Can't get the signature of the packet, won't ever
450 * be able to have one so let's dequeue the packet.
451 */
452 if (get_sig(skb, skb_sig) < 0) {
453 kfree_skb(skb);
454 continue;
455 }
456
457 lan8814_ptp_tx_ts_get(phydev, &seconds, &nsec, &seq_id);
458
459 rc = memcmp(skb_sig, &seq_id, sizeof(skb_sig));
460
461 /* Check if we found the signature we were looking for. */
462 if (memcmp(skb_sig, &seq_id, sizeof(skb_sig))) {
463 memset(&shhwtstamps, 0, sizeof(shhwtstamps));
464 shhwtstamps.hwtstamp = ktime_set(seconds, nsec);
465 skb_complete_tx_timestamp(skb, &shhwtstamps);
466
467 return;
468 }
469
470 /* Valid signature but does not match the one of the
471 * packet in the FIFO right now, reschedule it for later
472 * packets.
473 */
474 __skb_queue_tail(&ptp->tx_queue, skb);
475 }
476 }
477
478 static void lan8814_get_tx_ts(struct lan8814_ptp *ptp)
479 {
480 u32 reg;
481 struct lan8814_priv *priv = container_of(ptp, struct lan8814_priv, ptp);
482 struct phy_device *phydev = priv->phydev;
483
484 do {
485 lan8814_dequeue_skb(ptp);
486
487 /* If other timestamps are available in the FIFO, process them. */
488 reg = lan8814_read_page_reg(phydev, 5, PTP_CAP_INFO);
489 } while (PTP_CAP_INFO_TX_TS_CNT_GET_(reg) > 1);
490 }
491
> 492 irqreturn_t lan8814_handle_ptp_interrupt(struct phy_device *phydev)
493 {
494 struct lan8814_priv *lan8814 = phydev->priv;
495 int rc;
496
497 rc = lan8814_read_page_reg(phydev, 5, PTP_TSU_INT_STS);
498
499 if (!(rc & PTP_TSU_INT_STS_PTP_TX_TS_EN))
500 return IRQ_NONE;
501
502 lan8814_get_tx_ts(&lan8814->ptp);
503
504 return IRQ_HANDLED;
505 }
506
> 507 irqreturn_t lan8814_handle_interrupt(struct phy_device *phydev)
508 {
509 int irq_status;
510
511 irq_status = lan8814_read_page_reg(phydev, 4, LAN8814_INTR_STS_REG);
512 if (irq_status < 0)
513 return IRQ_NONE;
514
515 if (irq_status & LAN8814_INTR_STS_REG_1588_TSU0)
516 return lan8814_handle_ptp_interrupt(phydev);
517
518 irq_status = phy_read(phydev, LAN8814_INTS);
519 if (irq_status < 0)
520 return IRQ_NONE;
521
522 if (irq_status & LAN8814_INTS_ALL)
523 phy_mac_interrupt(phydev);
524
525 return IRQ_HANDLED;
526 }
527
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
1 year, 9 months
[efi:next 13/15] drivers/net/ethernet/apm/xgene/xgene_enet_main.c:2071:42: warning: shift count >= width of type
by kernel test robot
tree: https://git.kernel.org/pub/scm/linux/kernel/git/efi/efi.git next
head: 172a289d21a309d2d56b44d4a07a129cb1173b92
commit: b640807322bb7dd7bd2a5462e5cb142bc0bb2c06 [13/15] efi: ia64: disable the capsule loader
config: x86_64-randconfig-a003-20201214 (attached as .config)
compiler: clang version 12.0.0 (https://github.com/llvm/llvm-project d38205144febf4dc42c9270c6aa3d978f1ef65e1)
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
# install x86_64 cross compiling tool for clang build
# apt-get install binutils-x86-64-linux-gnu
# https://git.kernel.org/pub/scm/linux/kernel/git/efi/efi.git/commit/?id=b6...
git remote add efi https://git.kernel.org/pub/scm/linux/kernel/git/efi/efi.git
git fetch --no-tags efi next
git checkout b640807322bb7dd7bd2a5462e5cb142bc0bb2c06
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross ARCH=x86_64
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp(a)intel.com>
All warnings (new ones prefixed by >>):
In file included from drivers/net/ethernet/apm/xgene/xgene_enet_main.c:11:
In file included from drivers/net/ethernet/apm/xgene/xgene_enet_main.h:15:
include/linux/efi.h:1050:20: error: redefinition of 'efi_capsule_pending'
static inline bool efi_capsule_pending(int *reset_type) { return false; }
^
include/linux/efi.h:821:1: note: previous definition is here
efi_capsule_pending(int *reset_type)
^
drivers/net/ethernet/apm/xgene/xgene_enet_main.c:2042:20: warning: cast to smaller integer type 'enum xgene_enet_id' from 'const void *' [-Wvoid-pointer-to-enum-cast]
pdata->enet_id = (enum xgene_enet_id)of_id->data;
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
>> drivers/net/ethernet/apm/xgene/xgene_enet_main.c:2071:42: warning: shift count >= width of type [-Wshift-count-overflow]
ret = dma_coerce_mask_and_coherent(dev, DMA_BIT_MASK(64));
^~~~~~~~~~~~~~~~
include/linux/dma-mapping.h:76:54: note: expanded from macro 'DMA_BIT_MASK'
#define DMA_BIT_MASK(n) (((n) == 64) ? ~0ULL : ((1ULL<<(n))-1))
^ ~~~
2 warnings and 1 error generated.
--
In file included from drivers/net/ethernet/apm/xgene-v2/main.c:10:
In file included from drivers/net/ethernet/apm/xgene-v2/main.h:15:
include/linux/efi.h:1050:20: error: redefinition of 'efi_capsule_pending'
static inline bool efi_capsule_pending(int *reset_type) { return false; }
^
include/linux/efi.h:821:1: note: previous definition is here
efi_capsule_pending(int *reset_type)
^
>> drivers/net/ethernet/apm/xgene-v2/main.c:661:42: warning: shift count >= width of type [-Wshift-count-overflow]
ret = dma_coerce_mask_and_coherent(dev, DMA_BIT_MASK(64));
^~~~~~~~~~~~~~~~
include/linux/dma-mapping.h:76:54: note: expanded from macro 'DMA_BIT_MASK'
#define DMA_BIT_MASK(n) (((n) == 64) ? ~0ULL : ((1ULL<<(n))-1))
^ ~~~
1 warning and 1 error generated.
vim +2071 drivers/net/ethernet/apm/xgene/xgene_enet_main.c
1f3d62090d3ba4d Arnd Bergmann 2017-02-01 2012
e6ad767305eb6ea Iyappan Subramanian 2014-08-07 2013 static int xgene_enet_probe(struct platform_device *pdev)
e6ad767305eb6ea Iyappan Subramanian 2014-08-07 2014 {
e6ad767305eb6ea Iyappan Subramanian 2014-08-07 2015 struct net_device *ndev;
e6ad767305eb6ea Iyappan Subramanian 2014-08-07 2016 struct xgene_enet_pdata *pdata;
e6ad767305eb6ea Iyappan Subramanian 2014-08-07 2017 struct device *dev = &pdev->dev;
8089a96f601bdfe Iyappan Subramanian 2016-07-25 2018 void (*link_state)(struct work_struct *);
bc1b7c132a09d84 Iyappan Subramanian 2015-04-28 2019 const struct of_device_id *of_id;
e6ad767305eb6ea Iyappan Subramanian 2014-08-07 2020 int ret;
e6ad767305eb6ea Iyappan Subramanian 2014-08-07 2021
107dec2749fed1b Iyappan Subramanian 2016-02-17 2022 ndev = alloc_etherdev_mqs(sizeof(struct xgene_enet_pdata),
5a44c71ccda60a5 Christophe JAILLET 2020-01-26 2023 XGENE_NUM_TX_RING, XGENE_NUM_RX_RING);
e6ad767305eb6ea Iyappan Subramanian 2014-08-07 2024 if (!ndev)
e6ad767305eb6ea Iyappan Subramanian 2014-08-07 2025 return -ENOMEM;
e6ad767305eb6ea Iyappan Subramanian 2014-08-07 2026
e6ad767305eb6ea Iyappan Subramanian 2014-08-07 2027 pdata = netdev_priv(ndev);
e6ad767305eb6ea Iyappan Subramanian 2014-08-07 2028
e6ad767305eb6ea Iyappan Subramanian 2014-08-07 2029 pdata->pdev = pdev;
e6ad767305eb6ea Iyappan Subramanian 2014-08-07 2030 pdata->ndev = ndev;
e6ad767305eb6ea Iyappan Subramanian 2014-08-07 2031 SET_NETDEV_DEV(ndev, dev);
e6ad767305eb6ea Iyappan Subramanian 2014-08-07 2032 platform_set_drvdata(pdev, pdata);
e6ad767305eb6ea Iyappan Subramanian 2014-08-07 2033 ndev->netdev_ops = &xgene_ndev_ops;
e6ad767305eb6ea Iyappan Subramanian 2014-08-07 2034 xgene_enet_set_ethtool_ops(ndev);
e6ad767305eb6ea Iyappan Subramanian 2014-08-07 2035 ndev->features |= NETIF_F_IP_CSUM |
e6ad767305eb6ea Iyappan Subramanian 2014-08-07 2036 NETIF_F_GSO |
9b00eb494dc7c19 Iyappan Subramanian 2015-08-26 2037 NETIF_F_GRO |
9b00eb494dc7c19 Iyappan Subramanian 2015-08-26 2038 NETIF_F_SG;
e6ad767305eb6ea Iyappan Subramanian 2014-08-07 2039
bc1b7c132a09d84 Iyappan Subramanian 2015-04-28 2040 of_id = of_match_device(xgene_enet_of_match, &pdev->dev);
bc1b7c132a09d84 Iyappan Subramanian 2015-04-28 2041 if (of_id) {
bc1b7c132a09d84 Iyappan Subramanian 2015-04-28 2042 pdata->enet_id = (enum xgene_enet_id)of_id->data;
0738c54d63249bd Suman Tripathi 2015-06-23 2043 }
0738c54d63249bd Suman Tripathi 2015-06-23 2044 #ifdef CONFIG_ACPI
0738c54d63249bd Suman Tripathi 2015-06-23 2045 else {
0738c54d63249bd Suman Tripathi 2015-06-23 2046 const struct acpi_device_id *acpi_id;
0738c54d63249bd Suman Tripathi 2015-06-23 2047
0738c54d63249bd Suman Tripathi 2015-06-23 2048 acpi_id = acpi_match_device(xgene_enet_acpi_match, &pdev->dev);
0738c54d63249bd Suman Tripathi 2015-06-23 2049 if (acpi_id)
0738c54d63249bd Suman Tripathi 2015-06-23 2050 pdata->enet_id = (enum xgene_enet_id) acpi_id->driver_data;
0738c54d63249bd Suman Tripathi 2015-06-23 2051 }
0738c54d63249bd Suman Tripathi 2015-06-23 2052 #endif
bc1b7c132a09d84 Iyappan Subramanian 2015-04-28 2053 if (!pdata->enet_id) {
cecd6e510c65b25 Iyappan Subramanian 2016-08-12 2054 ret = -ENODEV;
cecd6e510c65b25 Iyappan Subramanian 2016-08-12 2055 goto err;
bc1b7c132a09d84 Iyappan Subramanian 2015-04-28 2056 }
bc1b7c132a09d84 Iyappan Subramanian 2015-04-28 2057
e6ad767305eb6ea Iyappan Subramanian 2014-08-07 2058 ret = xgene_enet_get_resources(pdata);
e6ad767305eb6ea Iyappan Subramanian 2014-08-07 2059 if (ret)
e6ad767305eb6ea Iyappan Subramanian 2014-08-07 2060 goto err;
e6ad767305eb6ea Iyappan Subramanian 2014-08-07 2061
d0eb74582fa7b5c Iyappan Subramanian 2014-10-09 2062 xgene_enet_setup_ops(pdata);
ae1aed95d0255aa Iyappan Subramanian 2017-05-10 2063 spin_lock_init(&pdata->mac_lock);
e6ad767305eb6ea Iyappan Subramanian 2014-08-07 2064
9b00eb494dc7c19 Iyappan Subramanian 2015-08-26 2065 if (pdata->phy_mode == PHY_INTERFACE_MODE_XGMII) {
0a0400c3094b5d5 Iyappan Subramanian 2017-03-15 2066 ndev->features |= NETIF_F_TSO | NETIF_F_RXCSUM;
e3978673f514fa4 Iyappan Subramanian 2016-09-22 2067 spin_lock_init(&pdata->mss_lock);
9b00eb494dc7c19 Iyappan Subramanian 2015-08-26 2068 }
9b00eb494dc7c19 Iyappan Subramanian 2015-08-26 2069 ndev->hw_features = ndev->features;
9b00eb494dc7c19 Iyappan Subramanian 2015-08-26 2070
aeb20b6b3f4e1f8 Iyappan Subramanian 2015-11-23 @2071 ret = dma_coerce_mask_and_coherent(dev, DMA_BIT_MASK(64));
e6ad767305eb6ea Iyappan Subramanian 2014-08-07 2072 if (ret) {
aeb20b6b3f4e1f8 Iyappan Subramanian 2015-11-23 2073 netdev_err(ndev, "No usable DMA configuration\n");
e6ad767305eb6ea Iyappan Subramanian 2014-08-07 2074 goto err;
e6ad767305eb6ea Iyappan Subramanian 2014-08-07 2075 }
e6ad767305eb6ea Iyappan Subramanian 2014-08-07 2076
183db4812794375 Quan Nguyen 2017-08-29 2077 xgene_enet_check_phy_handle(pdata);
183db4812794375 Quan Nguyen 2017-08-29 2078
e6ad767305eb6ea Iyappan Subramanian 2014-08-07 2079 ret = xgene_enet_init_hw(pdata);
e6ad767305eb6ea Iyappan Subramanian 2014-08-07 2080 if (ret)
183db4812794375 Quan Nguyen 2017-08-29 2081 goto err2;
e6ad767305eb6ea Iyappan Subramanian 2014-08-07 2082
8089a96f601bdfe Iyappan Subramanian 2016-07-25 2083 link_state = pdata->mac_ops->link_state;
8089a96f601bdfe Iyappan Subramanian 2016-07-25 2084 if (pdata->phy_mode == PHY_INTERFACE_MODE_XGMII) {
8089a96f601bdfe Iyappan Subramanian 2016-07-25 2085 INIT_DELAYED_WORK(&pdata->link_work, link_state);
8089a96f601bdfe Iyappan Subramanian 2016-07-25 2086 } else if (!pdata->mdio_driver) {
326dde3e3b2ed05 Iyappan Subramanian 2017-05-18 2087 if (phy_interface_mode_is_rgmii(pdata->phy_mode))
e6ad767305eb6ea Iyappan Subramanian 2014-08-07 2088 ret = xgene_enet_mdio_config(pdata);
8089a96f601bdfe Iyappan Subramanian 2016-07-25 2089 else
8089a96f601bdfe Iyappan Subramanian 2016-07-25 2090 INIT_DELAYED_WORK(&pdata->link_work, link_state);
cecd6e510c65b25 Iyappan Subramanian 2016-08-12 2091
8089a96f601bdfe Iyappan Subramanian 2016-07-25 2092 if (ret)
cecd6e510c65b25 Iyappan Subramanian 2016-08-12 2093 goto err1;
cecd6e510c65b25 Iyappan Subramanian 2016-08-12 2094 }
e6ad767305eb6ea Iyappan Subramanian 2014-08-07 2095
2d07d8e4f0536e8 Quan Nguyen 2017-05-10 2096 spin_lock_init(&pdata->stats_lock);
2d07d8e4f0536e8 Quan Nguyen 2017-05-10 2097 ret = xgene_extd_stats_init(pdata);
2d07d8e4f0536e8 Quan Nguyen 2017-05-10 2098 if (ret)
183db4812794375 Quan Nguyen 2017-08-29 2099 goto err1;
2d07d8e4f0536e8 Quan Nguyen 2017-05-10 2100
aeb20b6b3f4e1f8 Iyappan Subramanian 2015-11-23 2101 xgene_enet_napi_add(pdata);
cb0366b7c16427a Iyappan Subramanian 2016-07-25 2102 ret = register_netdev(ndev);
cb0366b7c16427a Iyappan Subramanian 2016-07-25 2103 if (ret) {
cb0366b7c16427a Iyappan Subramanian 2016-07-25 2104 netdev_err(ndev, "Failed to register netdev\n");
183db4812794375 Quan Nguyen 2017-08-29 2105 goto err1;
cb0366b7c16427a Iyappan Subramanian 2016-07-25 2106 }
cb0366b7c16427a Iyappan Subramanian 2016-07-25 2107
aeb20b6b3f4e1f8 Iyappan Subramanian 2015-11-23 2108 return 0;
cb0366b7c16427a Iyappan Subramanian 2016-07-25 2109
183db4812794375 Quan Nguyen 2017-08-29 2110 err1:
cecd6e510c65b25 Iyappan Subramanian 2016-08-12 2111 /*
cecd6e510c65b25 Iyappan Subramanian 2016-08-12 2112 * If necessary, free_netdev() will call netif_napi_del() and undo
cecd6e510c65b25 Iyappan Subramanian 2016-08-12 2113 * the effects of xgene_enet_napi_add()'s calls to netif_napi_add().
cecd6e510c65b25 Iyappan Subramanian 2016-08-12 2114 */
cecd6e510c65b25 Iyappan Subramanian 2016-08-12 2115
183db4812794375 Quan Nguyen 2017-08-29 2116 xgene_enet_delete_desc_rings(pdata);
183db4812794375 Quan Nguyen 2017-08-29 2117
183db4812794375 Quan Nguyen 2017-08-29 2118 err2:
cecd6e510c65b25 Iyappan Subramanian 2016-08-12 2119 if (pdata->mdio_driver)
cecd6e510c65b25 Iyappan Subramanian 2016-08-12 2120 xgene_enet_phy_disconnect(pdata);
326dde3e3b2ed05 Iyappan Subramanian 2017-05-18 2121 else if (phy_interface_mode_is_rgmii(pdata->phy_mode))
cecd6e510c65b25 Iyappan Subramanian 2016-08-12 2122 xgene_enet_mdio_remove(pdata);
20decb7e486d7ee Matthias Brugger 2016-05-03 2123 err:
e6ad767305eb6ea Iyappan Subramanian 2014-08-07 2124 free_netdev(ndev);
e6ad767305eb6ea Iyappan Subramanian 2014-08-07 2125 return ret;
e6ad767305eb6ea Iyappan Subramanian 2014-08-07 2126 }
e6ad767305eb6ea Iyappan Subramanian 2014-08-07 2127
:::::: The code at line 2071 was first introduced by commit
:::::: aeb20b6b3f4e1f88ce6a2802dabc667b607412ef drivers: net: xgene: fix: ifconfig up/down crash
:::::: TO: Iyappan Subramanian <isubramanian(a)apm.com>
:::::: CC: David S. Miller <davem(a)davemloft.net>
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
1 year, 9 months
[microchip-ung-linux-upstream:v5.10-webstax 65/88] drivers/uio/uio_vcfw.c:65:38: warning: cast to pointer from integer of different size
by kernel test robot
tree: https://github.com/microchip-ung/linux-upstream.git v5.10-webstax
head: 0c603c93d534e71ceee9485bfe1b0b75561efb0e
commit: b3739b5edd2763486c9791e8f25ba40b1f8b3423 [65/88] uio: vcoreiii: Add MSCC vcoreiii UIO drivers
config: arc-allyesconfig (attached as .config)
compiler: arceb-elf-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
# https://github.com/microchip-ung/linux-upstream/commit/b3739b5edd2763486c...
git remote add microchip-ung-linux-upstream https://github.com/microchip-ung/linux-upstream.git
git fetch --no-tags microchip-ung-linux-upstream v5.10-webstax
git checkout b3739b5edd2763486c9791e8f25ba40b1f8b3423
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-9.3.0 make.cross ARCH=arc
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp(a)intel.com>
All warnings (new ones prefixed by >>):
drivers/uio/uio_vcfw.c:26:34: error: array type has incomplete element type 'struct of_device_id'
26 | static const struct of_device_id vcfw_match[] = {
| ^~~~~~~~~~
drivers/uio/uio_vcfw.c:27:4: error: field name not in record or union initializer
27 | { .compatible = "mscc,vcfw_uio", },
| ^
drivers/uio/uio_vcfw.c:27:4: note: (near initialization for 'vcfw_match')
drivers/uio/uio_vcfw.c: In function 'vcfw_probe':
>> drivers/uio/uio_vcfw.c:65:38: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
65 | info->mem[0].internal_addr = (void *)regs_vcfwio->start;
| ^
drivers/uio/uio_vcfw.c:66:42: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
66 | info->mem[0].addr = virt_to_phys((void *)regs_vcfwio->start);
| ^
drivers/uio/uio_vcfw.c: At top level:
drivers/uio/uio_vcfw.c:100:25: error: implicit declaration of function 'of_match_ptr' [-Werror=implicit-function-declaration]
100 | .of_match_table = of_match_ptr(vcfw_match),
| ^~~~~~~~~~~~
drivers/uio/uio_vcfw.c:26:34: warning: 'vcfw_match' defined but not used [-Wunused-variable]
26 | static const struct of_device_id vcfw_match[] = {
| ^~~~~~~~~~
cc1: some warnings being treated as errors
vim +65 drivers/uio/uio_vcfw.c
43
44 static int vcfw_probe(struct platform_device *dev)
45 {
46 struct uio_info *info;
47 struct resource *regs_vcfwio;
48 int ret = -ENODEV;
49
50 info = kzalloc(sizeof(struct uio_info), GFP_KERNEL);
51 if (!info)
52 return -ENOMEM;
53
54 regs_vcfwio = platform_get_resource(dev, IORESOURCE_MEM, 0);
55 if (!regs_vcfwio) {
56 dev_info(&dev->dev, "No firmware I/O resource specified, not registering\n");
57 goto out_free;
58 }
59
60 if (!regs_vcfwio->start) {
61 dev_info(&dev->dev, "Null memory resource, not registering\n");
62 goto out_free;
63 }
64
> 65 info->mem[0].internal_addr = (void *)regs_vcfwio->start;
66 info->mem[0].addr = virt_to_phys((void *)regs_vcfwio->start);
67 info->mem[0].size = resource_size(regs_vcfwio);
68 info->mem[0].memtype = UIO_MEM_PHYS;
69
70 info->name = DRV_NAME;
71 info->version = DRV_VERSION;
72
73 ret = uio_register_device(&dev->dev, info);
74 if (ret < 0)
75 goto out_free;
76
77 platform_set_drvdata(dev, info);
78 dev_info(&dev->dev, "UIO map: %pR\n", regs_vcfwio);
79 return 0;
80
81 out_free:
82 vcfw_cleanup(dev, info);
83 return ret;
84 }
85
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
1 year, 9 months