[<prev] [next>] [day] [month] [year] [list]
Message-ID: <202208050606.obCObB8T-lkp@intel.com>
Date: Fri, 5 Aug 2022 06:59:47 +0800
From: kernel test robot <lkp@...el.com>
To: Deepak Kumar Singh <quic_deesin@...cinc.com>
Cc: kbuild-all@...ts.01.org, linux-kernel@...r.kernel.org,
Bjorn Andersson <bjorn.andersson@...aro.org>
Subject: drivers/soc/qcom/smem.c:648:22: sparse: sparse: incorrect type in
assignment (different address spaces)
tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head: c1c76700a0d6e6090ccfe1209527f14c21b6681b
commit: 20bb6c9de1b7e13f11d2ffe73686f4449c426807 soc: qcom: smem: map only partitions used by local HOST
date: 4 months ago
config: sh-randconfig-s041-20220804 (https://download.01.org/0day-ci/archive/20220805/202208050606.obCObB8T-lkp@intel.com/config)
compiler: sh4-linux-gcc (GCC) 12.1.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.4-39-gce1a6720-dirty
# https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=20bb6c9de1b7e13f11d2ffe73686f4449c426807
git remote add linus https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
git fetch --no-tags linus master
git checkout 20bb6c9de1b7e13f11d2ffe73686f4449c426807
# save the config file
mkdir build_dir && cp config build_dir/.config
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-12.1.0 make.cross C=1 CF='-fdiagnostic-prefix -D__CHECK_ENDIAN__' O=build_dir ARCH=sh SHELL=/bin/bash drivers/soc/qcom/
If you fix the issue, kindly add following tag where applicable
Reported-by: kernel test robot <lkp@...el.com>
sparse warnings: (new ones prefixed by >>)
drivers/soc/qcom/smem.c:422:16: sparse: sparse: incorrect type in assignment (different address spaces) @@ expected struct smem_header *header @@ got void [noderef] __iomem *virt_base @@
drivers/soc/qcom/smem.c:422:16: sparse: expected struct smem_header *header
drivers/soc/qcom/smem.c:422:16: sparse: got void [noderef] __iomem *virt_base
drivers/soc/qcom/smem.c:507:16: sparse: sparse: incorrect type in assignment (different address spaces) @@ expected struct smem_header *header @@ got void [noderef] __iomem *virt_base @@
drivers/soc/qcom/smem.c:507:16: sparse: expected struct smem_header *header
drivers/soc/qcom/smem.c:507:16: sparse: got void [noderef] __iomem *virt_base
drivers/soc/qcom/smem.c:520:50: sparse: sparse: incorrect type in return expression (different address spaces) @@ expected void * @@ got void [noderef] __iomem * @@
drivers/soc/qcom/smem.c:520:50: sparse: expected void *
drivers/soc/qcom/smem.c:520:50: sparse: got void [noderef] __iomem *
>> drivers/soc/qcom/smem.c:648:22: sparse: sparse: incorrect type in assignment (different address spaces) @@ expected struct smem_partition_header *phdr @@ got void [noderef] __iomem *virt_base @@
drivers/soc/qcom/smem.c:648:22: sparse: expected struct smem_partition_header *phdr
drivers/soc/qcom/smem.c:648:22: sparse: got void [noderef] __iomem *virt_base
drivers/soc/qcom/smem.c:653:22: sparse: sparse: incorrect type in assignment (different address spaces) @@ expected struct smem_partition_header *phdr @@ got void [noderef] __iomem *virt_base @@
drivers/soc/qcom/smem.c:653:22: sparse: expected struct smem_partition_header *phdr
drivers/soc/qcom/smem.c:653:22: sparse: got void [noderef] __iomem *virt_base
drivers/soc/qcom/smem.c:657:24: sparse: sparse: incorrect type in assignment (different address spaces) @@ expected struct smem_header *header @@ got void [noderef] __iomem *virt_base @@
drivers/soc/qcom/smem.c:657:24: sparse: expected struct smem_header *header
drivers/soc/qcom/smem.c:657:24: sparse: got void [noderef] __iomem *virt_base
drivers/soc/qcom/smem.c:667:30: sparse: sparse: incompatible types in comparison expression (different address spaces):
drivers/soc/qcom/smem.c:667:30: sparse: void *
drivers/soc/qcom/smem.c:667:30: sparse: void [noderef] __iomem *
drivers/soc/qcom/smem.c:688:36: sparse: sparse: subtraction of different types can't work (different address spaces)
drivers/soc/qcom/smem.c:697:28: sparse: sparse: subtraction of different types can't work (different address spaces)
drivers/soc/qcom/smem.c:706:36: sparse: sparse: subtraction of different types can't work (different address spaces)
drivers/soc/qcom/smem.c:721:16: sparse: sparse: incorrect type in assignment (different address spaces) @@ expected struct smem_header *header @@ got void [noderef] __iomem *virt_base @@
drivers/soc/qcom/smem.c:721:16: sparse: expected struct smem_header *header
drivers/soc/qcom/smem.c:721:16: sparse: got void [noderef] __iomem *virt_base
drivers/soc/qcom/smem.c:754:57: sparse: sparse: restricted __le32 degrades to integer
drivers/soc/qcom/smem.c:775:16: sparse: sparse: incorrect type in assignment (different address spaces) @@ expected struct smem_partition_header *header @@ got void [noderef] __iomem * @@
drivers/soc/qcom/smem.c:775:16: sparse: expected struct smem_partition_header *header
drivers/soc/qcom/smem.c:775:16: sparse: got void [noderef] __iomem *
drivers/soc/qcom/smem.c:926:22: sparse: sparse: incorrect type in assignment (different address spaces) @@ expected struct smem_ptable *ptable @@ got void [noderef] __iomem * @@
drivers/soc/qcom/smem.c:926:22: sparse: expected struct smem_ptable *ptable
drivers/soc/qcom/smem.c:926:22: sparse: got void [noderef] __iomem *
drivers/soc/qcom/smem.c:1035:16: sparse: sparse: incorrect type in assignment (different address spaces) @@ expected struct smem_header *header @@ got void [noderef] __iomem *virt_base @@
drivers/soc/qcom/smem.c:1035:16: sparse: expected struct smem_header *header
drivers/soc/qcom/smem.c:1035:16: sparse: got void [noderef] __iomem *virt_base
>> drivers/soc/qcom/smem.c:1056:16: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected void const volatile [noderef] __iomem *ptr @@ got restricted __le32 * @@
drivers/soc/qcom/smem.c:1056:16: sparse: expected void const volatile [noderef] __iomem *ptr
drivers/soc/qcom/smem.c:1056:16: sparse: got restricted __le32 *
drivers/soc/qcom/smem.c:1056:52: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected void const volatile [noderef] __iomem *ptr @@ got restricted __le32 * @@
drivers/soc/qcom/smem.c:1056:52: sparse: expected void const volatile [noderef] __iomem *ptr
drivers/soc/qcom/smem.c:1056:52: sparse: got restricted __le32 *
vim +648 drivers/soc/qcom/smem.c
628
629 /**
630 * qcom_smem_get_free_space() - retrieve amount of free space in a partition
631 * @host: the remote processor identifying a partition, or -1
632 *
633 * To be used by smem clients as a quick way to determine if any new
634 * allocations has been made.
635 */
636 int qcom_smem_get_free_space(unsigned host)
637 {
638 struct smem_partition *part;
639 struct smem_partition_header *phdr;
640 struct smem_header *header;
641 unsigned ret;
642
643 if (!__smem)
644 return -EPROBE_DEFER;
645
646 if (host < SMEM_HOST_COUNT && __smem->partitions[host].virt_base) {
647 part = &__smem->partitions[host];
> 648 phdr = part->virt_base;
649 ret = le32_to_cpu(phdr->offset_free_cached) -
650 le32_to_cpu(phdr->offset_free_uncached);
651 } else if (__smem->global_partition.virt_base) {
652 part = &__smem->global_partition;
653 phdr = part->virt_base;
654 ret = le32_to_cpu(phdr->offset_free_cached) -
655 le32_to_cpu(phdr->offset_free_uncached);
656 } else {
657 header = __smem->regions[0].virt_base;
658 ret = le32_to_cpu(header->available);
659 }
660
661 return ret;
662 }
663 EXPORT_SYMBOL(qcom_smem_get_free_space);
664
--
0-DAY CI Kernel Test Service
https://01.org/lkp
Powered by blists - more mailing lists