* [vireshk:virtio/msg-xen 10/18] drivers/virtio/virtio_msg_ffa_dma_ops.c:42:27: error: incompatible integer to pointer conversion passing 'u64' (aka 'unsigned long long') to parameter of type 'const void *'
@ 2024-12-12 22:30 kernel test robot
0 siblings, 0 replies; only message in thread
From: kernel test robot @ 2024-12-12 22:30 UTC (permalink / raw)
To: Viresh Kumar; +Cc: oe-kbuild-all
tree: https://git.kernel.org/pub/scm/linux/kernel/git/vireshk/linux.git virtio/msg-xen
head: 2fb1132cbfed1f9c19ee5b9856411f6da4558a51
commit: e454cdc8078f8c9be4e91ffe41adb1fa22ec96ee [10/18] virtio-msg: Add DMA OPs support
config: arm64-allmodconfig (https://download.01.org/0day-ci/archive/20241213/202412130650.ysV9xfoZ-lkp@intel.com/config)
compiler: clang version 18.1.8 (https://github.com/llvm/llvm-project 3b5b5c1ec4a3095ab096dd780e84d7ab81f3d7ff)
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20241213/202412130650.ysV9xfoZ-lkp@intel.com/reproduce)
If you fix the issue in a separate patch/commit (i.e. not just a new version of
the same patch/commit), kindly add following tags
| Reported-by: kernel test robot <lkp@intel.com>
| Closes: https://lore.kernel.org/oe-kbuild-all/202412130650.ysV9xfoZ-lkp@intel.com/
All errors (new ones prefixed by >>):
>> drivers/virtio/virtio_msg_ffa_dma_ops.c:42:27: error: incompatible integer to pointer conversion passing 'u64' (aka 'unsigned long long') to parameter of type 'const void *' [-Wint-conversion]
42 | pages[i] = virt_to_page((u64)vaddr + PAGE_SIZE * i);
| ~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~
arch/arm64/include/asm/memory.h:409:50: note: expanded from macro 'virt_to_page'
409 | #define virt_to_page(x) pfn_to_page(virt_to_pfn(x))
| ~~~~~~~~~~~~~~~~~~~~~~~~^~~
include/asm-generic/memory_model.h:37:40: note: expanded from macro '__pfn_to_page'
37 | #define __pfn_to_page(pfn) (vmemmap + (pfn))
| ^~~
arch/arm64/include/asm/memory.h:382:53: note: passing argument to parameter 'kaddr' here
382 | static inline unsigned long virt_to_pfn(const void *kaddr)
| ^
drivers/virtio/virtio_msg_ffa_dma_ops.c:110:27: error: incompatible integer to pointer conversion passing 'u64' (aka 'unsigned long long') to parameter of type 'const void *' [-Wint-conversion]
110 | pages[i] = virt_to_page((u64)vaddr + PAGE_SIZE * i);
| ~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~
arch/arm64/include/asm/memory.h:409:50: note: expanded from macro 'virt_to_page'
409 | #define virt_to_page(x) pfn_to_page(virt_to_pfn(x))
| ~~~~~~~~~~~~~~~~~~~~~~~~^~~
include/asm-generic/memory_model.h:37:40: note: expanded from macro '__pfn_to_page'
37 | #define __pfn_to_page(pfn) (vmemmap + (pfn))
| ^~~
arch/arm64/include/asm/memory.h:382:53: note: passing argument to parameter 'kaddr' here
382 | static inline unsigned long virt_to_pfn(const void *kaddr)
| ^
drivers/virtio/virtio_msg_ffa_dma_ops.c:185:17: warning: shift count >= width of type [-Wshift-count-overflow]
185 | return mask == DMA_BIT_MASK(64);
| ^~~~~~~~~~~~~~~~
include/linux/dma-mapping.h:77:54: note: expanded from macro 'DMA_BIT_MASK'
77 | #define DMA_BIT_MASK(n) (((n) == 64) ? ~0ULL : ((1ULL<<(n))-1))
| ^ ~~~
1 warning and 2 errors generated.
vim +42 drivers/virtio/virtio_msg_ffa_dma_ops.c
23
24 static void *virtio_msg_dma_alloc(struct device *dev, size_t size,
25 dma_addr_t *dma_handle, gfp_t gfp,
26 unsigned long attrs)
27 {
28 size_t n_pages = PFN_UP(size), i;
29 struct page **pages;
30 void *vaddr;
31 int ret;
32
33 pages = kmalloc(sizeof(*pages) * n_pages, GFP_KERNEL);
34 if (!pages)
35 return NULL;
36
37 vaddr = alloc_pages_exact(n_pages * PAGE_SIZE, gfp);
38 if (!vaddr)
39 goto out;
40
41 for (i = 0; i < n_pages; i++)
> 42 pages[i] = virt_to_page((u64)vaddr + PAGE_SIZE * i);
43
44 ret = vmsg_ffa_bus_area_share(dev, pages, n_pages, dma_handle);
45 if (ret) {
46 dev_err(dev, "%s: Failed to share area: %d", __func__, ret);
47 free_pages_exact(vaddr, n_pages * PAGE_SIZE);
48 vaddr = NULL;
49 }
50
51 out:
52 kfree(pages);
53 return vaddr;
54 }
55
--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2024-12-12 22:30 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-12-12 22:30 [vireshk:virtio/msg-xen 10/18] drivers/virtio/virtio_msg_ffa_dma_ops.c:42:27: error: incompatible integer to pointer conversion passing 'u64' (aka 'unsigned long long') to parameter of type 'const void *' kernel test robot
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.