[csky-linux:linux-5.13-riscv-dma-coherent-D1-v2-of-delay-cpu-available 3/9] arch/riscv/mm/dma-mapping.c:21:29: warning: implicit conversion from 'enum dma_data_direction' to 'enum sbi_dma_sync_data_direction'

From: kernel test robot
Date: Wed Aug 04 2021 - 22:06:23 EST


tree: https://github.com/c-sky/csky-linux linux-5.13-riscv-dma-coherent-D1-v2-of-delay-cpu-available
head: d8e92b2777156e87a83f4cb71f5587ad924ad215
commit: 791a7ed07822caea9dcbb7ed0e4c28c3a4ce3674 [3/9] riscv: Add SYNC_DMA_FOR_CPU/DEVICE for DMA_COHERENT
config: riscv-allyesconfig (attached as .config)
compiler: riscv64-linux-gcc (GCC) 10.3.0
reproduce (this is a W=1 build):
wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
chmod +x ~/bin/make.cross
# https://github.com/c-sky/csky-linux/commit/791a7ed07822caea9dcbb7ed0e4c28c3a4ce3674
git remote add csky-linux https://github.com/c-sky/csky-linux
git fetch --no-tags csky-linux linux-5.13-riscv-dma-coherent-D1-v2-of-delay-cpu-available
git checkout 791a7ed07822caea9dcbb7ed0e4c28c3a4ce3674
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-10.3.0 make.cross ARCH=riscv

If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@xxxxxxxxx>

All warnings (new ones prefixed by >>):

arch/riscv/mm/dma-mapping.c: In function 'arch_sync_dma_for_device':
>> arch/riscv/mm/dma-mapping.c:21:29: warning: implicit conversion from 'enum dma_data_direction' to 'enum sbi_dma_sync_data_direction' [-Wenum-conversion]
21 | sbi_dma_sync(paddr, size, dir);
| ^~~
arch/riscv/mm/dma-mapping.c: In function 'arch_sync_dma_for_cpu':
arch/riscv/mm/dma-mapping.c:36:29: warning: implicit conversion from 'enum dma_data_direction' to 'enum sbi_dma_sync_data_direction' [-Wenum-conversion]
36 | sbi_dma_sync(paddr, size, dir);
| ^~~


vim +21 arch/riscv/mm/dma-mapping.c

13
14 void arch_sync_dma_for_device(phys_addr_t paddr, size_t size,
15 enum dma_data_direction dir)
16 {
17 switch (dir) {
18 case DMA_TO_DEVICE:
19 case DMA_FROM_DEVICE:
20 case DMA_BIDIRECTIONAL:
> 21 sbi_dma_sync(paddr, size, dir);
22 break;
23 default:
24 BUG();
25 }
26 }
27

---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@xxxxxxxxxxxx

Attachment: .config.gz
Description: application/gzip