[arm-platforms:irq/domain_cleanup 30/39] drivers/pci/controller/pci-tegra.c:1559:8: warning: variable 'ret' is uninitialized when used here
by kernel test robot
tree: https://git.kernel.org/pub/scm/linux/kernel/git/maz/arm-platforms.git irq/domain_cleanup
head: 0175d864077c1900b27ffb2d1aff4f736548e711
commit: 7c8327614b2e21be95b1a486f93d907aed885557 [30/39] PCI: Bulk conversion to generic_handle_domain_irq()
config: arm64-randconfig-r004-20210517 (attached as .config)
compiler: clang version 13.0.0 (https://github.com/llvm/llvm-project 0a34ff8bcb1df16fe7d643ccbe4567b2162c5024)
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 arm64 cross compiling tool for clang build
# apt-get install binutils-aarch64-linux-gnu
# https://git.kernel.org/pub/scm/linux/kernel/git/maz/arm-platforms.git/com...
git remote add arm-platforms https://git.kernel.org/pub/scm/linux/kernel/git/maz/arm-platforms.git
git fetch --no-tags arm-platforms irq/domain_cleanup
git checkout 7c8327614b2e21be95b1a486f93d907aed885557
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross W=1 ARCH=arm64
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/pci/controller/pci-tegra.c:1559:8: warning: variable 'ret' is uninitialized when used here [-Wuninitialized]
if (ret) {
^~~
drivers/pci/controller/pci-tegra.c:1556:11: note: initialize the variable 'ret' to silence this warning
int ret;
^
= 0
1 warning generated.
vim +/ret +1559 drivers/pci/controller/pci-tegra.c
1539
1540 static void tegra_pcie_msi_irq(struct irq_desc *desc)
1541 {
1542 struct tegra_pcie *pcie = irq_desc_get_handler_data(desc);
1543 struct irq_chip *chip = irq_desc_get_chip(desc);
1544 struct tegra_msi *msi = &pcie->msi;
1545 struct device *dev = pcie->dev;
1546 unsigned int i;
1547
1548 chained_irq_enter(chip, desc);
1549
1550 for (i = 0; i < 8; i++) {
1551 unsigned long reg = afi_readl(pcie, AFI_MSI_VEC(i));
1552
1553 while (reg) {
1554 unsigned int offset = find_first_bit(®, 32);
1555 unsigned int index = i * 32 + offset;
1556 int ret;
1557
1558 generic_handle_domain_irq(msi->domain->parent, index);
> 1559 if (ret) {
1560 /*
1561 * that's weird who triggered this?
1562 * just clear it
1563 */
1564 dev_info(dev, "unexpected MSI\n");
1565 afi_writel(pcie, BIT(index % 32), AFI_MSI_VEC(index));
1566 }
1567
1568 /* see if there's any more pending in this vector */
1569 reg = afi_readl(pcie, AFI_MSI_VEC(i));
1570 }
1571 }
1572
1573 chained_irq_exit(chip, desc);
1574 }
1575
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
1 year, 4 months
[linux-next:master 3032/3150] mm/huge_memory.c:2345:7: warning: variable 'unmap_success' set but not used
by kernel test robot
tree: https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git master
head: cd557f1c605fc5a2c0eb0b540610f50dc67dd849
commit: 69cc52577e67f437b4faaa2024faa279fabd2904 [3032/3150] mm: thp: check total_mapcount instead of page_mapcount
config: i386-randconfig-r006-20210517 (attached as .config)
compiler: gcc-9 (Debian 9.3.0-22) 9.3.0
reproduce (this is a W=1 build):
# https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git/commi...
git remote add linux-next https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git
git fetch --no-tags linux-next master
git checkout 69cc52577e67f437b4faaa2024faa279fabd2904
# save the attached .config to linux build tree
make W=1 W=1 ARCH=i386
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 >>):
mm/huge_memory.c: In function 'unmap_page':
>> mm/huge_memory.c:2345:7: warning: variable 'unmap_success' set but not used [-Wunused-but-set-variable]
2345 | bool unmap_success;
| ^~~~~~~~~~~~~
mm/huge_memory.c: In function 'split_huge_page_to_list':
>> mm/huge_memory.c:2663:6: warning: variable 'count' set but not used [-Wunused-but-set-variable]
2663 | int count, mapcount, extra_pins, ret;
| ^~~~~
vim +/unmap_success +2345 mm/huge_memory.c
e9b61f19858a5d Kirill A. Shutemov 2016-01-15 2340
906f9cdfc2a080 Hugh Dickins 2018-11-30 2341 static void unmap_page(struct page *page)
e9b61f19858a5d Kirill A. Shutemov 2016-01-15 2342 {
013339df116c2e Shakeel Butt 2020-12-14 2343 enum ttu_flags ttu_flags = TTU_IGNORE_MLOCK |
c7ab0d2fdc8402 Kirill A. Shutemov 2017-02-24 2344 TTU_RMAP_LOCKED | TTU_SPLIT_HUGE_PMD;
666e5a406c3ed5 Minchan Kim 2017-05-03 @2345 bool unmap_success;
e9b61f19858a5d Kirill A. Shutemov 2016-01-15 2346
e9b61f19858a5d Kirill A. Shutemov 2016-01-15 2347 VM_BUG_ON_PAGE(!PageHead(page), page);
e9b61f19858a5d Kirill A. Shutemov 2016-01-15 2348
baa355fd331424 Kirill A. Shutemov 2016-07-26 2349 if (PageAnon(page))
b5ff8161e37cef Naoya Horiguchi 2017-09-08 2350 ttu_flags |= TTU_SPLIT_FREEZE;
baa355fd331424 Kirill A. Shutemov 2016-07-26 2351
666e5a406c3ed5 Minchan Kim 2017-05-03 2352 unmap_success = try_to_unmap(page, ttu_flags);
e9b61f19858a5d Kirill A. Shutemov 2016-01-15 2353 }
e9b61f19858a5d Kirill A. Shutemov 2016-01-15 2354
:::::: The code at line 2345 was first introduced by commit
:::::: 666e5a406c3ed562e7b3ceff8b631b6067bdaead mm: make ttu's return boolean
:::::: TO: Minchan Kim <minchan(a)kernel.org>
:::::: CC: Linus Torvalds <torvalds(a)linux-foundation.org>
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
1 year, 4 months
[arm-integrator:kernel-in-vmalloc-v5.13-rc1 2/8] arch/arm/mm/init.c:296:13: warning: no previous prototype for function 'mem_init_print_arm_info'
by kernel test robot
tree: https://git.kernel.org/pub/scm/linux/kernel/git/linusw/linux-integrator.git kernel-in-vmalloc-v5.13-rc1
head: 7e5485b7d61fc97a247dc26f4888293aab05136b
commit: e6cd53886e36cf1bef7e3a060a61805d156dabc9 [2/8] ARM: Print virtual memory info again
config: arm-randconfig-r012-20210517 (attached as .config)
compiler: clang version 13.0.0 (https://github.com/llvm/llvm-project 0a34ff8bcb1df16fe7d643ccbe4567b2162c5024)
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 arm cross compiling tool for clang build
# apt-get install binutils-arm-linux-gnueabi
# https://git.kernel.org/pub/scm/linux/kernel/git/linusw/linux-integrator.g...
git remote add arm-integrator https://git.kernel.org/pub/scm/linux/kernel/git/linusw/linux-integrator.git
git fetch --no-tags arm-integrator kernel-in-vmalloc-v5.13-rc1
git checkout e6cd53886e36cf1bef7e3a060a61805d156dabc9
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross W=1 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 >>):
arch/arm/mm/init.c:97:13: warning: no previous prototype for function 'setup_dma_zone' [-Wmissing-prototypes]
void __init setup_dma_zone(const struct machine_desc *mdesc)
^
arch/arm/mm/init.c:97:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
void __init setup_dma_zone(const struct machine_desc *mdesc)
^
static
>> arch/arm/mm/init.c:296:13: warning: no previous prototype for function 'mem_init_print_arm_info' [-Wmissing-prototypes]
void __init mem_init_print_arm_info(void)
^
arch/arm/mm/init.c:296:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
void __init mem_init_print_arm_info(void)
^
static
2 warnings generated.
vim +/mem_init_print_arm_info +296 arch/arm/mm/init.c
295
> 296 void __init mem_init_print_arm_info(void)
297 {
298 #define MLM(b, t) b, t, ((t) - (b)) >> 20
299 pr_notice("Virtual kernel memory layout:\n"
300 " fixmap : 0x%08lx - 0x%08lx (%4ld MB)\n"
301 " vmalloc : 0x%08lx - 0x%08lx (%4ld MB)\n"
302 " lowmem : 0x%08lx - 0x%08lx (%4ld MB)\n"
303 #ifdef CONFIG_MODULES
304 " modules : 0x%08lx - 0x%08lx (%4ld MB)\n",
305 #endif
306 " kernel : 0x%08lx - 0x%08lx (%4ld MB)\n",
307 MLM(FIXADDR_START, FIXADDR_END),
308 MLM(VMALLOC_START, VMALLOC_END),
309 MLM(PAGE_OFFSET, (unsigned long)high_memory),
310 #ifdef CONFIG_MODULES
311 MLM(MODULES_VADDR, MODULES_END),
312 #endif
313 /* From beginning of .text to end of .bss */
314 MLM((unsigned long)_text, (unsigned long)__bss_stop));
315 #undef MLM
316 }
317
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
1 year, 4 months
drivers/pci/controller/pci-xgene.c:511:33: sparse: sparse: incorrect type in argument 2 (different address spaces)
by kernel test robot
tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head: d07f6ca923ea0927a1024dfccafc5b53b61cfecc
commit: 6e5a1fff9096ecd259dedcbbdc812aa90986a40e PCI: Avoid building empty drivers
date: 10 weeks ago
config: mips-randconfig-s032-20210517 (attached as .config)
compiler: mipsel-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-341-g8af24329-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 6e5a1fff9096ecd259dedcbbdc812aa90986a40e
# 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__' W=1 ARCH=mips
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 >>)
command-line: note: in included file:
builtin:1:9: sparse: sparse: preprocessor token __ATOMIC_ACQUIRE redefined
builtin:0:0: sparse: this was the original definition
builtin:1:9: sparse: sparse: preprocessor token __ATOMIC_SEQ_CST redefined
builtin:0:0: sparse: this was the original definition
builtin:1:9: sparse: sparse: preprocessor token __ATOMIC_ACQ_REL redefined
builtin:0:0: sparse: this was the original definition
builtin:1:9: sparse: sparse: preprocessor token __ATOMIC_RELEASE redefined
builtin:0:0: sparse: this was the original definition
drivers/pci/controller/pci-xgene.c:510:26: sparse: sparse: incorrect type in assignment (different address spaces) @@ expected void *bar_addr @@ got void [noderef] __iomem * @@
drivers/pci/controller/pci-xgene.c:510:26: sparse: expected void *bar_addr
drivers/pci/controller/pci-xgene.c:510:26: sparse: got void [noderef] __iomem *
>> drivers/pci/controller/pci-xgene.c:511:33: sparse: sparse: incorrect type in argument 2 (different address spaces) @@ expected void volatile [noderef] __iomem *mem @@ got void *bar_addr @@
drivers/pci/controller/pci-xgene.c:511:33: sparse: expected void volatile [noderef] __iomem *mem
drivers/pci/controller/pci-xgene.c:511:33: sparse: got void *bar_addr
>> drivers/pci/controller/pci-xgene.c:512:58: sparse: sparse: incorrect type in argument 2 (different address spaces) @@ expected void volatile [noderef] __iomem *mem @@ got void * @@
drivers/pci/controller/pci-xgene.c:512:58: sparse: expected void volatile [noderef] __iomem *mem
drivers/pci/controller/pci-xgene.c:512:58: sparse: got void *
vim +511 drivers/pci/controller/pci-xgene.c
5f6b6ccdbe1cdf drivers/pci/host/pci-xgene.c Tanmay Inamdar 2014-10-01 480
5f6b6ccdbe1cdf drivers/pci/host/pci-xgene.c Tanmay Inamdar 2014-10-01 481 static void xgene_pcie_setup_ib_reg(struct xgene_pcie_port *port,
6dce5aa59e0bf2 drivers/pci/controller/pci-xgene.c Rob Herring 2019-10-28 482 struct resource_entry *entry,
6dce5aa59e0bf2 drivers/pci/controller/pci-xgene.c Rob Herring 2019-10-28 483 u8 *ib_reg_mask)
5f6b6ccdbe1cdf drivers/pci/host/pci-xgene.c Tanmay Inamdar 2014-10-01 484 {
5f6b6ccdbe1cdf drivers/pci/host/pci-xgene.c Tanmay Inamdar 2014-10-01 485 void __iomem *cfg_base = port->cfg_base;
d963ab22ad32da drivers/pci/host/pci-xgene.c Bjorn Helgaas 2016-10-06 486 struct device *dev = port->dev;
5f6b6ccdbe1cdf drivers/pci/host/pci-xgene.c Tanmay Inamdar 2014-10-01 487 void *bar_addr;
4ecf6b0f83523f drivers/pci/host/pci-xgene.c Bjorn Helgaas 2016-10-06 488 u32 pim_reg;
6dce5aa59e0bf2 drivers/pci/controller/pci-xgene.c Rob Herring 2019-10-28 489 u64 cpu_addr = entry->res->start;
6dce5aa59e0bf2 drivers/pci/controller/pci-xgene.c Rob Herring 2019-10-28 490 u64 pci_addr = cpu_addr - entry->offset;
6dce5aa59e0bf2 drivers/pci/controller/pci-xgene.c Rob Herring 2019-10-28 491 u64 size = resource_size(entry->res);
5f6b6ccdbe1cdf drivers/pci/host/pci-xgene.c Tanmay Inamdar 2014-10-01 492 u64 mask = ~(size - 1) | EN_REG;
5f6b6ccdbe1cdf drivers/pci/host/pci-xgene.c Tanmay Inamdar 2014-10-01 493 u32 flags = PCI_BASE_ADDRESS_MEM_TYPE_64;
5f6b6ccdbe1cdf drivers/pci/host/pci-xgene.c Tanmay Inamdar 2014-10-01 494 u32 bar_low;
5f6b6ccdbe1cdf drivers/pci/host/pci-xgene.c Tanmay Inamdar 2014-10-01 495 int region;
5f6b6ccdbe1cdf drivers/pci/host/pci-xgene.c Tanmay Inamdar 2014-10-01 496
6dce5aa59e0bf2 drivers/pci/controller/pci-xgene.c Rob Herring 2019-10-28 497 region = xgene_pcie_select_ib_reg(ib_reg_mask, size);
5f6b6ccdbe1cdf drivers/pci/host/pci-xgene.c Tanmay Inamdar 2014-10-01 498 if (region < 0) {
d963ab22ad32da drivers/pci/host/pci-xgene.c Bjorn Helgaas 2016-10-06 499 dev_warn(dev, "invalid pcie dma-range config\n");
5f6b6ccdbe1cdf drivers/pci/host/pci-xgene.c Tanmay Inamdar 2014-10-01 500 return;
5f6b6ccdbe1cdf drivers/pci/host/pci-xgene.c Tanmay Inamdar 2014-10-01 501 }
5f6b6ccdbe1cdf drivers/pci/host/pci-xgene.c Tanmay Inamdar 2014-10-01 502
6dce5aa59e0bf2 drivers/pci/controller/pci-xgene.c Rob Herring 2019-10-28 503 if (entry->res->flags & IORESOURCE_PREFETCH)
5f6b6ccdbe1cdf drivers/pci/host/pci-xgene.c Tanmay Inamdar 2014-10-01 504 flags |= PCI_BASE_ADDRESS_MEM_PREFETCH;
5f6b6ccdbe1cdf drivers/pci/host/pci-xgene.c Tanmay Inamdar 2014-10-01 505
5f6b6ccdbe1cdf drivers/pci/host/pci-xgene.c Tanmay Inamdar 2014-10-01 506 bar_low = pcie_bar_low_val((u32)cpu_addr, flags);
5f6b6ccdbe1cdf drivers/pci/host/pci-xgene.c Tanmay Inamdar 2014-10-01 507 switch (region) {
5f6b6ccdbe1cdf drivers/pci/host/pci-xgene.c Tanmay Inamdar 2014-10-01 508 case 0:
4ecf6b0f83523f drivers/pci/host/pci-xgene.c Bjorn Helgaas 2016-10-06 509 xgene_pcie_set_ib_mask(port, BRIDGE_CFG_4, flags, size);
5f6b6ccdbe1cdf drivers/pci/host/pci-xgene.c Tanmay Inamdar 2014-10-01 510 bar_addr = cfg_base + PCI_BASE_ADDRESS_0;
5f6b6ccdbe1cdf drivers/pci/host/pci-xgene.c Tanmay Inamdar 2014-10-01 @511 writel(bar_low, bar_addr);
5f6b6ccdbe1cdf drivers/pci/host/pci-xgene.c Tanmay Inamdar 2014-10-01 @512 writel(upper_32_bits(cpu_addr), bar_addr + 0x4);
4ecf6b0f83523f drivers/pci/host/pci-xgene.c Bjorn Helgaas 2016-10-06 513 pim_reg = PIM1_1L;
5f6b6ccdbe1cdf drivers/pci/host/pci-xgene.c Tanmay Inamdar 2014-10-01 514 break;
5f6b6ccdbe1cdf drivers/pci/host/pci-xgene.c Tanmay Inamdar 2014-10-01 515 case 1:
8e93c5132ca2e5 drivers/pci/host/pci-xgene.c Bjorn Helgaas 2016-10-06 516 xgene_pcie_writel(port, IBAR2, bar_low);
8e93c5132ca2e5 drivers/pci/host/pci-xgene.c Bjorn Helgaas 2016-10-06 517 xgene_pcie_writel(port, IR2MSK, lower_32_bits(mask));
4ecf6b0f83523f drivers/pci/host/pci-xgene.c Bjorn Helgaas 2016-10-06 518 pim_reg = PIM2_1L;
5f6b6ccdbe1cdf drivers/pci/host/pci-xgene.c Tanmay Inamdar 2014-10-01 519 break;
5f6b6ccdbe1cdf drivers/pci/host/pci-xgene.c Tanmay Inamdar 2014-10-01 520 case 2:
8e93c5132ca2e5 drivers/pci/host/pci-xgene.c Bjorn Helgaas 2016-10-06 521 xgene_pcie_writel(port, IBAR3L, bar_low);
8e93c5132ca2e5 drivers/pci/host/pci-xgene.c Bjorn Helgaas 2016-10-06 522 xgene_pcie_writel(port, IBAR3L + 0x4, upper_32_bits(cpu_addr));
8e93c5132ca2e5 drivers/pci/host/pci-xgene.c Bjorn Helgaas 2016-10-06 523 xgene_pcie_writel(port, IR3MSKL, lower_32_bits(mask));
8e93c5132ca2e5 drivers/pci/host/pci-xgene.c Bjorn Helgaas 2016-10-06 524 xgene_pcie_writel(port, IR3MSKL + 0x4, upper_32_bits(mask));
4ecf6b0f83523f drivers/pci/host/pci-xgene.c Bjorn Helgaas 2016-10-06 525 pim_reg = PIM3_1L;
5f6b6ccdbe1cdf drivers/pci/host/pci-xgene.c Tanmay Inamdar 2014-10-01 526 break;
5f6b6ccdbe1cdf drivers/pci/host/pci-xgene.c Tanmay Inamdar 2014-10-01 527 }
5f6b6ccdbe1cdf drivers/pci/host/pci-xgene.c Tanmay Inamdar 2014-10-01 528
4ecf6b0f83523f drivers/pci/host/pci-xgene.c Bjorn Helgaas 2016-10-06 529 xgene_pcie_setup_pims(port, pim_reg, pci_addr, ~(size - 1));
5f6b6ccdbe1cdf drivers/pci/host/pci-xgene.c Tanmay Inamdar 2014-10-01 530 }
5f6b6ccdbe1cdf drivers/pci/host/pci-xgene.c Tanmay Inamdar 2014-10-01 531
:::::: The code at line 511 was first introduced by commit
:::::: 5f6b6ccdbe1cdfa5aa4347ec5412509b8995db27 PCI: xgene: Add APM X-Gene PCIe driver
:::::: TO: Tanmay Inamdar <tinamdar(a)apm.com>
:::::: CC: Bjorn Helgaas <bhelgaas(a)google.com>
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
1 year, 4 months
[arnd-playground:to-build 31/41] net/ipv6/ip6_tunnel.c:1614: warning: expecting prototype for ip6_tnl_ioctl(). Prototype was for ip6_tnl_siocdevprivate() instead
by kernel test robot
tree: https://git.kernel.org/pub/scm/linux/kernel/git/arnd/playground.git to-build
head: 5fd3eccb73a30251d944935959498ca308848a54
commit: 382f957e43c56b6accc080efa5da678d8067ebf8 [31/41] ip_tunnel: use ndo_siocdevprivate
config: x86_64-randconfig-a003-20210517 (attached as .config)
compiler: clang version 13.0.0 (https://github.com/llvm/llvm-project 0a34ff8bcb1df16fe7d643ccbe4567b2162c5024)
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/arnd/playground.git/commi...
git remote add arnd-playground https://git.kernel.org/pub/scm/linux/kernel/git/arnd/playground.git
git fetch --no-tags arnd-playground to-build
git checkout 382f957e43c56b6accc080efa5da678d8067ebf8
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross 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 >>):
>> net/ipv6/ip6_tunnel.c:1614: warning: expecting prototype for ip6_tnl_ioctl(). Prototype was for ip6_tnl_siocdevprivate() instead
vim +1614 net/ipv6/ip6_tunnel.c
c12b395a46646b xeb(a)mail.ru 2012-08-10 1581
^1da177e4c3f41 Linus Torvalds 2005-04-16 1582 /**
3144581cb0b4b1 Yasuyuki Kozakai 2007-02-10 1583 * ip6_tnl_ioctl - configure ipv6 tunnels from userspace
^1da177e4c3f41 Linus Torvalds 2005-04-16 1584 * @dev: virtual device associated with tunnel
382f957e43c56b Arnd Bergmann 2020-11-05 1585 * @ifr: unused
382f957e43c56b Arnd Bergmann 2020-11-05 1586 * @data: parameters passed from userspace
^1da177e4c3f41 Linus Torvalds 2005-04-16 1587 * @cmd: command to be performed
^1da177e4c3f41 Linus Torvalds 2005-04-16 1588 *
^1da177e4c3f41 Linus Torvalds 2005-04-16 1589 * Description:
3144581cb0b4b1 Yasuyuki Kozakai 2007-02-10 1590 * ip6_tnl_ioctl() is used for managing IPv6 tunnels
^1da177e4c3f41 Linus Torvalds 2005-04-16 1591 * from userspace.
^1da177e4c3f41 Linus Torvalds 2005-04-16 1592 *
^1da177e4c3f41 Linus Torvalds 2005-04-16 1593 * The possible commands are the following:
^1da177e4c3f41 Linus Torvalds 2005-04-16 1594 * %SIOCGETTUNNEL: get tunnel parameters for device
^1da177e4c3f41 Linus Torvalds 2005-04-16 1595 * %SIOCADDTUNNEL: add tunnel matching given tunnel parameters
^1da177e4c3f41 Linus Torvalds 2005-04-16 1596 * %SIOCCHGTUNNEL: change tunnel parameters to those given
^1da177e4c3f41 Linus Torvalds 2005-04-16 1597 * %SIOCDELTUNNEL: delete tunnel
^1da177e4c3f41 Linus Torvalds 2005-04-16 1598 *
^1da177e4c3f41 Linus Torvalds 2005-04-16 1599 * The fallback device "ip6tnl0", created during module
^1da177e4c3f41 Linus Torvalds 2005-04-16 1600 * initialization, can be used for creating other tunnel devices.
^1da177e4c3f41 Linus Torvalds 2005-04-16 1601 *
^1da177e4c3f41 Linus Torvalds 2005-04-16 1602 * Return:
^1da177e4c3f41 Linus Torvalds 2005-04-16 1603 * 0 on success,
^1da177e4c3f41 Linus Torvalds 2005-04-16 1604 * %-EFAULT if unable to copy data to or from userspace,
^1da177e4c3f41 Linus Torvalds 2005-04-16 1605 * %-EPERM if current process hasn't %CAP_NET_ADMIN set
^1da177e4c3f41 Linus Torvalds 2005-04-16 1606 * %-EINVAL if passed tunnel parameters are invalid,
^1da177e4c3f41 Linus Torvalds 2005-04-16 1607 * %-EEXIST if changing a tunnel's parameters would cause a conflict
^1da177e4c3f41 Linus Torvalds 2005-04-16 1608 * %-ENODEV if attempting to change or delete a nonexisting device
^1da177e4c3f41 Linus Torvalds 2005-04-16 1609 **/
^1da177e4c3f41 Linus Torvalds 2005-04-16 1610
^1da177e4c3f41 Linus Torvalds 2005-04-16 1611 static int
382f957e43c56b Arnd Bergmann 2020-11-05 1612 ip6_tnl_siocdevprivate(struct net_device *dev, struct ifreq *ifr,
382f957e43c56b Arnd Bergmann 2020-11-05 1613 void __user *data, int cmd)
^1da177e4c3f41 Linus Torvalds 2005-04-16 @1614 {
^1da177e4c3f41 Linus Torvalds 2005-04-16 1615 int err = 0;
^1da177e4c3f41 Linus Torvalds 2005-04-16 1616 struct ip6_tnl_parm p;
c12b395a46646b xeb(a)mail.ru 2012-08-10 1617 struct __ip6_tnl_parm p1;
74462f0d4a7342 Nicolas Dichtel 2014-04-16 1618 struct ip6_tnl *t = netdev_priv(dev);
74462f0d4a7342 Nicolas Dichtel 2014-04-16 1619 struct net *net = t->net;
2dd02c897d798c Pavel Emelyanov 2008-04-16 1620 struct ip6_tnl_net *ip6n = net_generic(net, ip6_tnl_net_id);
^1da177e4c3f41 Linus Torvalds 2005-04-16 1621
0d3c703a9d1723 Tom Herbert 2016-04-29 1622 memset(&p1, 0, sizeof(p1));
0d3c703a9d1723 Tom Herbert 2016-04-29 1623
^1da177e4c3f41 Linus Torvalds 2005-04-16 1624 switch (cmd) {
^1da177e4c3f41 Linus Torvalds 2005-04-16 1625 case SIOCGETTUNNEL:
15820e129013dd Pavel Emelyanov 2008-04-16 1626 if (dev == ip6n->fb_tnl_dev) {
382f957e43c56b Arnd Bergmann 2020-11-05 1627 if (copy_from_user(&p, data, sizeof(p))) {
^1da177e4c3f41 Linus Torvalds 2005-04-16 1628 err = -EFAULT;
^1da177e4c3f41 Linus Torvalds 2005-04-16 1629 break;
^1da177e4c3f41 Linus Torvalds 2005-04-16 1630 }
c12b395a46646b xeb(a)mail.ru 2012-08-10 1631 ip6_tnl_parm_from_user(&p1, &p);
c12b395a46646b xeb(a)mail.ru 2012-08-10 1632 t = ip6_tnl_locate(net, &p1, 0);
37355565ba57fd Nicolas Dichtel 2015-03-16 1633 if (IS_ERR(t))
74462f0d4a7342 Nicolas Dichtel 2014-04-16 1634 t = netdev_priv(dev);
5ef5d6c569f80c Dan Carpenter 2012-08-16 1635 } else {
5ef5d6c569f80c Dan Carpenter 2012-08-16 1636 memset(&p, 0, sizeof(p));
567131a722ca06 Ville Nuorvala 2006-11-24 1637 }
c12b395a46646b xeb(a)mail.ru 2012-08-10 1638 ip6_tnl_parm_to_user(&p, &t->parms);
382f957e43c56b Arnd Bergmann 2020-11-05 1639 if (copy_to_user(data, &p, sizeof(p)))
^1da177e4c3f41 Linus Torvalds 2005-04-16 1640 err = -EFAULT;
^1da177e4c3f41 Linus Torvalds 2005-04-16 1641 break;
^1da177e4c3f41 Linus Torvalds 2005-04-16 1642 case SIOCADDTUNNEL:
^1da177e4c3f41 Linus Torvalds 2005-04-16 1643 case SIOCCHGTUNNEL:
^1da177e4c3f41 Linus Torvalds 2005-04-16 1644 err = -EPERM;
af31f412c7c7a3 Eric W. Biederman 2012-11-16 1645 if (!ns_capable(net->user_ns, CAP_NET_ADMIN))
^1da177e4c3f41 Linus Torvalds 2005-04-16 1646 break;
^1da177e4c3f41 Linus Torvalds 2005-04-16 1647 err = -EFAULT;
382f957e43c56b Arnd Bergmann 2020-11-05 1648 if (copy_from_user(&p, data, sizeof(p)))
^1da177e4c3f41 Linus Torvalds 2005-04-16 1649 break;
567131a722ca06 Ville Nuorvala 2006-11-24 1650 err = -EINVAL;
502b093569e48d Yasuyuki Kozakai 2006-11-30 1651 if (p.proto != IPPROTO_IPV6 && p.proto != IPPROTO_IPIP &&
502b093569e48d Yasuyuki Kozakai 2006-11-30 1652 p.proto != 0)
^1da177e4c3f41 Linus Torvalds 2005-04-16 1653 break;
c12b395a46646b xeb(a)mail.ru 2012-08-10 1654 ip6_tnl_parm_from_user(&p1, &p);
c12b395a46646b xeb(a)mail.ru 2012-08-10 1655 t = ip6_tnl_locate(net, &p1, cmd == SIOCADDTUNNEL);
acf722f73499d8 Alexey Andriyanov 2014-10-29 1656 if (cmd == SIOCCHGTUNNEL) {
37355565ba57fd Nicolas Dichtel 2015-03-16 1657 if (!IS_ERR(t)) {
^1da177e4c3f41 Linus Torvalds 2005-04-16 1658 if (t->dev != dev) {
^1da177e4c3f41 Linus Torvalds 2005-04-16 1659 err = -EEXIST;
^1da177e4c3f41 Linus Torvalds 2005-04-16 1660 break;
^1da177e4c3f41 Linus Torvalds 2005-04-16 1661 }
567131a722ca06 Ville Nuorvala 2006-11-24 1662 } else
567131a722ca06 Ville Nuorvala 2006-11-24 1663 t = netdev_priv(dev);
acf722f73499d8 Alexey Andriyanov 2014-10-29 1664 if (dev == ip6n->fb_tnl_dev)
acf722f73499d8 Alexey Andriyanov 2014-10-29 1665 err = ip6_tnl0_update(t, &p1);
acf722f73499d8 Alexey Andriyanov 2014-10-29 1666 else
0b112457229d8a Nicolas Dichtel 2012-11-14 1667 err = ip6_tnl_update(t, &p1);
^1da177e4c3f41 Linus Torvalds 2005-04-16 1668 }
37355565ba57fd Nicolas Dichtel 2015-03-16 1669 if (!IS_ERR(t)) {
^1da177e4c3f41 Linus Torvalds 2005-04-16 1670 err = 0;
c12b395a46646b xeb(a)mail.ru 2012-08-10 1671 ip6_tnl_parm_to_user(&p, &t->parms);
382f957e43c56b Arnd Bergmann 2020-11-05 1672 if (copy_to_user(data, &p, sizeof(p)))
567131a722ca06 Ville Nuorvala 2006-11-24 1673 err = -EFAULT;
567131a722ca06 Ville Nuorvala 2006-11-24 1674
37355565ba57fd Nicolas Dichtel 2015-03-16 1675 } else {
37355565ba57fd Nicolas Dichtel 2015-03-16 1676 err = PTR_ERR(t);
37355565ba57fd Nicolas Dichtel 2015-03-16 1677 }
^1da177e4c3f41 Linus Torvalds 2005-04-16 1678 break;
^1da177e4c3f41 Linus Torvalds 2005-04-16 1679 case SIOCDELTUNNEL:
^1da177e4c3f41 Linus Torvalds 2005-04-16 1680 err = -EPERM;
af31f412c7c7a3 Eric W. Biederman 2012-11-16 1681 if (!ns_capable(net->user_ns, CAP_NET_ADMIN))
^1da177e4c3f41 Linus Torvalds 2005-04-16 1682 break;
^1da177e4c3f41 Linus Torvalds 2005-04-16 1683
15820e129013dd Pavel Emelyanov 2008-04-16 1684 if (dev == ip6n->fb_tnl_dev) {
^1da177e4c3f41 Linus Torvalds 2005-04-16 1685 err = -EFAULT;
382f957e43c56b Arnd Bergmann 2020-11-05 1686 if (copy_from_user(&p, data, sizeof(p)))
^1da177e4c3f41 Linus Torvalds 2005-04-16 1687 break;
567131a722ca06 Ville Nuorvala 2006-11-24 1688 err = -ENOENT;
c12b395a46646b xeb(a)mail.ru 2012-08-10 1689 ip6_tnl_parm_from_user(&p1, &p);
c12b395a46646b xeb(a)mail.ru 2012-08-10 1690 t = ip6_tnl_locate(net, &p1, 0);
37355565ba57fd Nicolas Dichtel 2015-03-16 1691 if (IS_ERR(t))
^1da177e4c3f41 Linus Torvalds 2005-04-16 1692 break;
^1da177e4c3f41 Linus Torvalds 2005-04-16 1693 err = -EPERM;
15820e129013dd Pavel Emelyanov 2008-04-16 1694 if (t->dev == ip6n->fb_tnl_dev)
^1da177e4c3f41 Linus Torvalds 2005-04-16 1695 break;
567131a722ca06 Ville Nuorvala 2006-11-24 1696 dev = t->dev;
^1da177e4c3f41 Linus Torvalds 2005-04-16 1697 }
22f8cde5bc336f Stephen Hemminger 2007-02-07 1698 err = 0;
22f8cde5bc336f Stephen Hemminger 2007-02-07 1699 unregister_netdevice(dev);
^1da177e4c3f41 Linus Torvalds 2005-04-16 1700 break;
^1da177e4c3f41 Linus Torvalds 2005-04-16 1701 default:
^1da177e4c3f41 Linus Torvalds 2005-04-16 1702 err = -EINVAL;
^1da177e4c3f41 Linus Torvalds 2005-04-16 1703 }
^1da177e4c3f41 Linus Torvalds 2005-04-16 1704 return err;
^1da177e4c3f41 Linus Torvalds 2005-04-16 1705 }
^1da177e4c3f41 Linus Torvalds 2005-04-16 1706
:::::: The code at line 1614 was first introduced by commit
:::::: 1da177e4c3f41524e886b7f1b8a0c1fc7321cac2 Linux-2.6.12-rc2
:::::: TO: Linus Torvalds <torvalds(a)ppc970.osdl.org>
:::::: CC: Linus Torvalds <torvalds(a)ppc970.osdl.org>
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
1 year, 4 months
[intel-linux-intel-lts:5.4/yocto 40/1142] drivers/dma/dw-axi-dmac/dw-axi-dmac-platform.c:993:47: sparse: sparse: incorrect type in assignment (different base types)
by kernel test robot
tree: https://github.com/intel/linux-intel-lts.git 5.4/yocto
head: eeb611e5394c56d45c5cc8f7dc484c9f19e93143
commit: 94e13c2880167751eb5cbbcb0e7be68ca83f0653 [40/1142] dmaengine: dw-axi-dma: support cyclic mode
config: i386-randconfig-s001-20210517 (attached as .config)
compiler: gcc-9 (Debian 9.3.0-22) 9.3.0
reproduce:
# apt-get install sparse
# sparse version: v0.6.3-341-g8af24329-dirty
# https://github.com/intel/linux-intel-lts/commit/94e13c2880167751eb5cbbcb0...
git remote add intel-linux-intel-lts https://github.com/intel/linux-intel-lts.git
git fetch --no-tags intel-linux-intel-lts 5.4/yocto
git checkout 94e13c2880167751eb5cbbcb0e7be68ca83f0653
# save the attached .config to linux build tree
make W=1 C=1 CF='-fdiagnostic-prefix -D__CHECK_ENDIAN__' W=1 ARCH=i386
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/dma/dw-axi-dmac/dw-axi-dmac-platform.c:993:47: sparse: sparse: incorrect type in assignment (different base types) @@ expected restricted __le32 [usertype] block_ts_lo @@ got unsigned int @@
drivers/dma/dw-axi-dmac/dw-axi-dmac-platform.c:993:47: sparse: expected restricted __le32 [usertype] block_ts_lo
drivers/dma/dw-axi-dmac/dw-axi-dmac-platform.c:993:47: sparse: got unsigned int
drivers/dma/dw-axi-dmac/dw-axi-dmac-platform.c:1068:55: sparse: sparse: incorrect type in assignment (different base types) @@ expected restricted __le32 [usertype] block_ts_lo @@ got unsigned int @@
drivers/dma/dw-axi-dmac/dw-axi-dmac-platform.c:1068:55: sparse: expected restricted __le32 [usertype] block_ts_lo
drivers/dma/dw-axi-dmac/dw-axi-dmac-platform.c:1068:55: sparse: got unsigned int
drivers/dma/dw-axi-dmac/dw-axi-dmac-platform.c:1070:55: sparse: sparse: incorrect type in assignment (different base types) @@ expected restricted __le32 [usertype] block_ts_lo @@ got unsigned int @@
drivers/dma/dw-axi-dmac/dw-axi-dmac-platform.c:1070:55: sparse: expected restricted __le32 [usertype] block_ts_lo
drivers/dma/dw-axi-dmac/dw-axi-dmac-platform.c:1070:55: sparse: got unsigned int
drivers/dma/dw-axi-dmac/dw-axi-dmac-platform.c:1169:59: sparse: sparse: incorrect type in argument 2 (different base types) @@ expected unsigned int [usertype] irq_mask @@ got restricted __le32 [usertype] status_lo @@
drivers/dma/dw-axi-dmac/dw-axi-dmac-platform.c:1169:59: sparse: expected unsigned int [usertype] irq_mask
drivers/dma/dw-axi-dmac/dw-axi-dmac-platform.c:1169:59: sparse: got restricted __le32 [usertype] status_lo
drivers/dma/dw-axi-dmac/dw-axi-dmac-platform.c:1170:42: sparse: sparse: invalid assignment: |=
drivers/dma/dw-axi-dmac/dw-axi-dmac-platform.c:1170:42: sparse: left side has type restricted __le32
drivers/dma/dw-axi-dmac/dw-axi-dmac-platform.c:1170:42: sparse: right side has type unsigned long
drivers/dma/dw-axi-dmac/dw-axi-dmac-platform.c:1111:22: sparse: sparse: context imbalance in 'axi_chan_handle_err' - different lock contexts for basic block
vim +993 drivers/dma/dw-axi-dmac/dw-axi-dmac-platform.c
912
913 static struct dma_async_tx_descriptor *
914 dw_chan_prep_dma_cyclic(struct dma_chan *dchan, dma_addr_t buf_addr,
915 size_t buf_len, size_t period_len,
916 enum dma_transfer_direction direction,
917 unsigned long flags)
918 {
919 struct axi_dma_chan *chan = dchan_to_axi_dma_chan(dchan);
920 struct axi_dma_desc *first = NULL, *prev = NULL;
921 unsigned int reg_width;
922 unsigned int mem_width;
923 unsigned int data_width = BIT(chan->chip->dw->hdata->m_data_width);
924 dma_addr_t reg;
925 u32 reg_value = 0;
926 unsigned int i = 0;
927 u32 ctllo, ctlhi;
928 size_t total_len = 0;
929 size_t block_ts, max_block_ts;
930 u8 lms = 0; // Select AXI0 master for LLI fetching
931 u32 offset;
932
933 if (unlikely(!is_slave_direction(direction)))
934 return NULL;
935
936 chan->direction = direction;
937 chan->cyclic = 0x1;
938
939 max_block_ts = chan->chip->dw->hdata->block_size[chan->id];
940
941 axi_set_hw_channel(chan->chip, chan->hw_hs_num);
942
943 switch (direction) {
944 case DMA_MEM_TO_DEV:
945 reg_width = __ffs(chan->slave_config.dst_addr_width);
946
947 chan->reg_width = reg_width;
948 if (reg_width == DWAXIDMAC_TRANS_WIDTH_16) {
949 offset = DMAC_APB_HALFWORD_WR_CH_EN;
950 reg_value = axi_dma_apb_ioread32(chan->chip, offset);
951 reg_value |= 0x1 << chan->id;
952 axi_dma_apb_iowrite32(chan->chip,
953 DMAC_APB_HALFWORD_WR_CH_EN, reg_value);
954 } else if (reg_width == DWAXIDMAC_TRANS_WIDTH_8) {
955 offset = DMAC_APB_BYTE_WR_CH_EN;
956 reg_value = axi_dma_apb_ioread32(chan->chip, offset);
957 reg_value |= 0x1 << chan->id;
958 axi_dma_apb_iowrite32(chan->chip, offset, reg_value);
959 }
960 reg = chan->slave_config.dst_addr;
961
962 ctllo = axi_dma_prepare_ctllo(chan) |
963 reg_width << CH_CTL_L_DST_WIDTH_POS |
964 DWAXIDMAC_CH_CTL_L_NOINC << CH_CTL_L_DST_INC_POS |
965 DWAXIDMAC_CH_CTL_L_INC << CH_CTL_L_SRC_INC_POS;
966
967 for (i = 0; i < buf_len / period_len; i++) {
968 struct axi_dma_desc *desc;
969 size_t xfer_len;
970 u32 mem, len;
971
972 mem_width = __ffs(data_width | mem | len);
973 if (mem_width > DWAXIDMAC_TRANS_WIDTH_32)
974 mem_width = DWAXIDMAC_TRANS_WIDTH_32;
975
976 xfer_len = period_len;
977 block_ts = period_len;
978
979 desc = axi_desc_get(chan);
980 if (unlikely(!desc))
981 goto err_desc_get;
982
983 if (block_ts > max_block_ts) {
984 block_ts = max_block_ts;
985 xfer_len = max_block_ts << mem_width;
986 }
987
988 ctlhi = axi_dma_prepare_ctlhi(chan);
989
990 ctllo |= mem_width << CH_CTL_L_SRC_WIDTH_POS;
991 write_desc_sar(desc, buf_addr + i * period_len);
992 write_desc_dar(desc, reg);
> 993 desc->lli.block_ts_lo = period_len / 4;
994 desc->lli.ctl_hi = cpu_to_le32(ctlhi);
995 desc->lli.ctl_lo = cpu_to_le32(ctllo);
996
997 set_desc_src_master(desc);
998 set_desc_src_master(desc);
999
1000 // Manage transfer list (xfer_list)
1001 if (!first) {
1002 first = desc;
1003 } else {
1004 write_desc_llp(prev, desc->vd.tx.phys | lms);
1005 list_add_tail(&desc->xfer_list,
1006 &first->xfer_list);
1007 }
1008 prev = desc;
1009 if (i == ((buf_len / period_len) - 1))
1010 write_desc_llp(prev, first->vd.tx.phys | lms);
1011
1012 total_len += xfer_len;
1013
1014 set_desc_last(desc);
1015 }
1016 break;
1017 case DMA_DEV_TO_MEM:
1018 reg_width = __ffs(chan->slave_config.src_addr_width);
1019
1020 chan->reg_width = reg_width;
1021 if (reg_width == DWAXIDMAC_TRANS_WIDTH_16) {
1022 offset = DMAC_APB_HALFWORD_WR_CH_EN;
1023 reg_value = axi_dma_apb_ioread32(chan->chip, offset);
1024 reg_value |= 0x1 << chan->id;
1025 axi_dma_apb_iowrite32(chan->chip, offset, reg_value);
1026 } else if (reg_width == DWAXIDMAC_TRANS_WIDTH_8) {
1027 offset = DMAC_APB_BYTE_WR_CH_EN;
1028 reg_value = axi_dma_apb_ioread32(chan->chip, offset);
1029 reg_value |= 0x1 << chan->id;
1030 axi_dma_apb_iowrite32(chan->chip, offset, reg_value);
1031 }
1032 reg = chan->slave_config.src_addr;
1033 if (reg_width > DWAXIDMAC_TRANS_WIDTH_32)
1034 reg_width = DWAXIDMAC_TRANS_WIDTH_32;
1035 ctllo = axi_dma_prepare_ctllo(chan) |
1036 reg_width << CH_CTL_L_SRC_WIDTH_POS |
1037 DWAXIDMAC_CH_CTL_L_INC << CH_CTL_L_DST_INC_POS |
1038 // Workaround
1039 DWAXIDMAC_CH_CTL_L_NOINC << CH_CTL_L_SRC_INC_POS;
1040
1041 for (i = 0; i < buf_len / period_len; i++) {
1042 struct axi_dma_desc *desc;
1043 size_t xfer_len;
1044 u32 mem, len;
1045
1046 desc = axi_desc_get(chan);
1047 if (unlikely(!desc))
1048 goto err_desc_get;
1049
1050 xfer_len = len;
1051 block_ts = xfer_len >> reg_width;
1052 if (block_ts > max_block_ts) {
1053 block_ts = max_block_ts;
1054 xfer_len = max_block_ts << reg_width;
1055 }
1056 xfer_len = period_len;
1057 block_ts = period_len;
1058 mem_width = __ffs(data_width | mem | xfer_len);
1059 if (mem_width > DWAXIDMAC_TRANS_WIDTH_32)
1060 mem_width = DWAXIDMAC_TRANS_WIDTH_32;
1061
1062 ctlhi = axi_dma_prepare_ctlhi(chan);
1063 ctllo |= mem_width << CH_CTL_L_DST_WIDTH_POS;
1064
1065 write_desc_sar(desc, reg);
1066 write_desc_dar(desc, buf_addr + i * period_len);
1067 if (reg_width == DWAXIDMAC_TRANS_WIDTH_16)
1068 desc->lli.block_ts_lo = period_len / 2;
1069 else if (reg_width >= DWAXIDMAC_TRANS_WIDTH_32)
1070 desc->lli.block_ts_lo = period_len / 4;
1071 desc->lli.ctl_hi = cpu_to_le32(ctlhi);
1072 desc->lli.ctl_lo = cpu_to_le32(ctllo);
1073
1074 set_desc_src_master(desc);
1075 set_desc_src_master(desc);
1076
1077 // Manage transfer list (xfer_list)
1078 if (!first) {
1079 first = desc;
1080 } else {
1081 write_desc_llp(prev, desc->vd.tx.phys | lms);
1082 list_add_tail(&desc->xfer_list,
1083 &first->xfer_list);
1084 }
1085 prev = desc;
1086 if (i == ((buf_len / period_len) - 1))
1087 write_desc_llp(prev, first->vd.tx.phys | lms);
1088
1089 total_len += xfer_len;
1090
1091 // TODO: check if needed
1092 set_desc_last(desc);
1093 }
1094 break;
1095 default:
1096 return NULL;
1097 }
1098
1099 if (unlikely(!first))
1100 return NULL;
1101
1102 return vchan_tx_prep(&chan->vc, &first->vd, flags);
1103
1104 err_desc_get:
1105 if (first)
1106 axi_desc_put(first);
1107
1108 return NULL;
1109 }
1110
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
1 year, 4 months
[arm-platforms:irq/domain_cleanup 37/39] arch/xtensa/kernel/irq.c:49:34: error: 'irq' undeclared; did you mean 'rq'?
by kernel test robot
tree: https://git.kernel.org/pub/scm/linux/kernel/git/maz/arm-platforms.git irq/domain_cleanup
head: 02b62579a91b5a74d7f6f249a647511795e814ea
commit: 64eba608920dc4af847abd3d8f5a4bc44528ecb1 [37/39] xtensa: Bulk conversion to generic_handle_domain_irq()
config: xtensa-randconfig-r036-20210517 (attached as .config)
compiler: xtensa-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://git.kernel.org/pub/scm/linux/kernel/git/maz/arm-platforms.git/com...
git remote add arm-platforms https://git.kernel.org/pub/scm/linux/kernel/git/maz/arm-platforms.git
git fetch --no-tags arm-platforms irq/domain_cleanup
git checkout 64eba608920dc4af847abd3d8f5a4bc44528ecb1
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-9.3.0 make.cross W=1 ARCH=xtensa
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 >>):
arch/xtensa/kernel/irq.c:34:17: warning: no previous prototype for 'do_IRQ' [-Wmissing-prototypes]
34 | asmlinkage void do_IRQ(int hwirq, struct pt_regs *regs)
| ^~~~~~
arch/xtensa/kernel/irq.c: In function 'do_IRQ':
>> arch/xtensa/kernel/irq.c:49:34: error: 'irq' undeclared (first use in this function); did you mean 'rq'?
49 | generic_handle_domain_irq(NULL, irq);
| ^~~
| rq
arch/xtensa/kernel/irq.c:49:34: note: each undeclared identifier is reported only once for each function it appears in
arch/xtensa/kernel/irq.c: At top level:
arch/xtensa/kernel/irq.c:144:13: warning: no previous prototype for 'init_IRQ' [-Wmissing-prototypes]
144 | void __init init_IRQ(void)
| ^~~~~~~~
vim +49 arch/xtensa/kernel/irq.c
33
34 asmlinkage void do_IRQ(int hwirq, struct pt_regs *regs)
35 {
36 #ifdef CONFIG_DEBUG_STACKOVERFLOW
37 /* Debugging check for stack overflow: is there less than 1KB free? */
38 {
39 unsigned long sp;
40
41 __asm__ __volatile__ ("mov %0, a1\n" : "=a" (sp));
42 sp &= THREAD_SIZE - 1;
43
44 if (unlikely(sp < (sizeof(thread_info) + 1024)))
45 printk("Stack overflow in do_IRQ: %ld\n",
46 sp - sizeof(struct thread_info));
47 }
48 #endif
> 49 generic_handle_domain_irq(NULL, irq);
50 }
51
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
1 year, 4 months
arch/riscv/kernel/probes/kprobes.c:90:22: error: use of undeclared identifier 'PAGE_KERNEL_READ_EXEC'
by kernel test robot
Hi Jisheng,
FYI, the error/warning still remains.
tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head: 38182162b50aa4e970e5997df0a0c4288147a153
commit: cdd1b2bd358ffda2638fe18ff47191e84e18525f riscv: kprobes: Implement alloc_insn_page()
date: 10 days ago
config: riscv-randconfig-r006-20210506 (attached as .config)
compiler: clang version 13.0.0 (https://github.com/llvm/llvm-project 8f5a2a5836cc8e4c1def2bdeb022e7b496623439)
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 riscv cross compiling tool for clang build
# apt-get install binutils-riscv64-linux-gnu
# 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 cdd1b2bd358ffda2638fe18ff47191e84e18525f
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross W=1 ARCH=riscv
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 >>):
include/uapi/linux/byteorder/little_endian.h:36:51: note: expanded from macro '__le16_to_cpu'
#define __le16_to_cpu(x) ((__force __u16)(__le16)(x))
^
In file included from arch/riscv/kernel/probes/kprobes.c:3:
In file included from include/linux/kprobes.h:29:
In file included from include/linux/ftrace.h:10:
In file included from include/linux/trace_recursion.h:5:
In file included from include/linux/interrupt.h:11:
In file included from include/linux/hardirq.h:10:
In file included from ./arch/riscv/include/generated/asm/hardirq.h:1:
In file included from include/asm-generic/hardirq.h:17:
In file included from include/linux/irq.h:20:
In file included from include/linux/io.h:13:
In file included from arch/riscv/include/asm/io.h:149:
include/asm-generic/io.h:572:9: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic]
return inl(addr);
^~~~~~~~~
arch/riscv/include/asm/io.h:57:76: note: expanded from macro 'inl'
#define inl(c) ({ u32 __v; __io_pbr(); __v = readl_cpu((void*)(PCI_IOBASE + (c))); __io_par(__v); __v; })
~~~~~~~~~~ ^
arch/riscv/include/asm/mmio.h:89:76: note: expanded from macro 'readl_cpu'
#define readl_cpu(c) ({ u32 __r = le32_to_cpu((__force __le32)__raw_readl(c)); __r; })
^
include/uapi/linux/byteorder/little_endian.h:34:51: note: expanded from macro '__le32_to_cpu'
#define __le32_to_cpu(x) ((__force __u32)(__le32)(x))
^
In file included from arch/riscv/kernel/probes/kprobes.c:3:
In file included from include/linux/kprobes.h:29:
In file included from include/linux/ftrace.h:10:
In file included from include/linux/trace_recursion.h:5:
In file included from include/linux/interrupt.h:11:
In file included from include/linux/hardirq.h:10:
In file included from ./arch/riscv/include/generated/asm/hardirq.h:1:
In file included from include/asm-generic/hardirq.h:17:
In file included from include/linux/irq.h:20:
In file included from include/linux/io.h:13:
In file included from arch/riscv/include/asm/io.h:149:
include/asm-generic/io.h:580:2: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic]
outb(value, addr);
^~~~~~~~~~~~~~~~~
arch/riscv/include/asm/io.h:59:68: note: expanded from macro 'outb'
#define outb(v,c) ({ __io_pbw(); writeb_cpu((v),(void*)(PCI_IOBASE + (c))); __io_paw(); })
~~~~~~~~~~ ^
arch/riscv/include/asm/mmio.h:91:52: note: expanded from macro 'writeb_cpu'
#define writeb_cpu(v, c) ((void)__raw_writeb((v), (c)))
^
In file included from arch/riscv/kernel/probes/kprobes.c:3:
In file included from include/linux/kprobes.h:29:
In file included from include/linux/ftrace.h:10:
In file included from include/linux/trace_recursion.h:5:
In file included from include/linux/interrupt.h:11:
In file included from include/linux/hardirq.h:10:
In file included from ./arch/riscv/include/generated/asm/hardirq.h:1:
In file included from include/asm-generic/hardirq.h:17:
In file included from include/linux/irq.h:20:
In file included from include/linux/io.h:13:
In file included from arch/riscv/include/asm/io.h:149:
include/asm-generic/io.h:588:2: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic]
outw(value, addr);
^~~~~~~~~~~~~~~~~
arch/riscv/include/asm/io.h:60:68: note: expanded from macro 'outw'
#define outw(v,c) ({ __io_pbw(); writew_cpu((v),(void*)(PCI_IOBASE + (c))); __io_paw(); })
~~~~~~~~~~ ^
arch/riscv/include/asm/mmio.h:92:76: note: expanded from macro 'writew_cpu'
#define writew_cpu(v, c) ((void)__raw_writew((__force u16)cpu_to_le16(v), (c)))
^
In file included from arch/riscv/kernel/probes/kprobes.c:3:
In file included from include/linux/kprobes.h:29:
In file included from include/linux/ftrace.h:10:
In file included from include/linux/trace_recursion.h:5:
In file included from include/linux/interrupt.h:11:
In file included from include/linux/hardirq.h:10:
In file included from ./arch/riscv/include/generated/asm/hardirq.h:1:
In file included from include/asm-generic/hardirq.h:17:
In file included from include/linux/irq.h:20:
In file included from include/linux/io.h:13:
In file included from arch/riscv/include/asm/io.h:149:
include/asm-generic/io.h:596:2: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic]
outl(value, addr);
^~~~~~~~~~~~~~~~~
arch/riscv/include/asm/io.h:61:68: note: expanded from macro 'outl'
#define outl(v,c) ({ __io_pbw(); writel_cpu((v),(void*)(PCI_IOBASE + (c))); __io_paw(); })
~~~~~~~~~~ ^
arch/riscv/include/asm/mmio.h:93:76: note: expanded from macro 'writel_cpu'
#define writel_cpu(v, c) ((void)__raw_writel((__force u32)cpu_to_le32(v), (c)))
^
In file included from arch/riscv/kernel/probes/kprobes.c:3:
In file included from include/linux/kprobes.h:29:
In file included from include/linux/ftrace.h:10:
In file included from include/linux/trace_recursion.h:5:
In file included from include/linux/interrupt.h:11:
In file included from include/linux/hardirq.h:10:
In file included from ./arch/riscv/include/generated/asm/hardirq.h:1:
In file included from include/asm-generic/hardirq.h:17:
In file included from include/linux/irq.h:20:
In file included from include/linux/io.h:13:
In file included from arch/riscv/include/asm/io.h:149:
include/asm-generic/io.h:1005:55: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic]
return (port > MMIO_UPPER_LIMIT) ? NULL : PCI_IOBASE + port;
~~~~~~~~~~ ^
>> arch/riscv/kernel/probes/kprobes.c:90:22: error: use of undeclared identifier 'PAGE_KERNEL_READ_EXEC'
GFP_KERNEL, PAGE_KERNEL_READ_EXEC,
^
7 warnings and 1 error generated.
vim +/PAGE_KERNEL_READ_EXEC +90 arch/riscv/kernel/probes/kprobes.c
86
87 void *alloc_insn_page(void)
88 {
89 return __vmalloc_node_range(PAGE_SIZE, 1, VMALLOC_START, VMALLOC_END,
> 90 GFP_KERNEL, PAGE_KERNEL_READ_EXEC,
91 VM_FLUSH_RESET_PERMS, NUMA_NO_NODE,
92 __builtin_return_address(0));
93 }
94
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
1 year, 4 months