lkml.org 
[lkml]   [2022]   [Jun]   [10]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
Subject[esmil:visionfive 33/54] drivers/dma/dw-axi-dmac-starfive/starfive_dmaengine_memcpy.c:38:27: warning: cast from pointer to integer of different size
tree:   https://github.com/esmil/linux visionfive
head: 906be7ef2fb9e2f1fcb740d3d506768cddfc52ca
commit: 6f7b441aa698d7dd9a8878ff241c10080561bf8e [33/54] dmaengine: Add dw-axi-dmac-starfive driver for JH7100
config: riscv-randconfig-s032-20220610 (https://download.01.org/0day-ci/archive/20220610/202206102138.ihQBkC9n-lkp@intel.com/config)
compiler: riscv32-linux-gcc (GCC) 11.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.4-30-g92122700-dirty
# https://github.com/esmil/linux/commit/6f7b441aa698d7dd9a8878ff241c10080561bf8e
git remote add esmil https://github.com/esmil/linux
git fetch --no-tags esmil visionfive
git checkout 6f7b441aa698d7dd9a8878ff241c10080561bf8e
# save the config file
mkdir build_dir && cp config build_dir/.config
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-11.3.0 make.cross C=1 CF='-fdiagnostic-prefix -D__CHECK_ENDIAN__' O=build_dir ARCH=riscv SHELL=/bin/bash drivers/dma/dw-axi-dmac-starfive/

If you fix the issue, kindly add following tag where applicable
Reported-by: kernel test robot <lkp@intel.com>

All warnings (new ones prefixed by >>):

drivers/dma/dw-axi-dmac-starfive/starfive_dmaengine_memcpy.c: In function 'dw_virt_to_phys':
>> drivers/dma/dw-axi-dmac-starfive/starfive_dmaengine_memcpy.c:38:27: warning: cast from pointer to integer of different size [-Wpointer-to-int-cast]
38 | u64 pfn_offset = ((u64)vaddr) & 0xfff;
| ^
drivers/dma/dw-axi-dmac-starfive/starfive_dmaengine_memcpy.c: In function 'dw_dma_async_do_memcpy':
drivers/dma/dw-axi-dmac-starfive/starfive_dmaengine_memcpy.c:153:9: error: implicit declaration of function 'iort_dma_setup' [-Werror=implicit-function-declaration]
153 | iort_dma_setup(dma_dev, &dma_addr, &dma_size);
| ^~~~~~~~~~~~~~
drivers/dma/dw-axi-dmac-starfive/starfive_dmaengine_memcpy.c:154:15: warning: assignment to 'const struct iommu_ops *' from 'int' makes pointer from integer without a cast [-Wint-conversion]
154 | iommu = iort_iommu_configure_id(dma_dev, NULL);
| ^
In file included from include/asm-generic/bug.h:22,
from arch/riscv/include/asm/bug.h:83,
from include/linux/bug.h:5,
from arch/riscv/include/asm/current.h:13,
from include/linux/mutex.h:14,
from include/linux/kernfs.h:11,
from include/linux/sysfs.h:16,
from include/linux/kobject.h:20,
from include/linux/of.h:17,
from include/linux/irqdomain.h:35,
from include/linux/acpi.h:13,
from include/linux/acpi_iort.h:10,
from drivers/dma/dw-axi-dmac-starfive/starfive_dmaengine_memcpy.c:16:
drivers/dma/dw-axi-dmac-starfive/starfive_dmaengine_memcpy.c:165:45: warning: cast from pointer to integer of different size [-Wpointer-to-int-cast]
165 | DMA_DEBUG("src=%#llx, dst=%#llx\n", (u64)src, (u64)dst);
| ^
include/linux/printk.h:447:33: note: in definition of macro 'printk_index_wrap'
447 | _p_func(_fmt, ##__VA_ARGS__); \
| ^~~~~~~~~~~
include/soc/starfive/jh7100_dma.h:13:9: note: in expansion of macro 'printk'
13 | printk("[DW_DMA_DEBUG] %s():%d \n" fmt, __func__, __LINE__, ##__VA_ARGS__)
| ^~~~~~
drivers/dma/dw-axi-dmac-starfive/starfive_dmaengine_memcpy.c:165:9: note: in expansion of macro 'DMA_DEBUG'
165 | DMA_DEBUG("src=%#llx, dst=%#llx\n", (u64)src, (u64)dst);
| ^~~~~~~~~
drivers/dma/dw-axi-dmac-starfive/starfive_dmaengine_memcpy.c:165:55: warning: cast from pointer to integer of different size [-Wpointer-to-int-cast]
165 | DMA_DEBUG("src=%#llx, dst=%#llx\n", (u64)src, (u64)dst);
| ^
include/linux/printk.h:447:33: note: in definition of macro 'printk_index_wrap'
447 | _p_func(_fmt, ##__VA_ARGS__); \
| ^~~~~~~~~~~
include/soc/starfive/jh7100_dma.h:13:9: note: in expansion of macro 'printk'
13 | printk("[DW_DMA_DEBUG] %s():%d \n" fmt, __func__, __LINE__, ##__VA_ARGS__)
| ^~~~~~
drivers/dma/dw-axi-dmac-starfive/starfive_dmaengine_memcpy.c:165:9: note: in expansion of macro 'DMA_DEBUG'
165 | DMA_DEBUG("src=%#llx, dst=%#llx\n", (u64)src, (u64)dst);
| ^~~~~~~~~
drivers/dma/dw-axi-dmac-starfive/starfive_dmaengine_memcpy.c: In function 'dw_dma_memcpy_raw':
drivers/dma/dw-axi-dmac-starfive/starfive_dmaengine_memcpy.c:224:15: warning: assignment to 'const struct iommu_ops *' from 'int' makes pointer from integer without a cast [-Wint-conversion]
224 | iommu = iort_iommu_configure_id(dma_dev, NULL);
| ^
In file included from include/asm-generic/bug.h:22,
from arch/riscv/include/asm/bug.h:83,
from include/linux/bug.h:5,
from arch/riscv/include/asm/current.h:13,
from include/linux/mutex.h:14,
from include/linux/kernfs.h:11,
from include/linux/sysfs.h:16,
from include/linux/kobject.h:20,
from include/linux/of.h:17,
from include/linux/irqdomain.h:35,
from include/linux/acpi.h:13,
from include/linux/acpi_iort.h:10,
from drivers/dma/dw-axi-dmac-starfive/starfive_dmaengine_memcpy.c:16:
>> include/soc/starfive/jh7100_dma.h:13:16: warning: format '%llx' expects argument of type 'long long unsigned int', but argument 4 has type 'dma_addr_t' {aka 'unsigned int'} [-Wformat=]
13 | printk("[DW_DMA_DEBUG] %s():%d \n" fmt, __func__, __LINE__, ##__VA_ARGS__)
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~
include/linux/printk.h:447:25: note: in definition of macro 'printk_index_wrap'
447 | _p_func(_fmt, ##__VA_ARGS__); \
| ^~~~
include/soc/starfive/jh7100_dma.h:13:9: note: in expansion of macro 'printk'
13 | printk("[DW_DMA_DEBUG] %s():%d \n" fmt, __func__, __LINE__, ##__VA_ARGS__)
| ^~~~~~
drivers/dma/dw-axi-dmac-starfive/starfive_dmaengine_memcpy.c:237:9: note: in expansion of macro 'DMA_DEBUG'
237 | DMA_DEBUG("src_dma=%#llx, dst_dma=%#llx \n", src_dma, dst_dma);
| ^~~~~~~~~
include/soc/starfive/jh7100_dma.h:13:16: warning: format '%llx' expects argument of type 'long long unsigned int', but argument 5 has type 'dma_addr_t' {aka 'unsigned int'} [-Wformat=]
13 | printk("[DW_DMA_DEBUG] %s():%d \n" fmt, __func__, __LINE__, ##__VA_ARGS__)
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~
include/linux/printk.h:447:25: note: in definition of macro 'printk_index_wrap'
447 | _p_func(_fmt, ##__VA_ARGS__); \
| ^~~~
include/soc/starfive/jh7100_dma.h:13:9: note: in expansion of macro 'printk'
13 | printk("[DW_DMA_DEBUG] %s():%d \n" fmt, __func__, __LINE__, ##__VA_ARGS__)
| ^~~~~~
drivers/dma/dw-axi-dmac-starfive/starfive_dmaengine_memcpy.c:237:9: note: in expansion of macro 'DMA_DEBUG'
237 | DMA_DEBUG("src_dma=%#llx, dst_dma=%#llx \n", src_dma, dst_dma);
| ^~~~~~~~~
cc1: some warnings being treated as errors


vim +38 drivers/dma/dw-axi-dmac-starfive/starfive_dmaengine_memcpy.c

35
36 u64 dw_virt_to_phys(void *vaddr)
37 {
> 38 u64 pfn_offset = ((u64)vaddr) & 0xfff;
39
40 return _dw_virt_to_phys((u64 *)vaddr) + pfn_offset;
41 }
42 EXPORT_SYMBOL(dw_virt_to_phys);
43

--
0-DAY CI Kernel Test Service
https://01.org/lkp

\
 
 \ /
  Last update: 2022-06-10 16:02    [W:0.032 / U:0.216 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site