[<prev] [next>] [day] [month] [year] [list]
Message-ID: <202007040754.nRSsPQcb%lkp@intel.com>
Date: Sat, 4 Jul 2020 07:16:58 +0800
From: kernel test robot <lkp@...el.com>
To: Luc Van Oostenryck <luc.vanoostenryck@...il.com>
Cc: kbuild-all@...ts.01.org, linux-kernel@...r.kernel.org
Subject: drivers/dma/at_hdmac.c:941:15: sparse: sparse: incorrect type in
assignment (different address spaces)
tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head: 0c7d7d1fada70420851b63f2e2669cb4976a303b
commit: 670d0a4b10704667765f7d18f7592993d02783aa sparse: use identifiers to define address spaces
date: 2 weeks ago
config: arm-randconfig-s031-20200703 (attached as .config)
compiler: arm-linux-gnueabi-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.2-3-gfa153962-dirty
git checkout 670d0a4b10704667765f7d18f7592993d02783aa
# 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__' ARCH=arm
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@...el.com>
sparse warnings: (new ones prefixed by >>)
>> drivers/dma/at_hdmac.c:941:15: sparse: sparse: incorrect type in assignment (different address spaces) @@ expected void [noderef] __iomem *vaddr @@ got void * @@
>> drivers/dma/at_hdmac.c:941:15: sparse: expected void [noderef] __iomem *vaddr
drivers/dma/at_hdmac.c:941:15: sparse: got void *
>> drivers/dma/at_hdmac.c:947:11: sparse: sparse: cast removes address space '__iomem' of expression
>> drivers/dma/at_hdmac.c:957:28: sparse: sparse: incorrect type in assignment (different address spaces) @@ expected int *memset_vaddr @@ got void [noderef] __iomem *vaddr @@
drivers/dma/at_hdmac.c:957:28: sparse: expected int *memset_vaddr
>> drivers/dma/at_hdmac.c:957:28: sparse: got void [noderef] __iomem *vaddr
>> drivers/dma/at_hdmac.c:971:43: sparse: sparse: incorrect type in argument 2 (different address spaces) @@ expected void *vaddr @@ got void [noderef] __iomem *vaddr @@
drivers/dma/at_hdmac.c:971:43: sparse: expected void *vaddr
drivers/dma/at_hdmac.c:971:43: sparse: got void [noderef] __iomem *vaddr
drivers/dma/at_hdmac.c:999:15: sparse: sparse: incorrect type in assignment (different address spaces) @@ expected void [noderef] __iomem *vaddr @@ got void * @@
drivers/dma/at_hdmac.c:999:15: sparse: expected void [noderef] __iomem *vaddr
drivers/dma/at_hdmac.c:999:15: sparse: got void *
drivers/dma/at_hdmac.c:1005:11: sparse: sparse: cast removes address space '__iomem' of expression
drivers/dma/at_hdmac.c:1034:28: sparse: sparse: incorrect type in assignment (different address spaces) @@ expected int *memset_vaddr @@ got void [noderef] __iomem *vaddr @@
drivers/dma/at_hdmac.c:1034:28: sparse: expected int *memset_vaddr
drivers/dma/at_hdmac.c:1034:28: sparse: got void [noderef] __iomem *vaddr
vim +941 drivers/dma/at_hdmac.c
ce2a673d66b2ca Maxime Ripard 2015-10-22 909
4d112426c3446d Maxime Ripard 2015-08-24 910 /**
4d112426c3446d Maxime Ripard 2015-08-24 911 * atc_prep_dma_memset - prepare a memcpy operation
4d112426c3446d Maxime Ripard 2015-08-24 912 * @chan: the channel to prepare operation on
4d112426c3446d Maxime Ripard 2015-08-24 913 * @dest: operation virtual destination address
4d112426c3446d Maxime Ripard 2015-08-24 914 * @value: value to set memory buffer to
4d112426c3446d Maxime Ripard 2015-08-24 915 * @len: operation length
4d112426c3446d Maxime Ripard 2015-08-24 916 * @flags: tx descriptor status flags
4d112426c3446d Maxime Ripard 2015-08-24 917 */
4d112426c3446d Maxime Ripard 2015-08-24 918 static struct dma_async_tx_descriptor *
4d112426c3446d Maxime Ripard 2015-08-24 919 atc_prep_dma_memset(struct dma_chan *chan, dma_addr_t dest, int value,
4d112426c3446d Maxime Ripard 2015-08-24 920 size_t len, unsigned long flags)
4d112426c3446d Maxime Ripard 2015-08-24 921 {
4d112426c3446d Maxime Ripard 2015-08-24 922 struct at_dma *atdma = to_at_dma(chan->device);
ce2a673d66b2ca Maxime Ripard 2015-10-22 923 struct at_desc *desc;
ce2a673d66b2ca Maxime Ripard 2015-10-22 924 void __iomem *vaddr;
ce2a673d66b2ca Maxime Ripard 2015-10-22 925 dma_addr_t paddr;
4d112426c3446d Maxime Ripard 2015-08-24 926
2c5d7407e01272 Arnd Bergmann 2015-11-12 927 dev_vdbg(chan2dev(chan), "%s: d%pad v0x%x l0x%zx f0x%lx\n", __func__,
2c5d7407e01272 Arnd Bergmann 2015-11-12 928 &dest, value, len, flags);
4d112426c3446d Maxime Ripard 2015-08-24 929
4d112426c3446d Maxime Ripard 2015-08-24 930 if (unlikely(!len)) {
4d112426c3446d Maxime Ripard 2015-08-24 931 dev_dbg(chan2dev(chan), "%s: length is zero!\n", __func__);
4d112426c3446d Maxime Ripard 2015-08-24 932 return NULL;
4d112426c3446d Maxime Ripard 2015-08-24 933 }
4d112426c3446d Maxime Ripard 2015-08-24 934
4d112426c3446d Maxime Ripard 2015-08-24 935 if (!is_dma_fill_aligned(chan->device, dest, 0, len)) {
4d112426c3446d Maxime Ripard 2015-08-24 936 dev_dbg(chan2dev(chan), "%s: buffer is not aligned\n",
4d112426c3446d Maxime Ripard 2015-08-24 937 __func__);
4d112426c3446d Maxime Ripard 2015-08-24 938 return NULL;
4d112426c3446d Maxime Ripard 2015-08-24 939 }
4d112426c3446d Maxime Ripard 2015-08-24 940
247b4d83d6525d Tudor Ambarus 2020-01-23 @941 vaddr = dma_pool_alloc(atdma->memset_pool, GFP_NOWAIT, &paddr);
ce2a673d66b2ca Maxime Ripard 2015-10-22 942 if (!vaddr) {
ce2a673d66b2ca Maxime Ripard 2015-10-22 943 dev_err(chan2dev(chan), "%s: couldn't allocate buffer\n",
4d112426c3446d Maxime Ripard 2015-08-24 944 __func__);
4d112426c3446d Maxime Ripard 2015-08-24 945 return NULL;
4d112426c3446d Maxime Ripard 2015-08-24 946 }
ce2a673d66b2ca Maxime Ripard 2015-10-22 @947 *(u32*)vaddr = value;
4d112426c3446d Maxime Ripard 2015-08-24 948
ce2a673d66b2ca Maxime Ripard 2015-10-22 949 desc = atc_create_memset_desc(chan, paddr, dest, len);
4d112426c3446d Maxime Ripard 2015-08-24 950 if (!desc) {
ce2a673d66b2ca Maxime Ripard 2015-10-22 951 dev_err(chan2dev(chan), "%s: couldn't get a descriptor\n",
4d112426c3446d Maxime Ripard 2015-08-24 952 __func__);
ce2a673d66b2ca Maxime Ripard 2015-10-22 953 goto err_free_buffer;
4d112426c3446d Maxime Ripard 2015-08-24 954 }
4d112426c3446d Maxime Ripard 2015-08-24 955
ce2a673d66b2ca Maxime Ripard 2015-10-22 956 desc->memset_paddr = paddr;
ce2a673d66b2ca Maxime Ripard 2015-10-22 @957 desc->memset_vaddr = vaddr;
ce2a673d66b2ca Maxime Ripard 2015-10-22 958 desc->memset_buffer = true;
4d112426c3446d Maxime Ripard 2015-08-24 959
4d112426c3446d Maxime Ripard 2015-08-24 960 desc->txd.cookie = -EBUSY;
4d112426c3446d Maxime Ripard 2015-08-24 961 desc->total_len = len;
4d112426c3446d Maxime Ripard 2015-08-24 962
4d112426c3446d Maxime Ripard 2015-08-24 963 /* set end-of-link on the descriptor */
4d112426c3446d Maxime Ripard 2015-08-24 964 set_desc_eol(desc);
4d112426c3446d Maxime Ripard 2015-08-24 965
4d112426c3446d Maxime Ripard 2015-08-24 966 desc->txd.flags = flags;
4d112426c3446d Maxime Ripard 2015-08-24 967
4d112426c3446d Maxime Ripard 2015-08-24 968 return &desc->txd;
4d112426c3446d Maxime Ripard 2015-08-24 969
ce2a673d66b2ca Maxime Ripard 2015-10-22 970 err_free_buffer:
ce2a673d66b2ca Maxime Ripard 2015-10-22 @971 dma_pool_free(atdma->memset_pool, vaddr, paddr);
4d112426c3446d Maxime Ripard 2015-08-24 972 return NULL;
4d112426c3446d Maxime Ripard 2015-08-24 973 }
4d112426c3446d Maxime Ripard 2015-08-24 974
:::::: The code at line 941 was first introduced by commit
:::::: 247b4d83d6525d04278333cf201d6e3b066c9ca5 dmaengine: at_hdmac: Switch atomic allocations to GFP_NOWAIT
:::::: TO: Tudor Ambarus <tudor.ambarus@...rochip.com>
:::::: CC: Vinod Koul <vkoul@...nel.org>
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
Download attachment ".config.gz" of type "application/gzip" (25700 bytes)
Powered by blists - more mailing lists