tree: https://github.com/mchinth/linux socwatch_linux_6_0 head: 32b2f1b19c12122a110fa6b673c000ef6bd5ee8b commit: 32b2f1b19c12122a110fa6b673c000ef6bd5ee8b [1/1] SEP/SOCPERF drivers updated to 5.36 config: i386-randconfig-s041-20221024 compiler: gcc-11 (Debian 11.3.0-8) 11.3.0 reproduce: # apt-get install sparse # sparse version: v0.6.4-39-gce1a6720-dirty # https://github.com/mchinth/linux/commit/32b2f1b19c12122a110fa6b673c000ef6bd5ee8b git remote add mchinth https://github.com/mchinth/linux git fetch --no-tags mchinth socwatch_linux_6_0 git checkout 32b2f1b19c12122a110fa6b673c000ef6bd5ee8b # save the config file mkdir build_dir && cp config build_dir/.config make W=1 C=1 CF='-fdiagnostic-prefix -D__CHECK_ENDIAN__' O=build_dir ARCH=i386 SHELL=/bin/bash drivers/platform/x86/sepdk/sep/ drivers/platform/x86/socperf/ If you fix the issue, kindly add following tag where applicable | Reported-by: kernel test robot sparse warnings: (new ones prefixed by >>) drivers/platform/x86/sepdk/sep/pci.c:109:1: sparse: sparse: function 'PCI_Initialize' with external linkage has definition drivers/platform/x86/sepdk/sep/pci.c:172:1: sparse: sparse: function 'PCI_Cleanup' with external linkage has definition drivers/platform/x86/sepdk/sep/pci.c:201:1: sparse: sparse: function 'PCI_Find_DVSEC_Capability_BAR' with external linkage has definition drivers/platform/x86/sepdk/sep/pci.c:268:1: sparse: sparse: function 'PCI_Read_U32' with external linkage has definition drivers/platform/x86/sepdk/sep/pci.c:307:1: sparse: sparse: function 'PCI_Read_U32_Valid' with external linkage has definition drivers/platform/x86/sepdk/sep/pci.c:358:1: sparse: sparse: function 'PCI_Read_U64' with external linkage has definition drivers/platform/x86/sepdk/sep/pci.c:400:1: sparse: sparse: function 'PCI_Read_U64_Valid' with external linkage has definition drivers/platform/x86/sepdk/sep/pci.c:456:1: sparse: sparse: function 'PCI_Write_U32' with external linkage has definition drivers/platform/x86/sepdk/sep/pci.c:505:1: sparse: sparse: function 'PCI_Write_U64' with external linkage has definition drivers/platform/x86/sepdk/sep/pci.c:553:1: sparse: sparse: function 'PCI_Read_From_Memory_Address' with external linkage has definition drivers/platform/x86/sepdk/sep/pci.c:604:1: sparse: sparse: function 'PCI_Write_To_Memory_Address' with external linkage has definition >> drivers/platform/x86/sepdk/sep/pci.c:654:1: sparse: sparse: function 'PCI_Read_From_Memory_Address_U64' with external linkage has definition >> drivers/platform/x86/sepdk/sep/pci.c:706:1: sparse: sparse: function 'PCI_Write_To_Memory_Address_U64' with external linkage has definition drivers/platform/x86/sepdk/sep/pci.c:756:1: sparse: sparse: function 'PCI_Map_Memory' with external linkage has definition drivers/platform/x86/sepdk/sep/pci.c:799:1: sparse: sparse: function 'PCI_Unmap_Memory' with external linkage has definition drivers/platform/x86/sepdk/sep/pci.c:837:1: sparse: sparse: function 'PCI_MMIO_Read_U32' with external linkage has definition drivers/platform/x86/sepdk/sep/pci.c:875:1: sparse: sparse: function 'PCI_MMIO_Read_U64' with external linkage has definition drivers/platform/x86/sepdk/sep/pci.c:914:1: sparse: sparse: function 'PCI_MMIO_Write_U32' with external linkage has definition drivers/platform/x86/sepdk/sep/pci.c:952:1: sparse: sparse: function 'PCI_MMIO_Write_U64' with external linkage has definition drivers/platform/x86/sepdk/sep/pci.c:49:16: sparse: sparse: symbol 'pci_buses' was not declared. Should it be static? drivers/platform/x86/sepdk/sep/pci.c:571:14: sparse: sparse: incorrect type in assignment (different address spaces) @@ expected void *[usertype] base @@ got void [noderef] __iomem * @@ drivers/platform/x86/sepdk/sep/pci.c:571:14: sparse: expected void *[usertype] base drivers/platform/x86/sepdk/sep/pci.c:571:14: sparse: got void [noderef] __iomem * drivers/platform/x86/sepdk/sep/pci.c:579:28: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected void const volatile [noderef] __iomem *addr @@ got void * @@ drivers/platform/x86/sepdk/sep/pci.c:579:28: sparse: expected void const volatile [noderef] __iomem *addr drivers/platform/x86/sepdk/sep/pci.c:579:28: sparse: got void * drivers/platform/x86/sepdk/sep/pci.c:585:17: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected void volatile [noderef] __iomem *addr @@ got void *[usertype] base @@ drivers/platform/x86/sepdk/sep/pci.c:585:17: sparse: expected void volatile [noderef] __iomem *addr drivers/platform/x86/sepdk/sep/pci.c:585:17: sparse: got void *[usertype] base drivers/platform/x86/sepdk/sep/pci.c:623:14: sparse: sparse: incorrect type in assignment (different address spaces) @@ expected void *[usertype] base @@ got void [noderef] __iomem * @@ drivers/platform/x86/sepdk/sep/pci.c:623:14: sparse: expected void *[usertype] base drivers/platform/x86/sepdk/sep/pci.c:623:14: sparse: got void [noderef] __iomem * drivers/platform/x86/sepdk/sep/pci.c:631:26: sparse: sparse: incorrect type in argument 2 (different address spaces) @@ expected void volatile [noderef] __iomem *addr @@ got void * @@ drivers/platform/x86/sepdk/sep/pci.c:631:26: sparse: expected void volatile [noderef] __iomem *addr drivers/platform/x86/sepdk/sep/pci.c:631:26: sparse: got void * drivers/platform/x86/sepdk/sep/pci.c:635:17: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected void volatile [noderef] __iomem *addr @@ got void *[usertype] base @@ drivers/platform/x86/sepdk/sep/pci.c:635:17: sparse: expected void volatile [noderef] __iomem *addr drivers/platform/x86/sepdk/sep/pci.c:635:17: sparse: got void *[usertype] base drivers/platform/x86/sepdk/sep/pci.c:674:14: sparse: sparse: incorrect type in assignment (different address spaces) @@ expected void *[usertype] base @@ got void [noderef] __iomem * @@ drivers/platform/x86/sepdk/sep/pci.c:674:14: sparse: expected void *[usertype] base drivers/platform/x86/sepdk/sep/pci.c:674:14: sparse: got void [noderef] __iomem * drivers/platform/x86/sepdk/sep/pci.c:681:27: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected void const volatile [noderef] __iomem *addr @@ got void * @@ drivers/platform/x86/sepdk/sep/pci.c:681:27: sparse: expected void const volatile [noderef] __iomem *addr drivers/platform/x86/sepdk/sep/pci.c:681:27: sparse: got void * drivers/platform/x86/sepdk/sep/pci.c:686:17: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected void volatile [noderef] __iomem *addr @@ got void *[usertype] base @@ drivers/platform/x86/sepdk/sep/pci.c:686:17: sparse: expected void volatile [noderef] __iomem *addr drivers/platform/x86/sepdk/sep/pci.c:686:17: sparse: got void *[usertype] base drivers/platform/x86/sepdk/sep/pci.c:726:14: sparse: sparse: incorrect type in assignment (different address spaces) @@ expected void *[usertype] base @@ got void [noderef] __iomem * @@ drivers/platform/x86/sepdk/sep/pci.c:726:14: sparse: expected void *[usertype] base drivers/platform/x86/sepdk/sep/pci.c:726:14: sparse: got void [noderef] __iomem * drivers/platform/x86/sepdk/sep/pci.c:733:26: sparse: sparse: incorrect type in argument 2 (different address spaces) @@ expected void volatile [noderef] __iomem *addr @@ got void * @@ drivers/platform/x86/sepdk/sep/pci.c:733:26: sparse: expected void volatile [noderef] __iomem *addr drivers/platform/x86/sepdk/sep/pci.c:733:26: sparse: got void * drivers/platform/x86/sepdk/sep/pci.c:736:17: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected void volatile [noderef] __iomem *addr @@ got void *[usertype] base @@ drivers/platform/x86/sepdk/sep/pci.c:736:17: sparse: expected void volatile [noderef] __iomem *addr drivers/platform/x86/sepdk/sep/pci.c:736:17: sparse: got void *[usertype] base drivers/platform/x86/sepdk/sep/pci.c:768:13: sparse: sparse: incorrect type in assignment (different address spaces) @@ expected unsigned char [usertype] *res @@ got void [noderef] __iomem * @@ drivers/platform/x86/sepdk/sep/pci.c:768:13: sparse: expected unsigned char [usertype] *res drivers/platform/x86/sepdk/sep/pci.c:768:13: sparse: got void [noderef] __iomem * drivers/platform/x86/sepdk/sep/pci.c:810:34: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected void volatile [noderef] __iomem *addr @@ got void * @@ drivers/platform/x86/sepdk/sep/pci.c:810:34: sparse: expected void volatile [noderef] __iomem *addr drivers/platform/x86/sepdk/sep/pci.c:810:34: sparse: got void * -- >> drivers/platform/x86/sepdk/sep/unc_mmio.c:49:34: sparse: sparse: symbol 'regbar_physical_address' was not declared. Should it be static? vim +/PCI_Read_From_Memory_Address_U64 +654 drivers/platform/x86/sepdk/sep/pci.c 640 641 /* ------------------------------------------------------------------------- */ 642 /*! 643 * @fn extern int PCI_Read_From_Memory_Address_U64(addr, val) 644 * 645 * @param addr - physical address in mmio 646 * @param *value - value at this address 647 * 648 * @return status 649 * 650 * @brief Read memory mapped i/o physical location 651 * 652 */ 653 extern int > 654 PCI_Read_From_Memory_Address_U64 ( 655 U64 addr, 656 U64 *val 657 ) 658 { 659 U64 aligned_addr, offset, value; 660 PVOID base; 661 662 SEP_DRV_LOG_TRACE_IN("Addr: %llx, val_pointer: %p.", addr, val); 663 664 if (addr <= 0) { 665 SEP_DRV_LOG_ERROR_TRACE_OUT("OS_INVALID (addr <= 0!)."); 666 return OS_INVALID; 667 } 668 669 SEP_DRV_LOG_TRACE("Preparing to reading physical address: %llx.", addr); 670 offset = addr & ~PAGE_MASK; 671 aligned_addr = addr & PAGE_MASK; 672 SEP_DRV_LOG_TRACE("Aligned physical address: %llx, offset: %llx.", aligned_addr, offset); 673 674 base = ioremap(aligned_addr, PAGE_SIZE); 675 if (base == NULL) { 676 SEP_DRV_LOG_ERROR_TRACE_OUT("OS_INVALID (mapping failed!)."); 677 return OS_INVALID; 678 } 679 680 SEP_DRV_LOG_REGISTER_IN("Will read PCI address %u (mapped at %p).", addr, base + offset); 681 value = readl(base+offset); 682 SEP_DRV_LOG_REGISTER_OUT("Read PCI address %u (mapped at %p): %llx.", addr, base + offset, value); 683 684 *val = value; 685 686 iounmap(base); 687 688 SEP_DRV_LOG_TRACE_OUT("OS_SUCCESS."); 689 return OS_SUCCESS; 690 } 691 692 693 /* ------------------------------------------------------------------------- */ 694 /*! 695 * @fn extern int PCI_Write_To_Memory_Address_U64(addr, val) 696 * 697 * @param addr - physical address in mmio 698 * @param value - value to be written 699 * 700 * @return status 701 * 702 * @brief Write to memory mapped i/o physical location 703 * 704 */ 705 extern int > 706 PCI_Write_To_Memory_Address_U64 ( 707 U64 addr, 708 U64 val 709 ) 710 { 711 U64 aligned_addr, offset; 712 PVOID base; 713 714 SEP_DRV_LOG_TRACE_IN("Addr: %llx, val: %llx.", addr, val); 715 716 if (addr <= 0) { 717 SEP_DRV_LOG_ERROR_TRACE_OUT("OS_INVALID (addr <= 0!)."); 718 return OS_INVALID; 719 } 720 721 SEP_DRV_LOG_TRACE("Preparing to writing physical address: %llx (val: %llx).", addr, val); 722 offset = addr & ~PAGE_MASK; 723 aligned_addr = addr & PAGE_MASK; 724 SEP_DRV_LOG_TRACE("Aligned physical address: %llx, offset: %llx (val: %llx).", aligned_addr, offset, val); 725 726 base = ioremap(aligned_addr, PAGE_SIZE); 727 if (base == NULL) { 728 SEP_DRV_LOG_ERROR_TRACE_OUT("OS_INVALID (mapping failed!)."); 729 return OS_INVALID; 730 } 731 732 SEP_DRV_LOG_REGISTER_IN("Will write PCI address %u (mapped at %p): %llx.", addr, base + offset, val); 733 writel(val, base + offset); 734 SEP_DRV_LOG_REGISTER_OUT("Wrote PCI address %u (mapped at %p): %llx.", addr, base + offset, val); 735 736 iounmap(base); 737 738 SEP_DRV_LOG_TRACE_OUT("OS_SUCCESS."); 739 return OS_SUCCESS; 740 } 741 -- 0-DAY CI Kernel Test Service https://01.org/lkp