* [hid:for-next 5/10] drivers/hid/amd-sfh-hid/amd_sfh_pcie.c:413:7: error: use of undeclared identifier 'boot_cpu_data'
@ 2024-02-28 20:22 kernel test robot
0 siblings, 0 replies; only message in thread
From: kernel test robot @ 2024-02-28 20:22 UTC (permalink / raw)
To: Basavaraj Natikar; +Cc: llvm, oe-kbuild-all, linux-input, Jiri Kosina
tree: https://git.kernel.org/pub/scm/linux/kernel/git/hid/hid.git for-next
head: f0cd2e82460c8b6c691bf553480c30144f8c32f7
commit: 6296562f30b1caf4b5f44e0c89c8f5cbfdb14b4a [5/10] HID: amd_sfh: Extend MP2 register access to SFH
config: s390-allmodconfig (https://download.01.org/0day-ci/archive/20240229/202402290458.HbkBPldx-lkp@intel.com/config)
compiler: clang version 19.0.0git (https://github.com/llvm/llvm-project edd4aee4dd9b5b98b2576a6f783e4086173d902a)
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20240229/202402290458.HbkBPldx-lkp@intel.com/reproduce)
If you fix the issue in a separate patch/commit (i.e. not just a new version of
the same patch/commit), kindly add following tags
| Reported-by: kernel test robot <lkp@intel.com>
| Closes: https://lore.kernel.org/oe-kbuild-all/202402290458.HbkBPldx-lkp@intel.com/
Note: the hid/for-next HEAD f0cd2e82460c8b6c691bf553480c30144f8c32f7 builds fine.
It only hurts bisectability.
All errors (new ones prefixed by >>):
In file included from drivers/hid/amd-sfh-hid/amd_sfh_pcie.c:14:
In file included from include/linux/dma-mapping.h:11:
In file included from include/linux/scatterlist.h:9:
In file included from arch/s390/include/asm/io.h:78:
include/asm-generic/io.h:547:31: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic]
547 | val = __raw_readb(PCI_IOBASE + addr);
| ~~~~~~~~~~ ^
include/asm-generic/io.h:560:61: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic]
560 | val = __le16_to_cpu((__le16 __force)__raw_readw(PCI_IOBASE + addr));
| ~~~~~~~~~~ ^
include/uapi/linux/byteorder/big_endian.h:37:59: note: expanded from macro '__le16_to_cpu'
37 | #define __le16_to_cpu(x) __swab16((__force __u16)(__le16)(x))
| ^
include/uapi/linux/swab.h:102:54: note: expanded from macro '__swab16'
102 | #define __swab16(x) (__u16)__builtin_bswap16((__u16)(x))
| ^
In file included from drivers/hid/amd-sfh-hid/amd_sfh_pcie.c:14:
In file included from include/linux/dma-mapping.h:11:
In file included from include/linux/scatterlist.h:9:
In file included from arch/s390/include/asm/io.h:78:
include/asm-generic/io.h:573:61: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic]
573 | val = __le32_to_cpu((__le32 __force)__raw_readl(PCI_IOBASE + addr));
| ~~~~~~~~~~ ^
include/uapi/linux/byteorder/big_endian.h:35:59: note: expanded from macro '__le32_to_cpu'
35 | #define __le32_to_cpu(x) __swab32((__force __u32)(__le32)(x))
| ^
include/uapi/linux/swab.h:115:54: note: expanded from macro '__swab32'
115 | #define __swab32(x) (__u32)__builtin_bswap32((__u32)(x))
| ^
In file included from drivers/hid/amd-sfh-hid/amd_sfh_pcie.c:14:
In file included from include/linux/dma-mapping.h:11:
In file included from include/linux/scatterlist.h:9:
In file included from arch/s390/include/asm/io.h:78:
include/asm-generic/io.h:584:33: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic]
584 | __raw_writeb(value, PCI_IOBASE + addr);
| ~~~~~~~~~~ ^
include/asm-generic/io.h:594:59: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic]
594 | __raw_writew((u16 __force)cpu_to_le16(value), PCI_IOBASE + addr);
| ~~~~~~~~~~ ^
include/asm-generic/io.h:604:59: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic]
604 | __raw_writel((u32 __force)cpu_to_le32(value), PCI_IOBASE + addr);
| ~~~~~~~~~~ ^
include/asm-generic/io.h:692:20: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic]
692 | readsb(PCI_IOBASE + addr, buffer, count);
| ~~~~~~~~~~ ^
include/asm-generic/io.h:700:20: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic]
700 | readsw(PCI_IOBASE + addr, buffer, count);
| ~~~~~~~~~~ ^
include/asm-generic/io.h:708:20: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic]
708 | readsl(PCI_IOBASE + addr, buffer, count);
| ~~~~~~~~~~ ^
include/asm-generic/io.h:717:21: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic]
717 | writesb(PCI_IOBASE + addr, buffer, count);
| ~~~~~~~~~~ ^
include/asm-generic/io.h:726:21: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic]
726 | writesw(PCI_IOBASE + addr, buffer, count);
| ~~~~~~~~~~ ^
include/asm-generic/io.h:735:21: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic]
735 | writesl(PCI_IOBASE + addr, buffer, count);
| ~~~~~~~~~~ ^
>> drivers/hid/amd-sfh-hid/amd_sfh_pcie.c:413:7: error: use of undeclared identifier 'boot_cpu_data'
413 | if (boot_cpu_data.x86 >= 0x1A)
| ^
drivers/hid/amd-sfh-hid/amd_sfh_pcie.c:401:45: warning: shift count >= width of type [-Wshift-count-overflow]
401 | rc = dma_set_mask_and_coherent(&pdev->dev, DMA_BIT_MASK(64));
| ^~~~~~~~~~~~~~~~
include/linux/dma-mapping.h:77:54: note: expanded from macro 'DMA_BIT_MASK'
77 | #define DMA_BIT_MASK(n) (((n) == 64) ? ~0ULL : ((1ULL<<(n))-1))
| ^ ~~~
13 warnings and 1 error generated.
vim +/boot_cpu_data +413 drivers/hid/amd-sfh-hid/amd_sfh_pcie.c
374
375 static int amd_mp2_pci_probe(struct pci_dev *pdev, const struct pci_device_id *id)
376 {
377 struct amd_mp2_dev *privdata;
378 int rc;
379
380 if (dmi_first_match(dmi_nodevs))
381 return -ENODEV;
382
383 dmi_check_system(dmi_sfh_table);
384
385 privdata = devm_kzalloc(&pdev->dev, sizeof(*privdata), GFP_KERNEL);
386 if (!privdata)
387 return -ENOMEM;
388
389 privdata->pdev = pdev;
390 dev_set_drvdata(&pdev->dev, privdata);
391 rc = pcim_enable_device(pdev);
392 if (rc)
393 return rc;
394
395 rc = pcim_iomap_regions(pdev, BIT(2), DRIVER_NAME);
396 if (rc)
397 return rc;
398
399 privdata->mmio = pcim_iomap_table(pdev)[2];
400 pci_set_master(pdev);
401 rc = dma_set_mask_and_coherent(&pdev->dev, DMA_BIT_MASK(64));
402 if (rc) {
403 dev_err(&pdev->dev, "failed to set DMA mask\n");
404 return rc;
405 }
406
407 privdata->cl_data = devm_kzalloc(&pdev->dev, sizeof(struct amdtp_cl_data), GFP_KERNEL);
408 if (!privdata->cl_data)
409 return -ENOMEM;
410
411 privdata->sfh1_1_ops = (const struct amd_sfh1_1_ops *)id->driver_data;
412 if (privdata->sfh1_1_ops) {
> 413 if (boot_cpu_data.x86 >= 0x1A)
414 privdata->rver = 1;
415
416 rc = devm_work_autocancel(&pdev->dev, &privdata->work, sfh1_1_init_work);
417 if (rc)
418 return rc;
419
420 schedule_work(&privdata->work);
421 return 0;
422 }
423
424 mp2_select_ops(privdata);
425
426 rc = amd_sfh_irq_init(privdata);
427 if (rc) {
428 dev_err(&pdev->dev, "amd_sfh_irq_init failed\n");
429 return rc;
430 }
431
432 rc = devm_work_autocancel(&pdev->dev, &privdata->work, sfh_init_work);
433 if (rc) {
434 amd_sfh_clear_intr(privdata);
435 return rc;
436 }
437
438 schedule_work(&privdata->work);
439 return 0;
440 }
441
--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2024-02-28 20:22 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-02-28 20:22 [hid:for-next 5/10] drivers/hid/amd-sfh-hid/amd_sfh_pcie.c:413:7: error: use of undeclared identifier 'boot_cpu_data' kernel test robot
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox