Hi Laurent, I love your patch! Perhaps something to improve: [auto build test WARNING on linuxtv-media/master] [also build test WARNING on v4.17-rc2 next-20180426] [if your patch is applied to the wrong git tree, please drop us a note to help improve the system] url: https://github.com/0day-ci/linux/commits/Laurent-Pinchart/media-vb2-Print-the-queue-pointer-in-debug-messages/20180428-184113 base: git://linuxtv.org/media_tree.git master config: i386-randconfig-a1-201816 (attached as .config) compiler: gcc-4.9 (Debian 4.9.4-2) 4.9.4 reproduce: # save the attached .config to linux build tree make ARCH=i386 All warnings (new ones prefixed by >>): drivers/media/common/videobuf2/videobuf2-core.c: In function '__vb2_buf_mem_alloc': >> drivers/media/common/videobuf2/videobuf2-core.c:72:9: warning: format '%p' expects argument of type 'void *', but argument 4 has type 'unsigned int' [-Wformat=] struct vb2_queue *_q = (vb)->vb2_queue; \ ^ drivers/media/common/videobuf2/videobuf2-core.c:210:14: note: in expansion of macro 'call_ptr_memop' mem_priv = call_ptr_memop(vb, alloc, ^ >> drivers/media/common/videobuf2/videobuf2-core.c:72:9: warning: format '%d' expects argument of type 'int', but argument 5 has type 'char *' [-Wformat=] struct vb2_queue *_q = (vb)->vb2_queue; \ ^ drivers/media/common/videobuf2/videobuf2-core.c:210:14: note: in expansion of macro 'call_ptr_memop' mem_priv = call_ptr_memop(vb, alloc, ^ >> drivers/media/common/videobuf2/videobuf2-core.c:72:9: warning: format '%s' expects a matching 'char *' argument [-Wformat=] struct vb2_queue *_q = (vb)->vb2_queue; \ ^ drivers/media/common/videobuf2/videobuf2-core.c:210:14: note: in expansion of macro 'call_ptr_memop' mem_priv = call_ptr_memop(vb, alloc, ^ drivers/media/common/videobuf2/videobuf2-core.c:84:9: warning: format '%p' expects argument of type 'void *', but argument 4 has type 'unsigned int' [-Wformat=] struct vb2_queue *_q = (vb)->vb2_queue; \ ^ drivers/media/common/videobuf2/videobuf2-core.c:227:3: note: in expansion of macro 'call_void_memop' call_void_memop(vb, put, vb->planes[plane - 1].mem_priv); ^ drivers/media/common/videobuf2/videobuf2-core.c:84:9: warning: format '%d' expects argument of type 'int', but argument 5 has type 'char *' [-Wformat=] struct vb2_queue *_q = (vb)->vb2_queue; \ ^ drivers/media/common/videobuf2/videobuf2-core.c:227:3: note: in expansion of macro 'call_void_memop' call_void_memop(vb, put, vb->planes[plane - 1].mem_priv); ^ drivers/media/common/videobuf2/videobuf2-core.c:84:9: warning: format '%s' expects a matching 'char *' argument [-Wformat=] struct vb2_queue *_q = (vb)->vb2_queue; \ ^ drivers/media/common/videobuf2/videobuf2-core.c:227:3: note: in expansion of macro 'call_void_memop' call_void_memop(vb, put, vb->planes[plane - 1].mem_priv); ^ drivers/media/common/videobuf2/videobuf2-core.c: In function '__vb2_buf_mem_free': drivers/media/common/videobuf2/videobuf2-core.c:84:9: warning: format '%p' expects argument of type 'void *', but argument 4 has type 'unsigned int' [-Wformat=] struct vb2_queue *_q = (vb)->vb2_queue; \ ^ drivers/media/common/videobuf2/videobuf2-core.c:242:3: note: in expansion of macro 'call_void_memop' call_void_memop(vb, put, vb->planes[plane].mem_priv); ^ drivers/media/common/videobuf2/videobuf2-core.c:84:9: warning: format '%d' expects argument of type 'int', but argument 5 has type 'char *' [-Wformat=] struct vb2_queue *_q = (vb)->vb2_queue; \ ^ drivers/media/common/videobuf2/videobuf2-core.c:242:3: note: in expansion of macro 'call_void_memop' call_void_memop(vb, put, vb->planes[plane].mem_priv); ^ drivers/media/common/videobuf2/videobuf2-core.c:84:9: warning: format '%s' expects a matching 'char *' argument [-Wformat=] struct vb2_queue *_q = (vb)->vb2_queue; \ ^ drivers/media/common/videobuf2/videobuf2-core.c:242:3: note: in expansion of macro 'call_void_memop' call_void_memop(vb, put, vb->planes[plane].mem_priv); ^ drivers/media/common/videobuf2/videobuf2-core.c: In function '__vb2_buf_userptr_put': drivers/media/common/videobuf2/videobuf2-core.c:84:9: warning: format '%p' expects argument of type 'void *', but argument 4 has type 'unsigned int' [-Wformat=] struct vb2_queue *_q = (vb)->vb2_queue; \ ^ drivers/media/common/videobuf2/videobuf2-core.c:259:4: note: in expansion of macro 'call_void_memop' call_void_memop(vb, put_userptr, vb->planes[plane].mem_priv); ^ drivers/media/common/videobuf2/videobuf2-core.c:84:9: warning: format '%d' expects argument of type 'int', but argument 5 has type 'char *' [-Wformat=] struct vb2_queue *_q = (vb)->vb2_queue; \ ^ drivers/media/common/videobuf2/videobuf2-core.c:259:4: note: in expansion of macro 'call_void_memop' call_void_memop(vb, put_userptr, vb->planes[plane].mem_priv); ^ drivers/media/common/videobuf2/videobuf2-core.c:84:9: warning: format '%s' expects a matching 'char *' argument [-Wformat=] struct vb2_queue *_q = (vb)->vb2_queue; \ ^ drivers/media/common/videobuf2/videobuf2-core.c:259:4: note: in expansion of macro 'call_void_memop' call_void_memop(vb, put_userptr, vb->planes[plane].mem_priv); ^ drivers/media/common/videobuf2/videobuf2-core.c: In function '__vb2_plane_dmabuf_put': drivers/media/common/videobuf2/videobuf2-core.c:84:9: warning: format '%p' expects argument of type 'void *', but argument 4 has type 'unsigned int' [-Wformat=] struct vb2_queue *_q = (vb)->vb2_queue; \ ^ drivers/media/common/videobuf2/videobuf2-core.c:274:3: note: in expansion of macro 'call_void_memop' call_void_memop(vb, unmap_dmabuf, p->mem_priv); ^ drivers/media/common/videobuf2/videobuf2-core.c:84:9: warning: format '%d' expects argument of type 'int', but argument 5 has type 'char *' [-Wformat=] struct vb2_queue *_q = (vb)->vb2_queue; \ ^ drivers/media/common/videobuf2/videobuf2-core.c:274:3: note: in expansion of macro 'call_void_memop' call_void_memop(vb, unmap_dmabuf, p->mem_priv); ^ drivers/media/common/videobuf2/videobuf2-core.c:84:9: warning: format '%s' expects a matching 'char *' argument [-Wformat=] struct vb2_queue *_q = (vb)->vb2_queue; \ ^ drivers/media/common/videobuf2/videobuf2-core.c:274:3: note: in expansion of macro 'call_void_memop' call_void_memop(vb, unmap_dmabuf, p->mem_priv); ^ drivers/media/common/videobuf2/videobuf2-core.c:84:9: warning: format '%p' expects argument of type 'void *', but argument 4 has type 'unsigned int' [-Wformat=] struct vb2_queue *_q = (vb)->vb2_queue; \ ^ drivers/media/common/videobuf2/videobuf2-core.c:276:2: note: in expansion of macro 'call_void_memop' call_void_memop(vb, detach_dmabuf, p->mem_priv); ^ drivers/media/common/videobuf2/videobuf2-core.c:84:9: warning: format '%d' expects argument of type 'int', but argument 5 has type 'char *' [-Wformat=] struct vb2_queue *_q = (vb)->vb2_queue; \ ^ drivers/media/common/videobuf2/videobuf2-core.c:276:2: note: in expansion of macro 'call_void_memop' call_void_memop(vb, detach_dmabuf, p->mem_priv); ^ drivers/media/common/videobuf2/videobuf2-core.c:84:9: warning: format '%s' expects a matching 'char *' argument [-Wformat=] struct vb2_queue *_q = (vb)->vb2_queue; \ ^ drivers/media/common/videobuf2/videobuf2-core.c:276:2: note: in expansion of macro 'call_void_memop' call_void_memop(vb, detach_dmabuf, p->mem_priv); ^ drivers/media/common/videobuf2/videobuf2-core.c: In function '__vb2_queue_alloc': drivers/media/common/videobuf2/videobuf2-core.c:378:4: warning: format '%p' expects argument of type 'void *', but argument 4 has type 'unsigned int' [-Wformat=] ret = call_vb_qop(vb, buf_init, vb); ^ drivers/media/common/videobuf2/videobuf2-core.c:378:4: warning: format '%d' expects argument of type 'int', but argument 5 has type 'char *' [-Wformat=] drivers/media/common/videobuf2/videobuf2-core.c:378:4: warning: format '%s' expects a matching 'char *' argument [-Wformat=] drivers/media/common/videobuf2/videobuf2-core.c: In function '__vb2_queue_free': drivers/media/common/videobuf2/videobuf2-core.c:453:4: warning: format '%p' expects argument of type 'void *', but argument 4 has type 'unsigned int' [-Wformat=] call_void_vb_qop(vb, buf_cleanup, vb); ^ drivers/media/common/videobuf2/videobuf2-core.c:453:4: warning: format '%d' expects argument of type 'int', but argument 5 has type 'char *' [-Wformat=] drivers/media/common/videobuf2/videobuf2-core.c:453:4: warning: format '%s' expects a matching 'char *' argument [-Wformat=] drivers/media/common/videobuf2/videobuf2-core.c: In function 'vb2_buffer_in_use': drivers/media/common/videobuf2/videobuf2-core.c:60:9: warning: format '%p' expects argument of type 'void *', but argument 4 has type 'unsigned int' [-Wformat=] struct vb2_queue *_q = (vb)->vb2_queue; \ ^ drivers/media/common/videobuf2/videobuf2-core.c:547:19: note: in expansion of macro 'call_memop' if (mem_priv && call_memop(vb, num_users, mem_priv) > 1) ^ drivers/media/common/videobuf2/videobuf2-core.c:60:9: warning: format '%d' expects argument of type 'int', but argument 5 has type 'char *' [-Wformat=] struct vb2_queue *_q = (vb)->vb2_queue; \ ^ drivers/media/common/videobuf2/videobuf2-core.c:547:19: note: in expansion of macro 'call_memop' if (mem_priv && call_memop(vb, num_users, mem_priv) > 1) ^ drivers/media/common/videobuf2/videobuf2-core.c:60:9: warning: format '%s' expects a matching 'char *' argument [-Wformat=] struct vb2_queue *_q = (vb)->vb2_queue; \ ^ drivers/media/common/videobuf2/videobuf2-core.c:547:19: note: in expansion of macro 'call_memop' if (mem_priv && call_memop(vb, num_users, mem_priv) > 1) ^ drivers/media/common/videobuf2/videobuf2-core.c: In function 'vb2_plane_vaddr': >> drivers/media/common/videobuf2/videobuf2-core.c:72:9: warning: format '%p' expects argument of type 'void *', but argument 4 has type 'unsigned int' [-Wformat=] struct vb2_queue *_q = (vb)->vb2_queue; \ ^ drivers/media/common/videobuf2/videobuf2-core.c:881:9: note: in expansion of macro 'call_ptr_memop' return call_ptr_memop(vb, vaddr, vb->planes[plane_no].mem_priv); ^ >> drivers/media/common/videobuf2/videobuf2-core.c:72:9: warning: format '%d' expects argument of type 'int', but argument 5 has type 'char *' [-Wformat=] struct vb2_queue *_q = (vb)->vb2_queue; \ ^ drivers/media/common/videobuf2/videobuf2-core.c:881:9: note: in expansion of macro 'call_ptr_memop' return call_ptr_memop(vb, vaddr, vb->planes[plane_no].mem_priv); ^ >> drivers/media/common/videobuf2/videobuf2-core.c:72:9: warning: format '%s' expects a matching 'char *' argument [-Wformat=] struct vb2_queue *_q = (vb)->vb2_queue; \ ^ drivers/media/common/videobuf2/videobuf2-core.c:881:9: note: in expansion of macro 'call_ptr_memop' return call_ptr_memop(vb, vaddr, vb->planes[plane_no].mem_priv); ^ drivers/media/common/videobuf2/videobuf2-core.c: In function 'vb2_plane_cookie': >> drivers/media/common/videobuf2/videobuf2-core.c:72:9: warning: format '%p' expects argument of type 'void *', but argument 4 has type 'unsigned int' [-Wformat=] struct vb2_queue *_q = (vb)->vb2_queue; \ ^ drivers/media/common/videobuf2/videobuf2-core.c:891:9: note: in expansion of macro 'call_ptr_memop' return call_ptr_memop(vb, cookie, vb->planes[plane_no].mem_priv); ^ >> drivers/media/common/videobuf2/videobuf2-core.c:72:9: warning: format '%d' expects argument of type 'int', but argument 5 has type 'char *' [-Wformat=] struct vb2_queue *_q = (vb)->vb2_queue; \ ^ drivers/media/common/videobuf2/videobuf2-core.c:891:9: note: in expansion of macro 'call_ptr_memop' return call_ptr_memop(vb, cookie, vb->planes[plane_no].mem_priv); ^ >> drivers/media/common/videobuf2/videobuf2-core.c:72:9: warning: format '%s' expects a matching 'char *' argument [-Wformat=] struct vb2_queue *_q = (vb)->vb2_queue; \ ^ drivers/media/common/videobuf2/videobuf2-core.c:891:9: note: in expansion of macro 'call_ptr_memop' return call_ptr_memop(vb, cookie, vb->planes[plane_no].mem_priv); ^ drivers/media/common/videobuf2/videobuf2-core.c: In function 'vb2_buffer_done': drivers/media/common/videobuf2/videobuf2-core.c:84:9: warning: format '%p' expects argument of type 'void *', but argument 4 has type 'unsigned int' [-Wformat=] struct vb2_queue *_q = (vb)->vb2_queue; \ ^ drivers/media/common/videobuf2/videobuf2-core.c:922:3: note: in expansion of macro 'call_void_memop' call_void_memop(vb, finish, vb->planes[plane].mem_priv); ^ drivers/media/common/videobuf2/videobuf2-core.c:84:9: warning: format '%d' expects argument of type 'int', but argument 5 has type 'char *' [-Wformat=] struct vb2_queue *_q = (vb)->vb2_queue; \ ^ drivers/media/common/videobuf2/videobuf2-core.c:922:3: note: in expansion of macro 'call_void_memop' call_void_memop(vb, finish, vb->planes[plane].mem_priv); ^ drivers/media/common/videobuf2/videobuf2-core.c:84:9: warning: format '%s' expects a matching 'char *' argument [-Wformat=] struct vb2_queue *_q = (vb)->vb2_queue; \ ^ drivers/media/common/videobuf2/videobuf2-core.c:922:3: note: in expansion of macro 'call_void_memop' call_void_memop(vb, finish, vb->planes[plane].mem_priv); ^ drivers/media/common/videobuf2/videobuf2-core.c: In function '__prepare_mmap': drivers/media/common/videobuf2/videobuf2-core.c:975:2: warning: format '%p' expects argument of type 'void *', but argument 4 has type 'unsigned int' [-Wformat=] return ret ? ret : call_vb_qop(vb, buf_prepare, vb); ^ drivers/media/common/videobuf2/videobuf2-core.c:975:2: warning: format '%d' expects argument of type 'int', but argument 5 has type 'char *' [-Wformat=] drivers/media/common/videobuf2/videobuf2-core.c:975:2: warning: format '%s' expects a matching 'char *' argument [-Wformat=] drivers/media/common/videobuf2/videobuf2-core.c: In function '__prepare_userptr': drivers/media/common/videobuf2/videobuf2-core.c:1023:5: warning: format '%p' expects argument of type 'void *', but argument 4 has type 'unsigned int' [-Wformat=] call_void_vb_qop(vb, buf_cleanup, vb); ^ drivers/media/common/videobuf2/videobuf2-core.c:1023:5: warning: format '%d' expects argument of type 'int', but argument 5 has type 'char *' [-Wformat=] drivers/media/common/videobuf2/videobuf2-core.c:1023:5: warning: format '%s' expects a matching 'char *' argument [-Wformat=] drivers/media/common/videobuf2/videobuf2-core.c:84:9: warning: format '%p' expects argument of type 'void *', but argument 4 has type 'unsigned int' [-Wformat=] struct vb2_queue *_q = (vb)->vb2_queue; \ ^ drivers/media/common/videobuf2/videobuf2-core.c:1025:4: note: in expansion of macro 'call_void_memop' call_void_memop(vb, put_userptr, vb->planes[plane].mem_priv); ^ drivers/media/common/videobuf2/videobuf2-core.c:84:9: warning: format '%d' expects argument of type 'int', but argument 5 has type 'char *' [-Wformat=] struct vb2_queue *_q = (vb)->vb2_queue; \ ^ drivers/media/common/videobuf2/videobuf2-core.c:1025:4: note: in expansion of macro 'call_void_memop' call_void_memop(vb, put_userptr, vb->planes[plane].mem_priv); ^ drivers/media/common/videobuf2/videobuf2-core.c:84:9: warning: format '%s' expects a matching 'char *' argument [-Wformat=] struct vb2_queue *_q = (vb)->vb2_queue; \ ^ drivers/media/common/videobuf2/videobuf2-core.c:1025:4: note: in expansion of macro 'call_void_memop' call_void_memop(vb, put_userptr, vb->planes[plane].mem_priv); ^ >> drivers/media/common/videobuf2/videobuf2-core.c:72:9: warning: format '%p' expects argument of type 'void *', but argument 4 has type 'unsigned int' [-Wformat=] struct vb2_queue *_q = (vb)->vb2_queue; \ ^ drivers/media/common/videobuf2/videobuf2-core.c:1035:14: note: in expansion of macro 'call_ptr_memop' mem_priv = call_ptr_memop(vb, get_userptr, ^ >> drivers/media/common/videobuf2/videobuf2-core.c:72:9: warning: format '%d' expects argument of type 'int', but argument 5 has type 'char *' [-Wformat=] struct vb2_queue *_q = (vb)->vb2_queue; \ ^ drivers/media/common/videobuf2/videobuf2-core.c:1035:14: note: in expansion of macro 'call_ptr_memop' mem_priv = call_ptr_memop(vb, get_userptr, ^ >> drivers/media/common/videobuf2/videobuf2-core.c:72:9: warning: format '%s' expects a matching 'char *' argument [-Wformat=] struct vb2_queue *_q = (vb)->vb2_queue; \ ^ drivers/media/common/videobuf2/videobuf2-core.c:1035:14: note: in expansion of macro 'call_ptr_memop' mem_priv = call_ptr_memop(vb, get_userptr, ^ drivers/media/common/videobuf2/videobuf2-core.c:1065:3: warning: format '%p' expects argument of type 'void *', but argument 4 has type 'unsigned int' [-Wformat=] ret = call_vb_qop(vb, buf_init, vb); ^ drivers/media/common/videobuf2/videobuf2-core.c:1065:3: warning: format '%d' expects argument of type 'int', but argument 5 has type 'char *' [-Wformat=] drivers/media/common/videobuf2/videobuf2-core.c:1065:3: warning: format '%s' expects a matching 'char *' argument [-Wformat=] drivers/media/common/videobuf2/videobuf2-core.c:1072:2: warning: format '%p' expects argument of type 'void *', but argument 4 has type 'unsigned int' [-Wformat=] ret = call_vb_qop(vb, buf_prepare, vb); ^ drivers/media/common/videobuf2/videobuf2-core.c:1072:2: warning: format '%d' expects argument of type 'int', but argument 5 has type 'char *' [-Wformat=] drivers/media/common/videobuf2/videobuf2-core.c:1072:2: warning: format '%s' expects a matching 'char *' argument [-Wformat=] drivers/media/common/videobuf2/videobuf2-core.c:1075:3: warning: format '%p' expects argument of type 'void *', but argument 4 has type 'unsigned int' [-Wformat=] call_void_vb_qop(vb, buf_cleanup, vb); ^ drivers/media/common/videobuf2/videobuf2-core.c:1075:3: warning: format '%d' expects argument of type 'int', but argument 5 has type 'char *' [-Wformat=] drivers/media/common/videobuf2/videobuf2-core.c:1075:3: warning: format '%s' expects a matching 'char *' argument [-Wformat=] drivers/media/common/videobuf2/videobuf2-core.c:84:9: warning: format '%p' expects argument of type 'void *', but argument 4 has type 'unsigned int' [-Wformat=] struct vb2_queue *_q = (vb)->vb2_queue; \ ^ drivers/media/common/videobuf2/videobuf2-core.c:1084:4: note: in expansion of macro 'call_void_memop' call_void_memop(vb, put_userptr, ^ drivers/media/common/videobuf2/videobuf2-core.c:84:9: warning: format '%d' expects argument of type 'int', but argument 5 has type 'char *' [-Wformat=] struct vb2_queue *_q = (vb)->vb2_queue; \ ^ drivers/media/common/videobuf2/videobuf2-core.c:1084:4: note: in expansion of macro 'call_void_memop' call_void_memop(vb, put_userptr, ^ drivers/media/common/videobuf2/videobuf2-core.c:84:9: warning: format '%s' expects a matching 'char *' argument [-Wformat=] struct vb2_queue *_q = (vb)->vb2_queue; \ ^ drivers/media/common/videobuf2/videobuf2-core.c:1084:4: note: in expansion of macro 'call_void_memop' call_void_memop(vb, put_userptr, ^ drivers/media/common/videobuf2/videobuf2-core.c: In function '__prepare_dmabuf': drivers/media/common/videobuf2/videobuf2-core.c:1149:4: warning: format '%p' expects argument of type 'void *', but argument 4 has type 'unsigned int' [-Wformat=] call_void_vb_qop(vb, buf_cleanup, vb); ^ drivers/media/common/videobuf2/videobuf2-core.c:1149:4: warning: format '%d' expects argument of type 'int', but argument 5 has type 'char *' [-Wformat=] drivers/media/common/videobuf2/videobuf2-core.c:1149:4: warning: format '%s' expects a matching 'char *' argument [-Wformat=] >> drivers/media/common/videobuf2/videobuf2-core.c:72:9: warning: format '%p' expects argument of type 'void *', but argument 4 has type 'unsigned int' [-Wformat=] struct vb2_queue *_q = (vb)->vb2_queue; \ ^ drivers/media/common/videobuf2/videobuf2-core.c:1160:14: note: in expansion of macro 'call_ptr_memop' mem_priv = call_ptr_memop(vb, attach_dmabuf, ^ >> drivers/media/common/videobuf2/videobuf2-core.c:72:9: warning: format '%d' expects argument of type 'int', but argument 5 has type 'char *' [-Wformat=] struct vb2_queue *_q = (vb)->vb2_queue; \ ^ drivers/media/common/videobuf2/videobuf2-core.c:1160:14: note: in expansion of macro 'call_ptr_memop' mem_priv = call_ptr_memop(vb, attach_dmabuf, ^ >> drivers/media/common/videobuf2/videobuf2-core.c:72:9: warning: format '%s' expects a matching 'char *' argument [-Wformat=] struct vb2_queue *_q = (vb)->vb2_queue; \ ^ drivers/media/common/videobuf2/videobuf2-core.c:1160:14: note: in expansion of macro 'call_ptr_memop' mem_priv = call_ptr_memop(vb, attach_dmabuf, ^ drivers/media/common/videobuf2/videobuf2-core.c:60:9: warning: format '%p' expects argument of type 'void *', but argument 4 has type 'unsigned int' [-Wformat=] struct vb2_queue *_q = (vb)->vb2_queue; \ ^ drivers/media/common/videobuf2/videobuf2-core.c:1180:9: note: in expansion of macro 'call_memop' ret = call_memop(vb, map_dmabuf, vb->planes[plane].mem_priv); ^ drivers/media/common/videobuf2/videobuf2-core.c:60:9: warning: format '%d' expects argument of type 'int', but argument 5 has type 'char *' [-Wformat=] struct vb2_queue *_q = (vb)->vb2_queue; \ ^ drivers/media/common/videobuf2/videobuf2-core.c:1180:9: note: in expansion of macro 'call_memop' ret = call_memop(vb, map_dmabuf, vb->planes[plane].mem_priv); ^ drivers/media/common/videobuf2/videobuf2-core.c:60:9: warning: format '%s' expects a matching 'char *' argument [-Wformat=] struct vb2_queue *_q = (vb)->vb2_queue; \ ^ drivers/media/common/videobuf2/videobuf2-core.c:1180:9: note: in expansion of macro 'call_memop' ret = call_memop(vb, map_dmabuf, vb->planes[plane].mem_priv); ^ drivers/media/common/videobuf2/videobuf2-core.c:1205:3: warning: format '%p' expects argument of type 'void *', but argument 4 has type 'unsigned int' [-Wformat=] ret = call_vb_qop(vb, buf_init, vb); ^ drivers/media/common/videobuf2/videobuf2-core.c:1205:3: warning: format '%d' expects argument of type 'int', but argument 5 has type 'char *' [-Wformat=] drivers/media/common/videobuf2/videobuf2-core.c:1205:3: warning: format '%s' expects a matching 'char *' argument [-Wformat=] drivers/media/common/videobuf2/videobuf2-core.c:1212:2: warning: format '%p' expects argument of type 'void *', but argument 4 has type 'unsigned int' [-Wformat=] ret = call_vb_qop(vb, buf_prepare, vb); ^ drivers/media/common/videobuf2/videobuf2-core.c:1212:2: warning: format '%d' expects argument of type 'int', but argument 5 has type 'char *' [-Wformat=] drivers/media/common/videobuf2/videobuf2-core.c:1212:2: warning: format '%s' expects a matching 'char *' argument [-Wformat=] drivers/media/common/videobuf2/videobuf2-core.c:1215:3: warning: format '%p' expects argument of type 'void *', but argument 4 has type 'unsigned int' [-Wformat=] call_void_vb_qop(vb, buf_cleanup, vb); ^ drivers/media/common/videobuf2/videobuf2-core.c:1215:3: warning: format '%d' expects argument of type 'int', but argument 5 has type 'char *' [-Wformat=] drivers/media/common/videobuf2/videobuf2-core.c:1215:3: warning: format '%s' expects a matching 'char *' argument [-Wformat=] drivers/media/common/videobuf2/videobuf2-core.c: In function '__enqueue_in_driver': drivers/media/common/videobuf2/videobuf2-core.c:1239:2: warning: format '%p' expects argument of type 'void *', but argument 4 has type 'unsigned int' [-Wformat=] call_void_vb_qop(vb, buf_queue, vb); ^ drivers/media/common/videobuf2/videobuf2-core.c:1239:2: warning: format '%d' expects argument of type 'int', but argument 5 has type 'char *' [-Wformat=] drivers/media/common/videobuf2/videobuf2-core.c:1239:2: warning: format '%s' expects a matching 'char *' argument [-Wformat=] drivers/media/common/videobuf2/videobuf2-core.c: In function '__buf_prepare': drivers/media/common/videobuf2/videobuf2-core.c:84:9: warning: format '%p' expects argument of type 'void *', but argument 4 has type 'unsigned int' [-Wformat=] struct vb2_queue *_q = (vb)->vb2_queue; \ ^ drivers/media/common/videobuf2/videobuf2-core.c:1278:3: note: in expansion of macro 'call_void_memop' call_void_memop(vb, prepare, vb->planes[plane].mem_priv); ^ drivers/media/common/videobuf2/videobuf2-core.c:84:9: warning: format '%d' expects argument of type 'int', but argument 5 has type 'char *' [-Wformat=] struct vb2_queue *_q = (vb)->vb2_queue; \ ^ drivers/media/common/videobuf2/videobuf2-core.c:1278:3: note: in expansion of macro 'call_void_memop' call_void_memop(vb, prepare, vb->planes[plane].mem_priv); ^ drivers/media/common/videobuf2/videobuf2-core.c:84:9: warning: format '%s' expects a matching 'char *' argument [-Wformat=] struct vb2_queue *_q = (vb)->vb2_queue; \ ^ drivers/media/common/videobuf2/videobuf2-core.c:1278:3: note: in expansion of macro 'call_void_memop' call_void_memop(vb, prepare, vb->planes[plane].mem_priv); ^ drivers/media/common/videobuf2/videobuf2-core.c: In function '__vb2_dqbuf': drivers/media/common/videobuf2/videobuf2-core.c:84:9: warning: format '%p' expects argument of type 'void *', but argument 4 has type 'unsigned int' [-Wformat=] struct vb2_queue *_q = (vb)->vb2_queue; \ ^ drivers/media/common/videobuf2/videobuf2-core.c:1584:4: note: in expansion of macro 'call_void_memop' call_void_memop(vb, unmap_dmabuf, vb->planes[i].mem_priv); ^ drivers/media/common/videobuf2/videobuf2-core.c:84:9: warning: format '%d' expects argument of type 'int', but argument 5 has type 'char *' [-Wformat=] struct vb2_queue *_q = (vb)->vb2_queue; \ ^ drivers/media/common/videobuf2/videobuf2-core.c:1584:4: note: in expansion of macro 'call_void_memop' call_void_memop(vb, unmap_dmabuf, vb->planes[i].mem_priv); ^ drivers/media/common/videobuf2/videobuf2-core.c:84:9: warning: format '%s' expects a matching 'char *' argument [-Wformat=] struct vb2_queue *_q = (vb)->vb2_queue; \ ^ drivers/media/common/videobuf2/videobuf2-core.c:1584:4: note: in expansion of macro 'call_void_memop' call_void_memop(vb, unmap_dmabuf, vb->planes[i].mem_priv); ^ drivers/media/common/videobuf2/videobuf2-core.c: In function 'vb2_core_dqbuf': drivers/media/common/videobuf2/videobuf2-core.c:1611:2: warning: format '%p' expects argument of type 'void *', but argument 4 has type 'unsigned int' [-Wformat=] call_void_vb_qop(vb, buf_finish, vb); ^ drivers/media/common/videobuf2/videobuf2-core.c:1611:2: warning: format '%d' expects argument of type 'int', but argument 5 has type 'char *' [-Wformat=] drivers/media/common/videobuf2/videobuf2-core.c:1611:2: warning: format '%s' expects a matching 'char *' argument [-Wformat=] drivers/media/common/videobuf2/videobuf2-core.c: In function '__vb2_queue_cancel': drivers/media/common/videobuf2/videobuf2-core.c:84:9: warning: format '%p' expects argument of type 'void *', but argument 4 has type 'unsigned int' [-Wformat=] struct vb2_queue *_q = (vb)->vb2_queue; \ ^ drivers/media/common/videobuf2/videobuf2-core.c:1705:5: note: in expansion of macro 'call_void_memop' call_void_memop(vb, finish, ^ drivers/media/common/videobuf2/videobuf2-core.c:84:9: warning: format '%d' expects argument of type 'int', but argument 5 has type 'char *' [-Wformat=] struct vb2_queue *_q = (vb)->vb2_queue; \ ^ drivers/media/common/videobuf2/videobuf2-core.c:1705:5: note: in expansion of macro 'call_void_memop' call_void_memop(vb, finish, ^ drivers/media/common/videobuf2/videobuf2-core.c:84:9: warning: format '%s' expects a matching 'char *' argument [-Wformat=] struct vb2_queue *_q = (vb)->vb2_queue; \ ^ drivers/media/common/videobuf2/videobuf2-core.c:1705:5: note: in expansion of macro 'call_void_memop' call_void_memop(vb, finish, ^ drivers/media/common/videobuf2/videobuf2-core.c:1711:4: warning: format '%p' expects argument of type 'void *', but argument 4 has type 'unsigned int' [-Wformat=] call_void_vb_qop(vb, buf_finish, vb); ^ drivers/media/common/videobuf2/videobuf2-core.c:1711:4: warning: format '%d' expects argument of type 'int', but argument 5 has type 'char *' [-Wformat=] drivers/media/common/videobuf2/videobuf2-core.c:1711:4: warning: format '%s' expects a matching 'char *' argument [-Wformat=] drivers/media/common/videobuf2/videobuf2-core.c: In function 'vb2_core_expbuf': >> drivers/media/common/videobuf2/videobuf2-core.c:72:9: warning: format '%p' expects argument of type 'void *', but argument 4 has type 'unsigned int' [-Wformat=] struct vb2_queue *_q = (vb)->vb2_queue; \ ^ drivers/media/common/videobuf2/videobuf2-core.c:1873:9: note: in expansion of macro 'call_ptr_memop' dbuf = call_ptr_memop(vb, get_dmabuf, vb_plane->mem_priv, ^ >> drivers/media/common/videobuf2/videobuf2-core.c:72:9: warning: format '%d' expects argument of type 'int', but argument 5 has type 'char *' [-Wformat=] struct vb2_queue *_q = (vb)->vb2_queue; \ ^ drivers/media/common/videobuf2/videobuf2-core.c:1873:9: note: in expansion of macro 'call_ptr_memop' dbuf = call_ptr_memop(vb, get_dmabuf, vb_plane->mem_priv, ^ >> drivers/media/common/videobuf2/videobuf2-core.c:72:9: warning: format '%s' expects a matching 'char *' argument [-Wformat=] struct vb2_queue *_q = (vb)->vb2_queue; \ ^ drivers/media/common/videobuf2/videobuf2-core.c:1873:9: note: in expansion of macro 'call_ptr_memop' dbuf = call_ptr_memop(vb, get_dmabuf, vb_plane->mem_priv, ^ drivers/media/common/videobuf2/videobuf2-core.c: In function 'vb2_mmap': drivers/media/common/videobuf2/videobuf2-core.c:60:9: warning: format '%p' expects argument of type 'void *', but argument 4 has type 'unsigned int' [-Wformat=] struct vb2_queue *_q = (vb)->vb2_queue; \ ^ drivers/media/common/videobuf2/videobuf2-core.c:1955:8: note: in expansion of macro 'call_memop' ret = call_memop(vb, mmap, vb->planes[plane].mem_priv, vma); ^ drivers/media/common/videobuf2/videobuf2-core.c:60:9: warning: format '%d' expects argument of type 'int', but argument 5 has type 'char *' [-Wformat=] struct vb2_queue *_q = (vb)->vb2_queue; \ ^ drivers/media/common/videobuf2/videobuf2-core.c:1955:8: note: in expansion of macro 'call_memop' ret = call_memop(vb, mmap, vb->planes[plane].mem_priv, vma); ^ drivers/media/common/videobuf2/videobuf2-core.c:60:9: warning: format '%s' expects a matching 'char *' argument [-Wformat=] struct vb2_queue *_q = (vb)->vb2_queue; \ ^ drivers/media/common/videobuf2/videobuf2-core.c:1955:8: note: in expansion of macro 'call_memop' ret = call_memop(vb, mmap, vb->planes[plane].mem_priv, vma); ^ vim +72 drivers/media/common/videobuf2/videobuf2-core.c af3bac1a7c drivers/media/v4l2-core/videobuf2-core.c Junghak Sung 2015-11-03 69 af3bac1a7c drivers/media/v4l2-core/videobuf2-core.c Junghak Sung 2015-11-03 70 #define call_ptr_memop(vb, op, args...) \ af3bac1a7c drivers/media/v4l2-core/videobuf2-core.c Junghak Sung 2015-11-03 71 ({ \ af3bac1a7c drivers/media/v4l2-core/videobuf2-core.c Junghak Sung 2015-11-03 @72 struct vb2_queue *_q = (vb)->vb2_queue; \ af3bac1a7c drivers/media/v4l2-core/videobuf2-core.c Junghak Sung 2015-11-03 73 void *ptr; \ af3bac1a7c drivers/media/v4l2-core/videobuf2-core.c Junghak Sung 2015-11-03 74 \ af3bac1a7c drivers/media/v4l2-core/videobuf2-core.c Junghak Sung 2015-11-03 75 log_memop(vb, op); \ af3bac1a7c drivers/media/v4l2-core/videobuf2-core.c Junghak Sung 2015-11-03 76 ptr = _q->mem_ops->op ? _q->mem_ops->op(args) : NULL; \ af3bac1a7c drivers/media/v4l2-core/videobuf2-core.c Junghak Sung 2015-11-03 77 if (!IS_ERR_OR_NULL(ptr)) \ af3bac1a7c drivers/media/v4l2-core/videobuf2-core.c Junghak Sung 2015-11-03 78 (vb)->cnt_mem_ ## op++; \ af3bac1a7c drivers/media/v4l2-core/videobuf2-core.c Junghak Sung 2015-11-03 79 ptr; \ af3bac1a7c drivers/media/v4l2-core/videobuf2-core.c Junghak Sung 2015-11-03 80 }) af3bac1a7c drivers/media/v4l2-core/videobuf2-core.c Junghak Sung 2015-11-03 81 af3bac1a7c drivers/media/v4l2-core/videobuf2-core.c Junghak Sung 2015-11-03 82 #define call_void_memop(vb, op, args...) \ af3bac1a7c drivers/media/v4l2-core/videobuf2-core.c Junghak Sung 2015-11-03 83 ({ \ af3bac1a7c drivers/media/v4l2-core/videobuf2-core.c Junghak Sung 2015-11-03 84 struct vb2_queue *_q = (vb)->vb2_queue; \ af3bac1a7c drivers/media/v4l2-core/videobuf2-core.c Junghak Sung 2015-11-03 85 \ af3bac1a7c drivers/media/v4l2-core/videobuf2-core.c Junghak Sung 2015-11-03 86 log_memop(vb, op); \ af3bac1a7c drivers/media/v4l2-core/videobuf2-core.c Junghak Sung 2015-11-03 87 if (_q->mem_ops->op) \ af3bac1a7c drivers/media/v4l2-core/videobuf2-core.c Junghak Sung 2015-11-03 88 _q->mem_ops->op(args); \ af3bac1a7c drivers/media/v4l2-core/videobuf2-core.c Junghak Sung 2015-11-03 89 (vb)->cnt_mem_ ## op++; \ af3bac1a7c drivers/media/v4l2-core/videobuf2-core.c Junghak Sung 2015-11-03 90 }) af3bac1a7c drivers/media/v4l2-core/videobuf2-core.c Junghak Sung 2015-11-03 91 af3bac1a7c drivers/media/v4l2-core/videobuf2-core.c Junghak Sung 2015-11-03 92 #define log_qop(q, op) \ 5291e8a263 drivers/media/common/videobuf2/videobuf2-core.c Laurent Pinchart 2018-04-26 93 dprintk(q, 2, "call_qop(%p, %s)%s\n", q, #op, \ af3bac1a7c drivers/media/v4l2-core/videobuf2-core.c Junghak Sung 2015-11-03 94 (q)->ops->op ? "" : " (nop)") af3bac1a7c drivers/media/v4l2-core/videobuf2-core.c Junghak Sung 2015-11-03 95 af3bac1a7c drivers/media/v4l2-core/videobuf2-core.c Junghak Sung 2015-11-03 96 #define call_qop(q, op, args...) \ af3bac1a7c drivers/media/v4l2-core/videobuf2-core.c Junghak Sung 2015-11-03 97 ({ \ af3bac1a7c drivers/media/v4l2-core/videobuf2-core.c Junghak Sung 2015-11-03 98 int err; \ af3bac1a7c drivers/media/v4l2-core/videobuf2-core.c Junghak Sung 2015-11-03 99 \ af3bac1a7c drivers/media/v4l2-core/videobuf2-core.c Junghak Sung 2015-11-03 100 log_qop(q, op); \ af3bac1a7c drivers/media/v4l2-core/videobuf2-core.c Junghak Sung 2015-11-03 101 err = (q)->ops->op ? (q)->ops->op(args) : 0; \ af3bac1a7c drivers/media/v4l2-core/videobuf2-core.c Junghak Sung 2015-11-03 102 if (!err) \ af3bac1a7c drivers/media/v4l2-core/videobuf2-core.c Junghak Sung 2015-11-03 103 (q)->cnt_ ## op++; \ af3bac1a7c drivers/media/v4l2-core/videobuf2-core.c Junghak Sung 2015-11-03 104 err; \ af3bac1a7c drivers/media/v4l2-core/videobuf2-core.c Junghak Sung 2015-11-03 105 }) af3bac1a7c drivers/media/v4l2-core/videobuf2-core.c Junghak Sung 2015-11-03 106 af3bac1a7c drivers/media/v4l2-core/videobuf2-core.c Junghak Sung 2015-11-03 107 #define call_void_qop(q, op, args...) \ af3bac1a7c drivers/media/v4l2-core/videobuf2-core.c Junghak Sung 2015-11-03 108 ({ \ af3bac1a7c drivers/media/v4l2-core/videobuf2-core.c Junghak Sung 2015-11-03 109 log_qop(q, op); \ af3bac1a7c drivers/media/v4l2-core/videobuf2-core.c Junghak Sung 2015-11-03 110 if ((q)->ops->op) \ af3bac1a7c drivers/media/v4l2-core/videobuf2-core.c Junghak Sung 2015-11-03 111 (q)->ops->op(args); \ af3bac1a7c drivers/media/v4l2-core/videobuf2-core.c Junghak Sung 2015-11-03 112 (q)->cnt_ ## op++; \ af3bac1a7c drivers/media/v4l2-core/videobuf2-core.c Junghak Sung 2015-11-03 113 }) af3bac1a7c drivers/media/v4l2-core/videobuf2-core.c Junghak Sung 2015-11-03 114 af3bac1a7c drivers/media/v4l2-core/videobuf2-core.c Junghak Sung 2015-11-03 115 #define log_vb_qop(vb, op, args...) \ 5291e8a263 drivers/media/common/videobuf2/videobuf2-core.c Laurent Pinchart 2018-04-26 116 dprintk((vb)->vb2_queue, 2, "call_vb_qop(%p, %d, %s)%s\n", \ 5291e8a263 drivers/media/common/videobuf2/videobuf2-core.c Laurent Pinchart 2018-04-26 117 (vb)->index, #op, \ af3bac1a7c drivers/media/v4l2-core/videobuf2-core.c Junghak Sung 2015-11-03 118 (vb)->vb2_queue->ops->op ? "" : " (nop)") af3bac1a7c drivers/media/v4l2-core/videobuf2-core.c Junghak Sung 2015-11-03 119 af3bac1a7c drivers/media/v4l2-core/videobuf2-core.c Junghak Sung 2015-11-03 120 #define call_vb_qop(vb, op, args...) \ af3bac1a7c drivers/media/v4l2-core/videobuf2-core.c Junghak Sung 2015-11-03 121 ({ \ af3bac1a7c drivers/media/v4l2-core/videobuf2-core.c Junghak Sung 2015-11-03 122 int err; \ af3bac1a7c drivers/media/v4l2-core/videobuf2-core.c Junghak Sung 2015-11-03 123 \ af3bac1a7c drivers/media/v4l2-core/videobuf2-core.c Junghak Sung 2015-11-03 124 log_vb_qop(vb, op); \ af3bac1a7c drivers/media/v4l2-core/videobuf2-core.c Junghak Sung 2015-11-03 125 err = (vb)->vb2_queue->ops->op ? \ af3bac1a7c drivers/media/v4l2-core/videobuf2-core.c Junghak Sung 2015-11-03 126 (vb)->vb2_queue->ops->op(args) : 0; \ af3bac1a7c drivers/media/v4l2-core/videobuf2-core.c Junghak Sung 2015-11-03 127 if (!err) \ af3bac1a7c drivers/media/v4l2-core/videobuf2-core.c Junghak Sung 2015-11-03 128 (vb)->cnt_ ## op++; \ af3bac1a7c drivers/media/v4l2-core/videobuf2-core.c Junghak Sung 2015-11-03 129 err; \ af3bac1a7c drivers/media/v4l2-core/videobuf2-core.c Junghak Sung 2015-11-03 130 }) af3bac1a7c drivers/media/v4l2-core/videobuf2-core.c Junghak Sung 2015-11-03 131 af3bac1a7c drivers/media/v4l2-core/videobuf2-core.c Junghak Sung 2015-11-03 132 #define call_void_vb_qop(vb, op, args...) \ af3bac1a7c drivers/media/v4l2-core/videobuf2-core.c Junghak Sung 2015-11-03 133 ({ \ af3bac1a7c drivers/media/v4l2-core/videobuf2-core.c Junghak Sung 2015-11-03 134 log_vb_qop(vb, op); \ af3bac1a7c drivers/media/v4l2-core/videobuf2-core.c Junghak Sung 2015-11-03 135 if ((vb)->vb2_queue->ops->op) \ af3bac1a7c drivers/media/v4l2-core/videobuf2-core.c Junghak Sung 2015-11-03 136 (vb)->vb2_queue->ops->op(args); \ af3bac1a7c drivers/media/v4l2-core/videobuf2-core.c Junghak Sung 2015-11-03 137 (vb)->cnt_ ## op++; \ af3bac1a7c drivers/media/v4l2-core/videobuf2-core.c Junghak Sung 2015-11-03 138 }) af3bac1a7c drivers/media/v4l2-core/videobuf2-core.c Junghak Sung 2015-11-03 139 af3bac1a7c drivers/media/v4l2-core/videobuf2-core.c Junghak Sung 2015-11-03 140 #else af3bac1a7c drivers/media/v4l2-core/videobuf2-core.c Junghak Sung 2015-11-03 141 af3bac1a7c drivers/media/v4l2-core/videobuf2-core.c Junghak Sung 2015-11-03 142 #define call_memop(vb, op, args...) \ af3bac1a7c drivers/media/v4l2-core/videobuf2-core.c Junghak Sung 2015-11-03 143 ((vb)->vb2_queue->mem_ops->op ? \ af3bac1a7c drivers/media/v4l2-core/videobuf2-core.c Junghak Sung 2015-11-03 144 (vb)->vb2_queue->mem_ops->op(args) : 0) af3bac1a7c drivers/media/v4l2-core/videobuf2-core.c Junghak Sung 2015-11-03 145 af3bac1a7c drivers/media/v4l2-core/videobuf2-core.c Junghak Sung 2015-11-03 146 #define call_ptr_memop(vb, op, args...) \ af3bac1a7c drivers/media/v4l2-core/videobuf2-core.c Junghak Sung 2015-11-03 147 ((vb)->vb2_queue->mem_ops->op ? \ af3bac1a7c drivers/media/v4l2-core/videobuf2-core.c Junghak Sung 2015-11-03 148 (vb)->vb2_queue->mem_ops->op(args) : NULL) af3bac1a7c drivers/media/v4l2-core/videobuf2-core.c Junghak Sung 2015-11-03 149 af3bac1a7c drivers/media/v4l2-core/videobuf2-core.c Junghak Sung 2015-11-03 150 #define call_void_memop(vb, op, args...) \ af3bac1a7c drivers/media/v4l2-core/videobuf2-core.c Junghak Sung 2015-11-03 151 do { \ af3bac1a7c drivers/media/v4l2-core/videobuf2-core.c Junghak Sung 2015-11-03 152 if ((vb)->vb2_queue->mem_ops->op) \ af3bac1a7c drivers/media/v4l2-core/videobuf2-core.c Junghak Sung 2015-11-03 153 (vb)->vb2_queue->mem_ops->op(args); \ af3bac1a7c drivers/media/v4l2-core/videobuf2-core.c Junghak Sung 2015-11-03 154 } while (0) af3bac1a7c drivers/media/v4l2-core/videobuf2-core.c Junghak Sung 2015-11-03 155 af3bac1a7c drivers/media/v4l2-core/videobuf2-core.c Junghak Sung 2015-11-03 156 #define call_qop(q, op, args...) \ af3bac1a7c drivers/media/v4l2-core/videobuf2-core.c Junghak Sung 2015-11-03 157 ((q)->ops->op ? (q)->ops->op(args) : 0) af3bac1a7c drivers/media/v4l2-core/videobuf2-core.c Junghak Sung 2015-11-03 158 af3bac1a7c drivers/media/v4l2-core/videobuf2-core.c Junghak Sung 2015-11-03 159 #define call_void_qop(q, op, args...) \ af3bac1a7c drivers/media/v4l2-core/videobuf2-core.c Junghak Sung 2015-11-03 160 do { \ af3bac1a7c drivers/media/v4l2-core/videobuf2-core.c Junghak Sung 2015-11-03 161 if ((q)->ops->op) \ af3bac1a7c drivers/media/v4l2-core/videobuf2-core.c Junghak Sung 2015-11-03 162 (q)->ops->op(args); \ af3bac1a7c drivers/media/v4l2-core/videobuf2-core.c Junghak Sung 2015-11-03 163 } while (0) af3bac1a7c drivers/media/v4l2-core/videobuf2-core.c Junghak Sung 2015-11-03 164 af3bac1a7c drivers/media/v4l2-core/videobuf2-core.c Junghak Sung 2015-11-03 165 #define call_vb_qop(vb, op, args...) \ af3bac1a7c drivers/media/v4l2-core/videobuf2-core.c Junghak Sung 2015-11-03 166 ((vb)->vb2_queue->ops->op ? (vb)->vb2_queue->ops->op(args) : 0) af3bac1a7c drivers/media/v4l2-core/videobuf2-core.c Junghak Sung 2015-11-03 167 af3bac1a7c drivers/media/v4l2-core/videobuf2-core.c Junghak Sung 2015-11-03 168 #define call_void_vb_qop(vb, op, args...) \ af3bac1a7c drivers/media/v4l2-core/videobuf2-core.c Junghak Sung 2015-11-03 169 do { \ af3bac1a7c drivers/media/v4l2-core/videobuf2-core.c Junghak Sung 2015-11-03 170 if ((vb)->vb2_queue->ops->op) \ af3bac1a7c drivers/media/v4l2-core/videobuf2-core.c Junghak Sung 2015-11-03 171 (vb)->vb2_queue->ops->op(args); \ af3bac1a7c drivers/media/v4l2-core/videobuf2-core.c Junghak Sung 2015-11-03 172 } while (0) af3bac1a7c drivers/media/v4l2-core/videobuf2-core.c Junghak Sung 2015-11-03 173 af3bac1a7c drivers/media/v4l2-core/videobuf2-core.c Junghak Sung 2015-11-03 174 #endif af3bac1a7c drivers/media/v4l2-core/videobuf2-core.c Junghak Sung 2015-11-03 175 af3bac1a7c drivers/media/v4l2-core/videobuf2-core.c Junghak Sung 2015-11-03 176 #define call_bufop(q, op, args...) \ af3bac1a7c drivers/media/v4l2-core/videobuf2-core.c Junghak Sung 2015-11-03 177 ({ \ af3bac1a7c drivers/media/v4l2-core/videobuf2-core.c Junghak Sung 2015-11-03 178 int ret = 0; \ af3bac1a7c drivers/media/v4l2-core/videobuf2-core.c Junghak Sung 2015-11-03 179 if (q && q->buf_ops && q->buf_ops->op) \ af3bac1a7c drivers/media/v4l2-core/videobuf2-core.c Junghak Sung 2015-11-03 180 ret = q->buf_ops->op(args); \ af3bac1a7c drivers/media/v4l2-core/videobuf2-core.c Junghak Sung 2015-11-03 181 ret; \ af3bac1a7c drivers/media/v4l2-core/videobuf2-core.c Junghak Sung 2015-11-03 182 }) ea42c8ecb2 drivers/media/video/videobuf2-core.c Marek Szyprowski 2011-04-12 183 10cc3b1e12 drivers/media/v4l2-core/videobuf2-core.c Hans Verkuil 2015-11-20 184 #define call_void_bufop(q, op, args...) \ 10cc3b1e12 drivers/media/v4l2-core/videobuf2-core.c Hans Verkuil 2015-11-20 185 ({ \ 10cc3b1e12 drivers/media/v4l2-core/videobuf2-core.c Hans Verkuil 2015-11-20 186 if (q && q->buf_ops && q->buf_ops->op) \ 10cc3b1e12 drivers/media/v4l2-core/videobuf2-core.c Hans Verkuil 2015-11-20 187 q->buf_ops->op(args); \ 10cc3b1e12 drivers/media/v4l2-core/videobuf2-core.c Hans Verkuil 2015-11-20 188 }) 10cc3b1e12 drivers/media/v4l2-core/videobuf2-core.c Hans Verkuil 2015-11-20 189 fb64dca805 drivers/media/v4l2-core/videobuf2-core.c Hans Verkuil 2014-02-28 190 static void __vb2_queue_cancel(struct vb2_queue *q); ce0eff016f drivers/media/v4l2-core/videobuf2-core.c Hans Verkuil 2015-01-20 191 static void __enqueue_in_driver(struct vb2_buffer *vb); fb64dca805 drivers/media/v4l2-core/videobuf2-core.c Hans Verkuil 2014-02-28 192 2a87af6ba1 drivers/media/v4l2-core/videobuf2-core.c Mauro Carvalho Chehab 2017-11-27 193 /* e23ccc0ad9 drivers/media/video/videobuf2-core.c Pawel Osciak 2010-10-11 194 * __vb2_buf_mem_alloc() - allocate video memory for the given buffer e23ccc0ad9 drivers/media/video/videobuf2-core.c Pawel Osciak 2010-10-11 195 */ c1426bc727 drivers/media/video/videobuf2-core.c Marek Szyprowski 2011-08-24 196 static int __vb2_buf_mem_alloc(struct vb2_buffer *vb) e23ccc0ad9 drivers/media/video/videobuf2-core.c Pawel Osciak 2010-10-11 197 { e23ccc0ad9 drivers/media/video/videobuf2-core.c Pawel Osciak 2010-10-11 198 struct vb2_queue *q = vb->vb2_queue; e23ccc0ad9 drivers/media/video/videobuf2-core.c Pawel Osciak 2010-10-11 199 void *mem_priv; e23ccc0ad9 drivers/media/video/videobuf2-core.c Pawel Osciak 2010-10-11 200 int plane; 0ff657b0f6 drivers/media/v4l2-core/videobuf2-core.c Hans Verkuil 2016-07-21 201 int ret = -ENOMEM; e23ccc0ad9 drivers/media/video/videobuf2-core.c Pawel Osciak 2010-10-11 202 7f8414594e drivers/media/v4l2-core/videobuf2-core.c Mauro Carvalho Chehab 2013-04-19 203 /* 7f8414594e drivers/media/v4l2-core/videobuf2-core.c Mauro Carvalho Chehab 2013-04-19 204 * Allocate memory for all planes in this buffer 7f8414594e drivers/media/v4l2-core/videobuf2-core.c Mauro Carvalho Chehab 2013-04-19 205 * NOTE: mmapped areas should be page aligned 7f8414594e drivers/media/v4l2-core/videobuf2-core.c Mauro Carvalho Chehab 2013-04-19 206 */ e23ccc0ad9 drivers/media/video/videobuf2-core.c Pawel Osciak 2010-10-11 207 for (plane = 0; plane < vb->num_planes; ++plane) { 58e1ba3ce6 drivers/media/v4l2-core/videobuf2-core.c Hans Verkuil 2015-11-20 208 unsigned long size = PAGE_ALIGN(vb->planes[plane].length); 7f8414594e drivers/media/v4l2-core/videobuf2-core.c Mauro Carvalho Chehab 2013-04-19 209 20be7ab8db drivers/media/v4l2-core/videobuf2-core.c Hans Verkuil 2015-12-16 @210 mem_priv = call_ptr_memop(vb, alloc, 36c0f8b32c drivers/media/v4l2-core/videobuf2-core.c Hans Verkuil 2016-04-15 211 q->alloc_devs[plane] ? : q->dev, 5b6f9abe5a drivers/media/v4l2-core/videobuf2-core.c Stanimir Varbanov 2017-08-21 212 q->dma_attrs, size, q->dma_dir, q->gfp_flags); 72b7876c2e drivers/media/v4l2-core/videobuf2-core.c Christophe JAILLET 2017-04-23 213 if (IS_ERR_OR_NULL(mem_priv)) { 0ff657b0f6 drivers/media/v4l2-core/videobuf2-core.c Hans Verkuil 2016-07-21 214 if (mem_priv) 0ff657b0f6 drivers/media/v4l2-core/videobuf2-core.c Hans Verkuil 2016-07-21 215 ret = PTR_ERR(mem_priv); e23ccc0ad9 drivers/media/video/videobuf2-core.c Pawel Osciak 2010-10-11 216 goto free; 0ff657b0f6 drivers/media/v4l2-core/videobuf2-core.c Hans Verkuil 2016-07-21 217 } e23ccc0ad9 drivers/media/video/videobuf2-core.c Pawel Osciak 2010-10-11 218 e23ccc0ad9 drivers/media/video/videobuf2-core.c Pawel Osciak 2010-10-11 219 /* Associate allocator private data with this plane */ e23ccc0ad9 drivers/media/video/videobuf2-core.c Pawel Osciak 2010-10-11 220 vb->planes[plane].mem_priv = mem_priv; e23ccc0ad9 drivers/media/video/videobuf2-core.c Pawel Osciak 2010-10-11 221 } e23ccc0ad9 drivers/media/video/videobuf2-core.c Pawel Osciak 2010-10-11 222 e23ccc0ad9 drivers/media/video/videobuf2-core.c Pawel Osciak 2010-10-11 223 return 0; e23ccc0ad9 drivers/media/video/videobuf2-core.c Pawel Osciak 2010-10-11 224 free: e23ccc0ad9 drivers/media/video/videobuf2-core.c Pawel Osciak 2010-10-11 225 /* Free already allocated memory if one of the allocations failed */ a00d026637 drivers/media/video/videobuf2-core.c Marek Szyprowski 2011-12-15 226 for (; plane > 0; --plane) { a1d36d8c70 drivers/media/v4l2-core/videobuf2-core.c Hans Verkuil 2014-03-17 227 call_void_memop(vb, put, vb->planes[plane - 1].mem_priv); a00d026637 drivers/media/video/videobuf2-core.c Marek Szyprowski 2011-12-15 228 vb->planes[plane - 1].mem_priv = NULL; a00d026637 drivers/media/video/videobuf2-core.c Marek Szyprowski 2011-12-15 229 } e23ccc0ad9 drivers/media/video/videobuf2-core.c Pawel Osciak 2010-10-11 230 0ff657b0f6 drivers/media/v4l2-core/videobuf2-core.c Hans Verkuil 2016-07-21 231 return ret; e23ccc0ad9 drivers/media/video/videobuf2-core.c Pawel Osciak 2010-10-11 232 } e23ccc0ad9 drivers/media/video/videobuf2-core.c Pawel Osciak 2010-10-11 233 :::::: The code at line 72 was first introduced by commit :::::: af3bac1a7c8a21ff4f4edede397cba8e3f8ee503 [media] media: videobuf2: Move vb2_fileio_data and vb2_thread to core part :::::: TO: Junghak Sung <jh1009.sung@xxxxxxxxxxx> :::::: CC: Mauro Carvalho Chehab <mchehab@xxxxxxxxxxxxxxx> --- 0-DAY kernel test infrastructure Open Source Technology Center https://lists.01.org/pipermail/kbuild-all Intel Corporation
Attachment:
.config.gz
Description: application/gzip