* [ribalda:uvc-noncontiguous 5/5] drivers/media/usb/uvc/uvc_video.c:1763:17: warning: incompatible integer to pointer conversion assigning to 'struct page from 'int'
@ 2020-11-18 13:41 kernel test robot
0 siblings, 0 replies; only message in thread
From: kernel test robot @ 2020-11-18 13:41 UTC (permalink / raw)
To: kbuild-all
[-- Attachment #1: Type: text/plain, Size: 5034 bytes --]
tree: https://github.com/ribalda/linux uvc-noncontiguous
head: 08aff4b45dd51b3dfba18af4aa40b0fa5e2b5529
commit: 08aff4b45dd51b3dfba18af4aa40b0fa5e2b5529 [5/5] WIP media: uvc: Use dma_alloc_noncontiguos API
config: powerpc64-randconfig-r011-20201118 (attached as .config)
compiler: clang version 12.0.0 (https://github.com/llvm/llvm-project b2613fb2f0f53691dd0211895afbb9413457fca7)
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
# install powerpc64 cross compiling tool for clang build
# apt-get install binutils-powerpc64-linux-gnu
# https://github.com/ribalda/linux/commit/08aff4b45dd51b3dfba18af4aa40b0fa5e2b5529
git remote add ribalda https://github.com/ribalda/linux
git fetch --no-tags ribalda uvc-noncontiguous
git checkout 08aff4b45dd51b3dfba18af4aa40b0fa5e2b5529
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross ARCH=powerpc64
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@intel.com>
All warnings (new ones prefixed by >>):
drivers/media/usb/uvc/uvc_video.c:910:8: warning: no previous prototype for function 'uvc_video_dump_time_stats' [-Wmissing-prototypes]
size_t uvc_video_dump_time_stats(char *buf, size_t size,
^
drivers/media/usb/uvc/uvc_video.c:910:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
size_t uvc_video_dump_time_stats(char *buf, size_t size,
^
static
drivers/media/usb/uvc/uvc_video.c:931:8: warning: no previous prototype for function 'uvc_video_dump_speed' [-Wmissing-prototypes]
size_t uvc_video_dump_speed(char *buf, size_t size, const char *pfx, u64 bytes,
^
drivers/media/usb/uvc/uvc_video.c:931:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
size_t uvc_video_dump_speed(char *buf, size_t size, const char *pfx, u64 bytes,
^
static
drivers/media/usb/uvc/uvc_video.c:1738:4: error: implicit declaration of function 'dma_free_noncontiguous' [-Werror,-Wimplicit-function-declaration]
dma_free_noncontiguous(stream_to_dmadev(stream),
^
drivers/media/usb/uvc/uvc_video.c:1757:7: error: implicit declaration of function 'dma_can_alloc_noncontiguous' [-Werror,-Wimplicit-function-declaration]
if (!dma_can_alloc_noncontiguous(dma_dev)) {
^
drivers/media/usb/uvc/uvc_video.c:1763:19: error: implicit declaration of function 'dma_alloc_noncontiguous' [-Werror,-Wimplicit-function-declaration]
uvc_urb->pages = dma_alloc_noncontiguous(dma_dev, stream->urb_size,
^
drivers/media/usb/uvc/uvc_video.c:1763:19: note: did you mean 'dma_can_alloc_noncontiguous'?
drivers/media/usb/uvc/uvc_video.c:1757:7: note: 'dma_can_alloc_noncontiguous' declared here
if (!dma_can_alloc_noncontiguous(dma_dev)) {
^
>> drivers/media/usb/uvc/uvc_video.c:1763:17: warning: incompatible integer to pointer conversion assigning to 'struct page **' from 'int' [-Wint-conversion]
uvc_urb->pages = dma_alloc_noncontiguous(dma_dev, stream->urb_size,
^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
drivers/media/usb/uvc/uvc_video.c:1771:3: error: implicit declaration of function 'dma_free_noncontiguous' [-Werror,-Wimplicit-function-declaration]
dma_free_noncontiguous(dma_dev, stream->urb_size, uvc_urb->pages, uvc_urb->dma);
^
3 warnings and 4 errors generated.
vim +1763 drivers/media/usb/uvc/uvc_video.c
1751
1752 static bool uvc_alloc_urb_buffer(struct uvc_streaming *stream, struct uvc_urb *uvc_urb,
1753 gfp_t gfp_flags)
1754 {
1755 struct device *dma_dev = stream_to_dmadev(stream);
1756
1757 if (!dma_can_alloc_noncontiguous(dma_dev)) {
1758 uvc_urb->buffer = usb_alloc_coherent(stream->dev->udev, stream->urb_size,
1759 gfp_flags | __GFP_NOWARN, &uvc_urb->dma);
1760 return uvc_urb->buffer != NULL;
1761 }
1762
> 1763 uvc_urb->pages = dma_alloc_noncontiguous(dma_dev, stream->urb_size,
1764 &uvc_urb->dma, gfp_flags | __GFP_NOWARN, 0);
1765 if (!uvc_urb->pages)
1766 return false;
1767
1768 uvc_urb->buffer = vmap(uvc_urb->pages, PAGE_ALIGN(stream->urb_size) >> PAGE_SHIFT,
1769 VM_DMA_COHERENT, PAGE_KERNEL);
1770 if (!uvc_urb->buffer) {
1771 dma_free_noncontiguous(dma_dev, stream->urb_size, uvc_urb->pages, uvc_urb->dma);
1772 return false;
1773 }
1774
1775 return true;
1776 }
1777
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all(a)lists.01.org
[-- Attachment #2: config.gz --]
[-- Type: application/gzip, Size: 44777 bytes --]
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2020-11-18 13:41 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-11-18 13:41 [ribalda:uvc-noncontiguous 5/5] drivers/media/usb/uvc/uvc_video.c:1763:17: warning: incompatible integer to pointer conversion assigning to 'struct page from 'int' 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.