[linux-stable-rc:linux-4.19.y 2834/9999] arm-linux-gnueabi-ld: section .pci_fixup VMA overlaps section .init.data VMA
by kernel test robot
tree: https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable-rc.git linux-4.19.y
head: e864f43593ccf9180c61738abdf1c1dde091367d
commit: 851308450a8f38f9f9b0b6591edd4ae286d4442f [2834/9999] media: cec/v4l2: move V4L2 specific CEC functions to V4L2
config: arm-randconfig-r015-20200717 (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
git checkout 851308450a8f38f9f9b0b6591edd4ae286d4442f
# 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 errors (new ones prefixed by >>):
arm-linux-gnueabi-ld: section .data VMA [0000000040008000,0000000040386647] overlaps section .text VMA [000000003f080180,00000000401090c7]
arm-linux-gnueabi-ld: section .fixup VMA [00000000401090c8,00000000401090e3] overlaps section .data VMA [0000000040008000,0000000040386647]
arm-linux-gnueabi-ld: section __bug_table VMA [0000000040386648,000000004038b6cf] overlaps section .rodata VMA [000000004010a000,000000004038dea7]
>> arm-linux-gnueabi-ld: section .pci_fixup VMA [000000004038dea8,000000004038fe67] overlaps section .init.data VMA [000000004038d000,000000004039b48b]
arm-linux-gnueabi-ld: section .exit.data VMA [000000004039b48c,000000004039d9cf] overlaps section __ksymtab_gpl VMA [0000000040397e48,000000004039feb7]
arm-linux-gnueabi-ld: section __ksymtab_strings VMA [000000004039feb8,00000000403c679f] overlaps section .bss VMA [000000004039e000,00000000411c17bf]
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
2 years, 2 months
arch/x86/kernel/tboot.c:481:16: sparse: sparse: incorrect type in assignment (different address spaces)
by kernel test robot
tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head: 6a70f89cc58f2368efa055cbcbd8b37384f6c588
commit: 670d0a4b10704667765f7d18f7592993d02783aa sparse: use identifiers to define address spaces
date: 4 weeks ago
config: i386-randconfig-s002-20200718 (attached as .config)
compiler: gcc-9 (Debian 9.3.0-14) 9.3.0
reproduce:
# apt-get install sparse
# sparse version: v0.6.2-49-g707c5017-dirty
git checkout 670d0a4b10704667765f7d18f7592993d02783aa
# save the attached .config to linux build tree
make W=1 C=1 CF='-fdiagnostic-prefix -D__CHECK_ENDIAN__' 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 >>)
>> arch/x86/kernel/tboot.c:481:16: sparse: sparse: incorrect type in assignment (different address spaces) @@ expected void *config @@ got void [noderef] __iomem * @@
arch/x86/kernel/tboot.c:481:16: sparse: expected void *config
>> arch/x86/kernel/tboot.c:481:16: sparse: got void [noderef] __iomem *
>> arch/x86/kernel/tboot.c:487:19: sparse: sparse: incorrect type in assignment (different address spaces) @@ expected void *heap_base @@ got void [noderef] __iomem * @@
arch/x86/kernel/tboot.c:487:19: sparse: expected void *heap_base
arch/x86/kernel/tboot.c:487:19: sparse: got void [noderef] __iomem *
>> arch/x86/kernel/tboot.c:489:17: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected void volatile [noderef] __iomem *addr @@ got void *config @@
>> arch/x86/kernel/tboot.c:489:17: sparse: expected void volatile [noderef] __iomem *addr
arch/x86/kernel/tboot.c:489:17: sparse: got void *config
vim +481 arch/x86/kernel/tboot.c
3162534069597e Joseph Cihula 2009-06-30 467
3162534069597e Joseph Cihula 2009-06-30 468 struct acpi_table_header *tboot_get_dmar_table(struct acpi_table_header *dmar_tbl)
3162534069597e Joseph Cihula 2009-06-30 469 {
3162534069597e Joseph Cihula 2009-06-30 470 void *heap_base, *heap_ptr, *config;
3162534069597e Joseph Cihula 2009-06-30 471
3162534069597e Joseph Cihula 2009-06-30 472 if (!tboot_enabled())
3162534069597e Joseph Cihula 2009-06-30 473 return dmar_tbl;
3162534069597e Joseph Cihula 2009-06-30 474
3162534069597e Joseph Cihula 2009-06-30 475 /*
3162534069597e Joseph Cihula 2009-06-30 476 * ACPI tables may not be DMA protected by tboot, so use DMAR copy
3162534069597e Joseph Cihula 2009-06-30 477 * SINIT saved in SinitMleData in TXT heap (which is DMA protected)
3162534069597e Joseph Cihula 2009-06-30 478 */
3162534069597e Joseph Cihula 2009-06-30 479
3162534069597e Joseph Cihula 2009-06-30 480 /* map config space in order to get heap addr */
3162534069597e Joseph Cihula 2009-06-30 @481 config = ioremap(TXT_PUB_CONFIG_REGS_BASE, NR_TXT_CONFIG_PAGES *
3162534069597e Joseph Cihula 2009-06-30 482 PAGE_SIZE);
3162534069597e Joseph Cihula 2009-06-30 483 if (!config)
3162534069597e Joseph Cihula 2009-06-30 484 return NULL;
3162534069597e Joseph Cihula 2009-06-30 485
3162534069597e Joseph Cihula 2009-06-30 486 /* now map TXT heap */
3162534069597e Joseph Cihula 2009-06-30 @487 heap_base = ioremap(*(u64 *)(config + TXTCR_HEAP_BASE),
3162534069597e Joseph Cihula 2009-06-30 488 *(u64 *)(config + TXTCR_HEAP_SIZE));
3162534069597e Joseph Cihula 2009-06-30 @489 iounmap(config);
3162534069597e Joseph Cihula 2009-06-30 490 if (!heap_base)
3162534069597e Joseph Cihula 2009-06-30 491 return NULL;
3162534069597e Joseph Cihula 2009-06-30 492
3162534069597e Joseph Cihula 2009-06-30 493 /* walk heap to SinitMleData */
3162534069597e Joseph Cihula 2009-06-30 494 /* skip BiosData */
3162534069597e Joseph Cihula 2009-06-30 495 heap_ptr = heap_base + *(u64 *)heap_base;
3162534069597e Joseph Cihula 2009-06-30 496 /* skip OsMleData */
3162534069597e Joseph Cihula 2009-06-30 497 heap_ptr += *(u64 *)heap_ptr;
3162534069597e Joseph Cihula 2009-06-30 498 /* skip OsSinitData */
3162534069597e Joseph Cihula 2009-06-30 499 heap_ptr += *(u64 *)heap_ptr;
3162534069597e Joseph Cihula 2009-06-30 500 /* now points to SinitMleDataSize; set to SinitMleData */
3162534069597e Joseph Cihula 2009-06-30 501 heap_ptr += sizeof(u64);
3162534069597e Joseph Cihula 2009-06-30 502 /* get addr of DMAR table */
3162534069597e Joseph Cihula 2009-06-30 503 dmar_tbl = (struct acpi_table_header *)(heap_ptr +
3162534069597e Joseph Cihula 2009-06-30 504 ((struct sinit_mle_data *)heap_ptr)->vtd_dmars_off -
3162534069597e Joseph Cihula 2009-06-30 505 sizeof(u64));
3162534069597e Joseph Cihula 2009-06-30 506
3162534069597e Joseph Cihula 2009-06-30 507 /* don't unmap heap because dmar.c needs access to this */
3162534069597e Joseph Cihula 2009-06-30 508
3162534069597e Joseph Cihula 2009-06-30 509 return dmar_tbl;
3162534069597e Joseph Cihula 2009-06-30 510 }
3162534069597e Joseph Cihula 2009-06-30 511
:::::: The code at line 481 was first introduced by commit
:::::: 3162534069597e34dd0ac9eb711be8dc23835ae7 x86, intel_txt: Intel TXT boot support
:::::: TO: Joseph Cihula <joseph.cihula(a)intel.com>
:::::: CC: H. Peter Anvin <hpa(a)zytor.com>
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
2 years, 2 months
[ljones-mfd:for-mfd-next 56/66] drivers/mfd/mfd-core.c:168:1: warning: no return statement in function returning non-void
by kernel test robot
tree: https://git.kernel.org/pub/scm/linux/kernel/git/lee/mfd.git for-mfd-next
head: c23452e6a319bc607b54a1cce9c74c9033565af3
commit: c509ed7e7d376a7bc3aeb17133c0d117a887916a [56/66] mfd: core: Make a best effort attempt to match devices with the correct of_nodes
config: ia64-randconfig-r024-20200717 (attached as .config)
compiler: ia64-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
git checkout c509ed7e7d376a7bc3aeb17133c0d117a887916a
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-9.3.0 make.cross ARCH=ia64
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/mfd-core.c: In function 'mfd_match_of_node_to_dev':
>> drivers/mfd/mfd-core.c:168:1: warning: no return statement in function returning non-void [-Wreturn-type]
168 | }
| ^
vim +168 drivers/mfd/mfd-core.c
119
120 static int mfd_match_of_node_to_dev(struct platform_device *pdev,
121 struct device_node *np,
122 const struct mfd_cell *cell)
123 {
124 #if IS_ENABLED(CONFIG_OF)
125 struct mfd_of_node_entry *of_entry;
126 const __be32 *reg;
127 u64 of_node_addr;
128
129 /* Skip devices 'disabled' by Device Tree */
130 if (!of_device_is_available(np))
131 return -ENODEV;
132
133 /* Skip if OF node has previously been allocated to a device */
134 list_for_each_entry(of_entry, &mfd_of_node_list, list)
135 if (of_entry->np == np)
136 return -EAGAIN;
137
138 if (!cell->use_of_reg)
139 /* No of_reg defined - allocate first free compatible match */
140 goto allocate_of_node;
141
142 /* We only care about each node's first defined address */
143 reg = of_get_address(np, 0, NULL, NULL);
144 if (!reg)
145 /* OF node does not contatin a 'reg' property to match to */
146 return -EAGAIN;
147
148 of_node_addr = of_read_number(reg, of_n_addr_cells(np));
149
150 if (cell->of_reg != of_node_addr)
151 /* No match */
152 return -EAGAIN;
153
154 allocate_of_node:
155 of_entry = kzalloc(sizeof(*of_entry), GFP_KERNEL);
156 if (!of_entry)
157 return -ENOMEM;
158
159 of_entry->dev = &pdev->dev;
160 of_entry->np = np;
161 list_add_tail(&of_entry->list, &mfd_of_node_list);
162
163 pdev->dev.of_node = np;
164 pdev->dev.fwnode = &np->fwnode;
165
166 return 0;
167 #endif
> 168 }
169
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
2 years, 2 months
Re: [PATCH] staging: kpc2000: Replace depracated MSI API.
by kernel test robot
Hi Suraj,
Thank you for the patch! Yet something to improve:
[auto build test ERROR on staging/staging-testing]
url: https://github.com/0day-ci/linux/commits/Suraj-Upadhyay/staging-kpc2000-R...
base: https://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging.git 9d5d041eebe3dcf7591ff7004896c329eb841ca6
config: alpha-allyesconfig (attached as .config)
compiler: alpha-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
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-9.3.0 make.cross ARCH=alpha
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp(a)intel.com>
All errors (new ones prefixed by >>):
drivers/staging/kpc2000/kpc2000/core.c: In function 'kp2000_pcie_probe':
>> drivers/staging/kpc2000/kpc2000/core.c:443:30: error: 'dev' undeclared (first use in this function); did you mean 'pdev'?
443 | err = pci_alloc_irq_vectors(dev, 1, 1, PCI_IRQ_MSI);
| ^~~
| pdev
drivers/staging/kpc2000/kpc2000/core.c:443:30: note: each undeclared identifier is reported only once for each function it appears in
vim +443 drivers/staging/kpc2000/kpc2000/core.c
295
296 static int kp2000_pcie_probe(struct pci_dev *pdev,
297 const struct pci_device_id *id)
298 {
299 int err = 0;
300 struct kp2000_device *pcard;
301 unsigned long reg_bar_phys_addr;
302 unsigned long reg_bar_phys_len;
303 unsigned long dma_bar_phys_addr;
304 unsigned long dma_bar_phys_len;
305 u16 regval;
306
307 pcard = kzalloc(sizeof(*pcard), GFP_KERNEL);
308 if (!pcard)
309 return -ENOMEM;
310 dev_dbg(&pdev->dev, "probe: allocated struct kp2000_device @ %p\n",
311 pcard);
312
313 err = ida_simple_get(&card_num_ida, 1, INT_MAX, GFP_KERNEL);
314 if (err < 0) {
315 dev_err(&pdev->dev, "probe: failed to get card number (%d)\n",
316 err);
317 goto err_free_pcard;
318 }
319 pcard->card_num = err;
320 scnprintf(pcard->name, 16, "kpcard%u", pcard->card_num);
321
322 mutex_init(&pcard->sem);
323 mutex_lock(&pcard->sem);
324
325 pcard->pdev = pdev;
326 pci_set_drvdata(pdev, pcard);
327
328 err = pci_enable_device(pcard->pdev);
329 if (err) {
330 dev_err(&pcard->pdev->dev,
331 "probe: failed to enable PCIE2000 PCIe device (%d)\n",
332 err);
333 goto err_remove_ida;
334 }
335
336 /* Setup the Register BAR */
337 reg_bar_phys_addr = pci_resource_start(pcard->pdev, REG_BAR);
338 reg_bar_phys_len = pci_resource_len(pcard->pdev, REG_BAR);
339
340 pcard->regs_bar_base = ioremap(reg_bar_phys_addr, PAGE_SIZE);
341 if (!pcard->regs_bar_base) {
342 dev_err(&pcard->pdev->dev,
343 "probe: REG_BAR could not remap memory to virtual space\n");
344 err = -ENODEV;
345 goto err_disable_device;
346 }
347 dev_dbg(&pcard->pdev->dev,
348 "probe: REG_BAR virt hardware address start [%p]\n",
349 pcard->regs_bar_base);
350
351 err = pci_request_region(pcard->pdev, REG_BAR, KP_DRIVER_NAME_KP2000);
352 if (err) {
353 dev_err(&pcard->pdev->dev,
354 "probe: failed to acquire PCI region (%d)\n",
355 err);
356 err = -ENODEV;
357 goto err_unmap_regs;
358 }
359
360 pcard->regs_base_resource.start = reg_bar_phys_addr;
361 pcard->regs_base_resource.end = reg_bar_phys_addr +
362 reg_bar_phys_len - 1;
363 pcard->regs_base_resource.flags = IORESOURCE_MEM;
364
365 /* Setup the DMA BAR */
366 dma_bar_phys_addr = pci_resource_start(pcard->pdev, DMA_BAR);
367 dma_bar_phys_len = pci_resource_len(pcard->pdev, DMA_BAR);
368
369 pcard->dma_bar_base = ioremap(dma_bar_phys_addr,
370 dma_bar_phys_len);
371 if (!pcard->dma_bar_base) {
372 dev_err(&pcard->pdev->dev,
373 "probe: DMA_BAR could not remap memory to virtual space\n");
374 err = -ENODEV;
375 goto err_release_regs;
376 }
377 dev_dbg(&pcard->pdev->dev,
378 "probe: DMA_BAR virt hardware address start [%p]\n",
379 pcard->dma_bar_base);
380
381 pcard->dma_common_regs = pcard->dma_bar_base + KPC_DMA_COMMON_OFFSET;
382
383 err = pci_request_region(pcard->pdev, DMA_BAR, "kp2000_pcie");
384 if (err) {
385 dev_err(&pcard->pdev->dev,
386 "probe: failed to acquire PCI region (%d)\n", err);
387 err = -ENODEV;
388 goto err_unmap_dma;
389 }
390
391 pcard->dma_base_resource.start = dma_bar_phys_addr;
392 pcard->dma_base_resource.end = dma_bar_phys_addr +
393 dma_bar_phys_len - 1;
394 pcard->dma_base_resource.flags = IORESOURCE_MEM;
395
396 /* Read System Regs */
397 pcard->sysinfo_regs_base = pcard->regs_bar_base;
398 err = read_system_regs(pcard);
399 if (err)
400 goto err_release_dma;
401
402 // Disable all "user" interrupts because they're not used yet.
403 writeq(0xFFFFFFFFFFFFFFFFUL,
404 pcard->sysinfo_regs_base + REG_INTERRUPT_MASK);
405
406 // let the card master PCIe
407 pci_set_master(pcard->pdev);
408
409 // enable IO and mem if not already done
410 pci_read_config_word(pcard->pdev, PCI_COMMAND, ®val);
411 regval |= (PCI_COMMAND_IO | PCI_COMMAND_MEMORY);
412 pci_write_config_word(pcard->pdev, PCI_COMMAND, regval);
413
414 // Clear relaxed ordering bit
415 pcie_capability_clear_and_set_word(pcard->pdev, PCI_EXP_DEVCTL,
416 PCI_EXP_DEVCTL_RELAX_EN, 0);
417
418 // Set Max_Payload_Size and Max_Read_Request_Size
419 regval = (0x0) << 5; // Max_Payload_Size = 128 B
420 pcie_capability_clear_and_set_word(pcard->pdev, PCI_EXP_DEVCTL,
421 PCI_EXP_DEVCTL_PAYLOAD, regval);
422 regval = (0x0) << 12; // Max_Read_Request_Size = 128 B
423 pcie_capability_clear_and_set_word(pcard->pdev, PCI_EXP_DEVCTL,
424 PCI_EXP_DEVCTL_READRQ, regval);
425
426 // Enable error reporting for: Correctable Errors, Non-Fatal Errors,
427 // Fatal Errors, Unsupported Requests
428 pcie_capability_clear_and_set_word(pcard->pdev, PCI_EXP_DEVCTL, 0,
429 PCI_EXP_DEVCTL_CERE |
430 PCI_EXP_DEVCTL_NFERE |
431 PCI_EXP_DEVCTL_FERE |
432 PCI_EXP_DEVCTL_URRE);
433
434 err = dma_set_mask(PCARD_TO_DEV(pcard), DMA_BIT_MASK(64));
435 if (err) {
436 dev_err(&pcard->pdev->dev,
437 "CANNOT use DMA mask %0llx\n", DMA_BIT_MASK(64));
438 goto err_release_dma;
439 }
440 dev_dbg(&pcard->pdev->dev,
441 "Using DMA mask %0llx\n", dma_get_mask(PCARD_TO_DEV(pcard)));
442
> 443 err = pci_alloc_irq_vectors(dev, 1, 1, PCI_IRQ_MSI);
444 if (err < 0)
445 goto err_release_dma;
446
447 err = request_irq(pcard->pdev->irq, kp2000_irq_handler, IRQF_SHARED,
448 pcard->name, pcard);
449 if (err) {
450 dev_err(&pcard->pdev->dev,
451 "%s: failed to request_irq: %d\n", __func__, err);
452 goto err_disable_msi;
453 }
454
455 err = sysfs_create_files(&pdev->dev.kobj, kp_attr_list);
456 if (err) {
457 dev_err(&pdev->dev, "Failed to add sysfs files: %d\n", err);
458 goto err_free_irq;
459 }
460
461 err = kp2000_probe_cores(pcard);
462 if (err)
463 goto err_remove_sysfs;
464
465 /* Enable IRQs in HW */
466 writel(KPC_DMA_CARD_IRQ_ENABLE | KPC_DMA_CARD_USER_INTERRUPT_MODE,
467 pcard->dma_common_regs);
468
469 mutex_unlock(&pcard->sem);
470 return 0;
471
472 err_remove_sysfs:
473 sysfs_remove_files(&pdev->dev.kobj, kp_attr_list);
474 err_free_irq:
475 free_irq(pcard->pdev->irq, pcard);
476 err_disable_msi:
477 pci_disable_msi(pcard->pdev);
478 err_release_dma:
479 pci_release_region(pdev, DMA_BAR);
480 err_unmap_dma:
481 iounmap(pcard->dma_bar_base);
482 err_release_regs:
483 pci_release_region(pdev, REG_BAR);
484 err_unmap_regs:
485 iounmap(pcard->regs_bar_base);
486 err_disable_device:
487 pci_disable_device(pcard->pdev);
488 err_remove_ida:
489 mutex_unlock(&pcard->sem);
490 ida_simple_remove(&card_num_ida, pcard->card_num);
491 err_free_pcard:
492 kfree(pcard);
493 return err;
494 }
495
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
2 years, 2 months
[joro:sev-es-client-tip 41/76] arch/x86/kernel/idt.c:430:13: warning: no previous prototype for function 'early_idt_setup'
by kernel test robot
tree: https://git.kernel.org/pub/scm/linux/kernel/git/joro/linux.git sev-es-client-tip
head: 57349dbe54433697c5b96bd5d8b5bd7499754d2b
commit: bff2b25349cea6367257853486654a37611438ad [41/76] x86/sev-es: Setup early #VC handler
config: x86_64-allyesconfig (attached as .config)
compiler: clang version 12.0.0 (https://github.com/llvm/llvm-project ed6b578040a85977026c93bf4188f996148f3218)
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
git checkout bff2b25349cea6367257853486654a37611438ad
# 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 >>):
>> arch/x86/kernel/idt.c:430:13: warning: no previous prototype for function 'early_idt_setup' [-Wmissing-prototypes]
void __init early_idt_setup(unsigned long physbase)
^
arch/x86/kernel/idt.c:430:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
void __init early_idt_setup(unsigned long physbase)
^
static
1 warning generated.
vim +/early_idt_setup +430 arch/x86/kernel/idt.c
429
> 430 void __init early_idt_setup(unsigned long physbase)
431 {
432 void __maybe_unused *handler;
433 gate_desc *idt;
434
435 idt = fixup_pointer(idt_table, physbase);
436
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
2 years, 2 months
[PATCH] ACPI/PCI: fix array_size.cocci warnings
by kernel test robot
From: kernel test robot <lkp(a)intel.com>
drivers/acpi/pci_root.c:150:37-38: WARNING: Use ARRAY_SIZE
Use ARRAY_SIZE instead of dividing sizeof array with sizeof an element
Semantic patch information:
This makes an effort to find cases where ARRAY_SIZE can be used such as
where there is a division of sizeof the array by the sizeof its first
element or by any indexed element or the element type. It replaces the
division of the two sizeofs by ARRAY_SIZE.
Generated by: scripts/coccinelle/misc/array_size.cocci
CC: Kuppuswamy Sathyanarayanan <sathyanarayanan.kuppuswamy(a)linux.intel.com>
Signed-off-by: kernel test robot <lkp(a)intel.com>
---
url: https://github.com/0day-ci/linux/commits/sathyanarayanan-kuppuswamy-linux...
base: https://git.kernel.org/pub/scm/linux/kernel/git/helgaas/pci.git next
pci_root.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
--- a/drivers/acpi/pci_root.c
+++ b/drivers/acpi/pci_root.c
@@ -147,7 +147,7 @@ static struct pci_osc_bit_struct pci_osc
static char *get_osc_desc(u32 bit)
{
- int len = sizeof(pci_osc_control_bit) / sizeof(pci_osc_control_bit[0]);
+ int len = ARRAY_SIZE(pci_osc_control_bit);
int i = 0;
for (i = 0; i <len; i++)
2 years, 2 months
[sashal-linux-stable:queue-4.14 82/84] drivers/bluetooth/hci_bcm.c:476:10: error: use of undeclared identifier 'HCI_QUIRK_USE_BDADDR_PROPERTY'
by kernel test robot
tree: https://git.kernel.org/pub/scm/linux/kernel/git/sashal/linux-stable.git queue-4.14
head: a567298cc2a7571c3a7c390cadcac9e1d54ca2d1
commit: f59f707f62daa14db3abd78c53f02edd9beea456 [82/84] Bluetooth: btbcm: Move setting of USE_BDADDR_PROPERTY quirk to hci_bcm.c
config: x86_64-allyesconfig (attached as .config)
compiler: clang version 12.0.0 (https://github.com/llvm/llvm-project ed6b578040a85977026c93bf4188f996148f3218)
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
git checkout f59f707f62daa14db3abd78c53f02edd9beea456
# 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 >>):
>> drivers/bluetooth/hci_bcm.c:476:10: error: use of undeclared identifier 'HCI_QUIRK_USE_BDADDR_PROPERTY'
set_bit(HCI_QUIRK_USE_BDADDR_PROPERTY, &hu->hdev->quirks);
^
1 error generated.
vim +/HCI_QUIRK_USE_BDADDR_PROPERTY +476 drivers/bluetooth/hci_bcm.c
410
411 static int bcm_setup(struct hci_uart *hu)
412 {
413 struct bcm_data *bcm = hu->priv;
414 char fw_name[64];
415 const struct firmware *fw;
416 unsigned int speed;
417 int err;
418
419 bt_dev_dbg(hu->hdev, "hu %p", hu);
420
421 hu->hdev->set_diag = bcm_set_diag;
422 hu->hdev->set_bdaddr = btbcm_set_bdaddr;
423
424 err = btbcm_initialize(hu->hdev, fw_name, sizeof(fw_name));
425 if (err)
426 return err;
427
428 err = request_firmware(&fw, fw_name, &hu->hdev->dev);
429 if (err < 0) {
430 bt_dev_info(hu->hdev, "BCM: Patch %s not found", fw_name);
431 return 0;
432 }
433
434 err = btbcm_patchram(hu->hdev, fw);
435 if (err) {
436 bt_dev_info(hu->hdev, "BCM: Patch failed (%d)", err);
437 goto finalize;
438 }
439
440 /* Init speed if any */
441 if (hu->init_speed)
442 speed = hu->init_speed;
443 else if (hu->proto->init_speed)
444 speed = hu->proto->init_speed;
445 else
446 speed = 0;
447
448 if (speed)
449 host_set_baudrate(hu, speed);
450
451 /* Operational speed if any */
452 if (hu->oper_speed)
453 speed = hu->oper_speed;
454 else if (hu->proto->oper_speed)
455 speed = hu->proto->oper_speed;
456 else
457 speed = 0;
458
459 if (speed) {
460 err = bcm_set_baudrate(hu, speed);
461 if (!err)
462 host_set_baudrate(hu, speed);
463 }
464
465 finalize:
466 release_firmware(fw);
467
468 err = btbcm_finalize(hu->hdev);
469 if (err)
470 return err;
471
472 /* Some devices ship with the controller default address.
473 * Allow the bootloader to set a valid address through the
474 * device tree.
475 */
> 476 set_bit(HCI_QUIRK_USE_BDADDR_PROPERTY, &hu->hdev->quirks);
477
478 if (!bcm_request_irq(bcm))
479 err = bcm_setup_sleep(hu);
480
481 return err;
482 }
483
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
2 years, 2 months
Re: [RFC PATCH v4 06/12] dm-verity: move signature check after tree validation
by kernel test robot
Hi Deven,
[FYI, it's a private test report for your RFC patch.]
[auto build test WARNING on dm/for-next]
[also build test WARNING on pcmoore-selinux/next linus/master v5.8-rc5]
[cannot apply to security/next-testing next-20200717]
[If your patch is applied to the wrong git tree, kindly drop us a note.
And when submitting patch, we suggest to use '--base' as documented in
https://git-scm.com/docs/git-format-patch]
url: https://github.com/0day-ci/linux/commits/Deven-Bowers/Integrity-Policy-En...
base: https://git.kernel.org/pub/scm/linux/kernel/git/device-mapper/linux-dm.git for-next
config: s390-randconfig-r015-20200717 (attached as .config)
compiler: clang version 12.0.0 (https://github.com/llvm/llvm-project ed6b578040a85977026c93bf4188f996148f3218)
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 s390 cross compiling tool for clang build
# apt-get install binutils-s390x-linux-gnu
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang 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 >>):
include/asm-generic/io.h:490:45: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic]
val = __le32_to_cpu(__raw_readl(PCI_IOBASE + addr));
~~~~~~~~~~ ^
include/uapi/linux/byteorder/big_endian.h:34:59: note: expanded from macro '__le32_to_cpu'
#define __le32_to_cpu(x) __swab32((__force __u32)(__le32)(x))
^
include/uapi/linux/swab.h:119:21: note: expanded from macro '__swab32'
___constant_swab32(x) : \
^
include/uapi/linux/swab.h:21:12: note: expanded from macro '___constant_swab32'
(((__u32)(x) & (__u32)0x00ff0000UL) >> 8) | \
^
In file included from drivers/md/dm-verity-target.c:16:
In file included from drivers/md/dm-verity.h:14:
In file included from include/linux/dm-bufio.h:12:
In file included from include/linux/blkdev.h:28:
In file included from include/linux/scatterlist.h:9:
In file included from arch/s390/include/asm/io.h:72:
include/asm-generic/io.h:490:45: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic]
val = __le32_to_cpu(__raw_readl(PCI_IOBASE + addr));
~~~~~~~~~~ ^
include/uapi/linux/byteorder/big_endian.h:34:59: note: expanded from macro '__le32_to_cpu'
#define __le32_to_cpu(x) __swab32((__force __u32)(__le32)(x))
^
include/uapi/linux/swab.h:119:21: note: expanded from macro '__swab32'
___constant_swab32(x) : \
^
include/uapi/linux/swab.h:22:12: note: expanded from macro '___constant_swab32'
(((__u32)(x) & (__u32)0xff000000UL) >> 24)))
^
In file included from drivers/md/dm-verity-target.c:16:
In file included from drivers/md/dm-verity.h:14:
In file included from include/linux/dm-bufio.h:12:
In file included from include/linux/blkdev.h:28:
In file included from include/linux/scatterlist.h:9:
In file included from arch/s390/include/asm/io.h:72:
include/asm-generic/io.h:490:45: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic]
val = __le32_to_cpu(__raw_readl(PCI_IOBASE + addr));
~~~~~~~~~~ ^
include/uapi/linux/byteorder/big_endian.h:34:59: note: expanded from macro '__le32_to_cpu'
#define __le32_to_cpu(x) __swab32((__force __u32)(__le32)(x))
^
include/uapi/linux/swab.h:120:12: note: expanded from macro '__swab32'
__fswab32(x))
^
In file included from drivers/md/dm-verity-target.c:16:
In file included from drivers/md/dm-verity.h:14:
In file included from include/linux/dm-bufio.h:12:
In file included from include/linux/blkdev.h:28:
In file included from include/linux/scatterlist.h:9:
In file included from arch/s390/include/asm/io.h:72:
include/asm-generic/io.h:501:33: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic]
__raw_writeb(value, PCI_IOBASE + addr);
~~~~~~~~~~ ^
include/asm-generic/io.h:511:46: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic]
__raw_writew(cpu_to_le16(value), PCI_IOBASE + addr);
~~~~~~~~~~ ^
include/asm-generic/io.h:521:46: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic]
__raw_writel(cpu_to_le32(value), PCI_IOBASE + addr);
~~~~~~~~~~ ^
include/asm-generic/io.h:609:20: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic]
readsb(PCI_IOBASE + addr, buffer, count);
~~~~~~~~~~ ^
include/asm-generic/io.h:617:20: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic]
readsw(PCI_IOBASE + addr, buffer, count);
~~~~~~~~~~ ^
include/asm-generic/io.h:625:20: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic]
readsl(PCI_IOBASE + addr, buffer, count);
~~~~~~~~~~ ^
include/asm-generic/io.h:634:21: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic]
writesb(PCI_IOBASE + addr, buffer, count);
~~~~~~~~~~ ^
include/asm-generic/io.h:643:21: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic]
writesw(PCI_IOBASE + addr, buffer, count);
~~~~~~~~~~ ^
include/asm-generic/io.h:652:21: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic]
writesl(PCI_IOBASE + addr, buffer, count);
~~~~~~~~~~ ^
In file included from drivers/md/dm-verity-target.c:18:
drivers/md/dm-verity-verify-sig.h:37:5: warning: no previous prototype for function 'verity_verify_root_hash' [-Wmissing-prototypes]
int verity_verify_root_hash(const struct dm_verity *v)
^
drivers/md/dm-verity-verify-sig.h:37:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
int verity_verify_root_hash(const struct dm_verity *v)
^
static
drivers/md/dm-verity-verify-sig.h:42:6: warning: no previous prototype for function 'verity_verify_is_sig_opt_arg' [-Wmissing-prototypes]
bool verity_verify_is_sig_opt_arg(const char *arg_name)
^
drivers/md/dm-verity-verify-sig.h:42:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
bool verity_verify_is_sig_opt_arg(const char *arg_name)
^
static
drivers/md/dm-verity-verify-sig.h:47:5: warning: no previous prototype for function 'verity_verify_sig_parse_opt_args' [-Wmissing-prototypes]
int verity_verify_sig_parse_opt_args(struct dm_arg_set *as, struct dm_verity *v,
^
drivers/md/dm-verity-verify-sig.h:47:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
int verity_verify_sig_parse_opt_args(struct dm_arg_set *as, struct dm_verity *v,
^
static
>> drivers/md/dm-verity-verify-sig.h:53:6: warning: no previous prototype for function 'verity_verify_dtr' [-Wmissing-prototypes]
void verity_verify_dtr(struct dm_verity *v)
^
drivers/md/dm-verity-verify-sig.h:53:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
void verity_verify_dtr(struct dm_verity *v)
^
static
24 warnings generated.
vim +/verity_verify_dtr +53 drivers/md/dm-verity-verify-sig.h
46
> 47 int verity_verify_sig_parse_opt_args(struct dm_arg_set *as, struct dm_verity *v,
48 unsigned int *argc)
49 {
50 return -EINVAL;
51 }
52
> 53 void verity_verify_dtr(struct dm_verity *v)
54 {
55 }
56
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
2 years, 2 months
[rhvgoyal:virtiofs-dax-5.8 13/20] include/linux/iomap.h:95:48: error: use of undeclared identifier 'SECTOR_SHIFT'
by kernel test robot
tree: https://github.com/rhvgoyal/linux virtiofs-dax-5.8
head: b779919ca8c764c6664523cba2f8dc7fdb4b29d8
commit: ca29952d27ecbcaa6cfb7c34131742aa70eb06cc [13/20] fuse, dax: Implement dax read/write operations
config: s390-randconfig-r022-20200717 (attached as .config)
compiler: clang version 12.0.0 (https://github.com/llvm/llvm-project ed6b578040a85977026c93bf4188f996148f3218)
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 s390 cross compiling tool for clang build
# apt-get install binutils-s390x-linux-gnu
git checkout ca29952d27ecbcaa6cfb7c34131742aa70eb06cc
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang 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 errors (new ones prefixed by >>):
In file included from fs/fuse/file.c:22:
>> include/linux/iomap.h:95:48: error: use of undeclared identifier 'SECTOR_SHIFT'
return (iomap->addr + pos - iomap->offset) >> SECTOR_SHIFT;
^
1 error generated.
vim +/SECTOR_SHIFT +95 include/linux/iomap.h
63899c6f8851c3 Christoph Hellwig 2018-06-19 91
db074436f42196 Darrick J. Wong 2019-07-15 92 static inline sector_t
db074436f42196 Darrick J. Wong 2019-07-15 93 iomap_sector(struct iomap *iomap, loff_t pos)
db074436f42196 Darrick J. Wong 2019-07-15 94 {
db074436f42196 Darrick J. Wong 2019-07-15 @95 return (iomap->addr + pos - iomap->offset) >> SECTOR_SHIFT;
db074436f42196 Darrick J. Wong 2019-07-15 96 }
db074436f42196 Darrick J. Wong 2019-07-15 97
:::::: The code at line 95 was first introduced by commit
:::::: db074436f421967f4f30cfbb6fbc2a728f3e62b3 iomap: move the direct IO code into a separate file
:::::: TO: Darrick J. Wong <darrick.wong(a)oracle.com>
:::::: CC: Darrick J. Wong <darrick.wong(a)oracle.com>
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
2 years, 2 months