[jimc:dyn-drm-trc 20/21] drivers/gpu/drm/drm_gem_cma_helper.c:463:25: error: incompatible type for argument 2 of '___drm_dbg'
by kernel test robot
tree: https://github.com/jimc/linux.git dyn-drm-trc
head: a78f403dcd7765c2691998346cffdd311310e1d0
commit: 13e0bac0f355292a71358b9a61022e9f4b1bcc43 [20/21] drm_print: add struct _ddebug desc to drm_*dbg
config: sparc-randconfig-r024-20220208 (https://download.01.org/0day-ci/archive/20220208/202202082206.mFEwNlN3-lk...)
compiler: sparc64-linux-gcc (GCC) 11.2.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/jimc/linux/commit/13e0bac0f355292a71358b9a61022e9f4b1b...
git remote add jimc https://github.com/jimc/linux.git
git fetch --no-tags jimc dyn-drm-trc
git checkout 13e0bac0f355292a71358b9a61022e9f4b1bcc43
# save the config file to linux build tree
mkdir build_dir
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-11.2.0 make.cross O=build_dir ARCH=sparc SHELL=/bin/bash drivers/gpu/drm/
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp(a)intel.com>
All error/warnings (new ones prefixed by >>):
In file included from include/drm/drm_mm.h:51,
from include/drm/drm_vma_manager.h:26,
from include/drm/drm_gem.h:40,
from include/drm/drm_gem_cma_helper.h:7,
from drivers/gpu/drm/drm_gem_cma_helper.c:23:
drivers/gpu/drm/drm_gem_cma_helper.c: In function 'drm_gem_cma_prime_import_sg_table':
include/drm/drm_print.h:584:19: warning: passing argument 1 of '___drm_dbg' makes pointer from integer without a cast [-Wint-conversion]
584 | __drm_dbg(DRM_UT_PRIME, fmt, ##__VA_ARGS__)
| ^~~~~~~~~~~~
| |
| int
include/drm/drm_print.h:530:52: note: in definition of macro '__drm_dbg'
530 | #define __drm_dbg(cat, fmt, ...) ___drm_dbg(cat, fmt, ##__VA_ARGS__)
| ^~~
drivers/gpu/drm/drm_gem_cma_helper.c:463:9: note: in expansion of macro 'DRM_DEBUG_PRIME'
463 | DRM_DEBUG_PRIME("dma_addr = %pad, size = %zu\n", &cma_obj->paddr, attach->dmabuf->size);
| ^~~~~~~~~~~~~~~
include/drm/drm_print.h:525:33: note: expected 'struct _ddebug *' but argument is of type 'int'
525 | void ___drm_dbg(struct _ddebug *desc, enum drm_debug_category category, const char *format, ...);
| ~~~~~~~~~~~~~~~~^~~~
>> drivers/gpu/drm/drm_gem_cma_helper.c:463:25: error: incompatible type for argument 2 of '___drm_dbg'
463 | DRM_DEBUG_PRIME("dma_addr = %pad, size = %zu\n", &cma_obj->paddr, attach->dmabuf->size);
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
| |
| char *
include/drm/drm_print.h:530:57: note: in definition of macro '__drm_dbg'
530 | #define __drm_dbg(cat, fmt, ...) ___drm_dbg(cat, fmt, ##__VA_ARGS__)
| ^~~
drivers/gpu/drm/drm_gem_cma_helper.c:463:9: note: in expansion of macro 'DRM_DEBUG_PRIME'
463 | DRM_DEBUG_PRIME("dma_addr = %pad, size = %zu\n", &cma_obj->paddr, attach->dmabuf->size);
| ^~~~~~~~~~~~~~~
include/drm/drm_print.h:525:63: note: expected 'enum drm_debug_category' but argument is of type 'char *'
525 | void ___drm_dbg(struct _ddebug *desc, enum drm_debug_category category, const char *format, ...);
| ~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~
>> drivers/gpu/drm/drm_gem_cma_helper.c:463:58: error: passing argument 3 of '___drm_dbg' from incompatible pointer type [-Werror=incompatible-pointer-types]
463 | DRM_DEBUG_PRIME("dma_addr = %pad, size = %zu\n", &cma_obj->paddr, attach->dmabuf->size);
| ^~~~~~~~~~~~~~~
| |
| dma_addr_t * {aka long long unsigned int *}
include/drm/drm_print.h:530:64: note: in definition of macro '__drm_dbg'
530 | #define __drm_dbg(cat, fmt, ...) ___drm_dbg(cat, fmt, ##__VA_ARGS__)
| ^~~~~~~~~~~
drivers/gpu/drm/drm_gem_cma_helper.c:463:9: note: in expansion of macro 'DRM_DEBUG_PRIME'
463 | DRM_DEBUG_PRIME("dma_addr = %pad, size = %zu\n", &cma_obj->paddr, attach->dmabuf->size);
| ^~~~~~~~~~~~~~~
include/drm/drm_print.h:525:85: note: expected 'const char *' but argument is of type 'dma_addr_t *' {aka 'long long unsigned int *'}
525 | void ___drm_dbg(struct _ddebug *desc, enum drm_debug_category category, const char *format, ...);
| ~~~~~~~~~~~~^~~~~~
cc1: some warnings being treated as errors
--
In file included from include/drm/drm_mm.h:51,
from include/drm/drm_vma_manager.h:26,
from include/drm/drm_gem.h:40,
from include/drm/drm_gem_shmem_helper.h:11,
from drivers/gpu/drm/drm_gem_shmem_helper.c:22:
drivers/gpu/drm/drm_gem_shmem_helper.c: In function 'drm_gem_shmem_get_pages_locked':
include/drm/drm_print.h:580:19: warning: passing argument 1 of '___drm_dbg' makes pointer from integer without a cast [-Wint-conversion]
580 | __drm_dbg(DRM_UT_KMS, fmt, ##__VA_ARGS__)
| ^~~~~~~~~~
| |
| int
include/drm/drm_print.h:530:52: note: in definition of macro '__drm_dbg'
530 | #define __drm_dbg(cat, fmt, ...) ___drm_dbg(cat, fmt, ##__VA_ARGS__)
| ^~~
drivers/gpu/drm/drm_gem_shmem_helper.c:175:17: note: in expansion of macro 'DRM_DEBUG_KMS'
175 | DRM_DEBUG_KMS("Failed to get pages (%ld)\n", PTR_ERR(pages));
| ^~~~~~~~~~~~~
include/drm/drm_print.h:525:33: note: expected 'struct _ddebug *' but argument is of type 'int'
525 | void ___drm_dbg(struct _ddebug *desc, enum drm_debug_category category, const char *format, ...);
| ~~~~~~~~~~~~~~~~^~~~
>> drivers/gpu/drm/drm_gem_shmem_helper.c:175:31: error: incompatible type for argument 2 of '___drm_dbg'
175 | DRM_DEBUG_KMS("Failed to get pages (%ld)\n", PTR_ERR(pages));
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
| |
| char *
include/drm/drm_print.h:530:57: note: in definition of macro '__drm_dbg'
530 | #define __drm_dbg(cat, fmt, ...) ___drm_dbg(cat, fmt, ##__VA_ARGS__)
| ^~~
drivers/gpu/drm/drm_gem_shmem_helper.c:175:17: note: in expansion of macro 'DRM_DEBUG_KMS'
175 | DRM_DEBUG_KMS("Failed to get pages (%ld)\n", PTR_ERR(pages));
| ^~~~~~~~~~~~~
include/drm/drm_print.h:525:63: note: expected 'enum drm_debug_category' but argument is of type 'char *'
525 | void ___drm_dbg(struct _ddebug *desc, enum drm_debug_category category, const char *format, ...);
| ~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~
>> drivers/gpu/drm/drm_gem_shmem_helper.c:175:62: warning: passing argument 3 of '___drm_dbg' makes pointer from integer without a cast [-Wint-conversion]
175 | DRM_DEBUG_KMS("Failed to get pages (%ld)\n", PTR_ERR(pages));
| ^~~~~~~~~~~~~~
| |
| long int
include/drm/drm_print.h:530:64: note: in definition of macro '__drm_dbg'
530 | #define __drm_dbg(cat, fmt, ...) ___drm_dbg(cat, fmt, ##__VA_ARGS__)
| ^~~~~~~~~~~
drivers/gpu/drm/drm_gem_shmem_helper.c:175:17: note: in expansion of macro 'DRM_DEBUG_KMS'
175 | DRM_DEBUG_KMS("Failed to get pages (%ld)\n", PTR_ERR(pages));
| ^~~~~~~~~~~~~
include/drm/drm_print.h:525:85: note: expected 'const char *' but argument is of type 'long int'
525 | void ___drm_dbg(struct _ddebug *desc, enum drm_debug_category category, const char *format, ...);
| ~~~~~~~~~~~~^~~~~~
drivers/gpu/drm/drm_gem_shmem_helper.c: In function 'drm_gem_shmem_vmap_locked':
include/drm/drm_print.h:580:19: warning: passing argument 1 of '___drm_dbg' makes pointer from integer without a cast [-Wint-conversion]
580 | __drm_dbg(DRM_UT_KMS, fmt, ##__VA_ARGS__)
| ^~~~~~~~~~
| |
| int
include/drm/drm_print.h:530:52: note: in definition of macro '__drm_dbg'
530 | #define __drm_dbg(cat, fmt, ...) ___drm_dbg(cat, fmt, ##__VA_ARGS__)
| ^~~
drivers/gpu/drm/drm_gem_shmem_helper.c:326:17: note: in expansion of macro 'DRM_DEBUG_KMS'
326 | DRM_DEBUG_KMS("Failed to vmap pages, error %d\n", ret);
| ^~~~~~~~~~~~~
include/drm/drm_print.h:525:33: note: expected 'struct _ddebug *' but argument is of type 'int'
525 | void ___drm_dbg(struct _ddebug *desc, enum drm_debug_category category, const char *format, ...);
| ~~~~~~~~~~~~~~~~^~~~
drivers/gpu/drm/drm_gem_shmem_helper.c:326:31: error: incompatible type for argument 2 of '___drm_dbg'
326 | DRM_DEBUG_KMS("Failed to vmap pages, error %d\n", ret);
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
| |
| char *
include/drm/drm_print.h:530:57: note: in definition of macro '__drm_dbg'
530 | #define __drm_dbg(cat, fmt, ...) ___drm_dbg(cat, fmt, ##__VA_ARGS__)
| ^~~
drivers/gpu/drm/drm_gem_shmem_helper.c:326:17: note: in expansion of macro 'DRM_DEBUG_KMS'
326 | DRM_DEBUG_KMS("Failed to vmap pages, error %d\n", ret);
| ^~~~~~~~~~~~~
include/drm/drm_print.h:525:63: note: expected 'enum drm_debug_category' but argument is of type 'char *'
525 | void ___drm_dbg(struct _ddebug *desc, enum drm_debug_category category, const char *format, ...);
| ~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~
drivers/gpu/drm/drm_gem_shmem_helper.c:326:67: warning: passing argument 3 of '___drm_dbg' makes pointer from integer without a cast [-Wint-conversion]
326 | DRM_DEBUG_KMS("Failed to vmap pages, error %d\n", ret);
| ^~~
| |
| int
include/drm/drm_print.h:530:64: note: in definition of macro '__drm_dbg'
530 | #define __drm_dbg(cat, fmt, ...) ___drm_dbg(cat, fmt, ##__VA_ARGS__)
| ^~~~~~~~~~~
drivers/gpu/drm/drm_gem_shmem_helper.c:326:17: note: in expansion of macro 'DRM_DEBUG_KMS'
326 | DRM_DEBUG_KMS("Failed to vmap pages, error %d\n", ret);
| ^~~~~~~~~~~~~
include/drm/drm_print.h:525:85: note: expected 'const char *' but argument is of type 'int'
525 | void ___drm_dbg(struct _ddebug *desc, enum drm_debug_category category, const char *format, ...);
| ~~~~~~~~~~~~^~~~~~
drivers/gpu/drm/drm_gem_shmem_helper.c: In function 'drm_gem_shmem_prime_import_sg_table':
include/drm/drm_print.h:584:19: warning: passing argument 1 of '___drm_dbg' makes pointer from integer without a cast [-Wint-conversion]
584 | __drm_dbg(DRM_UT_PRIME, fmt, ##__VA_ARGS__)
| ^~~~~~~~~~~~
| |
| int
include/drm/drm_print.h:530:52: note: in definition of macro '__drm_dbg'
530 | #define __drm_dbg(cat, fmt, ...) ___drm_dbg(cat, fmt, ##__VA_ARGS__)
| ^~~
drivers/gpu/drm/drm_gem_shmem_helper.c:756:9: note: in expansion of macro 'DRM_DEBUG_PRIME'
756 | DRM_DEBUG_PRIME("size = %zu\n", size);
| ^~~~~~~~~~~~~~~
include/drm/drm_print.h:525:33: note: expected 'struct _ddebug *' but argument is of type 'int'
525 | void ___drm_dbg(struct _ddebug *desc, enum drm_debug_category category, const char *format, ...);
| ~~~~~~~~~~~~~~~~^~~~
drivers/gpu/drm/drm_gem_shmem_helper.c:756:25: error: incompatible type for argument 2 of '___drm_dbg'
756 | DRM_DEBUG_PRIME("size = %zu\n", size);
| ^~~~~~~~~~~~~~
| |
| char *
include/drm/drm_print.h:530:57: note: in definition of macro '__drm_dbg'
530 | #define __drm_dbg(cat, fmt, ...) ___drm_dbg(cat, fmt, ##__VA_ARGS__)
| ^~~
drivers/gpu/drm/drm_gem_shmem_helper.c:756:9: note: in expansion of macro 'DRM_DEBUG_PRIME'
756 | DRM_DEBUG_PRIME("size = %zu\n", size);
| ^~~~~~~~~~~~~~~
include/drm/drm_print.h:525:63: note: expected 'enum drm_debug_category' but argument is of type 'char *'
525 | void ___drm_dbg(struct _ddebug *desc, enum drm_debug_category category, const char *format, ...);
| ~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~
drivers/gpu/drm/drm_gem_shmem_helper.c:756:41: warning: passing argument 3 of '___drm_dbg' makes pointer from integer without a cast [-Wint-conversion]
756 | DRM_DEBUG_PRIME("size = %zu\n", size);
| ^~~~
| |
| size_t {aka long unsigned int}
include/drm/drm_print.h:530:64: note: in definition of macro '__drm_dbg'
530 | #define __drm_dbg(cat, fmt, ...) ___drm_dbg(cat, fmt, ##__VA_ARGS__)
| ^~~~~~~~~~~
drivers/gpu/drm/drm_gem_shmem_helper.c:756:9: note: in expansion of macro 'DRM_DEBUG_PRIME'
756 | DRM_DEBUG_PRIME("size = %zu\n", size);
| ^~~~~~~~~~~~~~~
include/drm/drm_print.h:525:85: note: expected 'const char *' but argument is of type 'size_t' {aka 'long unsigned int'}
525 | void ___drm_dbg(struct _ddebug *desc, enum drm_debug_category category, const char *format, ...);
| ~~~~~~~~~~~~^~~~~~
--
In file included from drivers/gpu/drm/drm_crtc_helper.c:48:
drivers/gpu/drm/drm_crtc_helper.c: In function 'drm_crtc_helper_set_mode':
include/drm/drm_print.h:580:19: warning: passing argument 1 of '___drm_dbg' makes pointer from integer without a cast [-Wint-conversion]
580 | __drm_dbg(DRM_UT_KMS, fmt, ##__VA_ARGS__)
| ^~~~~~~~~~
| |
| int
include/drm/drm_print.h:530:52: note: in definition of macro '__drm_dbg'
530 | #define __drm_dbg(cat, fmt, ...) ___drm_dbg(cat, fmt, ##__VA_ARGS__)
| ^~~
drivers/gpu/drm/drm_crtc_helper.c:329:33: note: in expansion of macro 'DRM_DEBUG_KMS'
329 | DRM_DEBUG_KMS("Encoder fixup failed\n");
| ^~~~~~~~~~~~~
include/drm/drm_print.h:525:33: note: expected 'struct _ddebug *' but argument is of type 'int'
525 | void ___drm_dbg(struct _ddebug *desc, enum drm_debug_category category, const char *format, ...);
| ~~~~~~~~~~~~~~~~^~~~
>> drivers/gpu/drm/drm_crtc_helper.c:329:47: error: incompatible type for argument 2 of '___drm_dbg'
329 | DRM_DEBUG_KMS("Encoder fixup failed\n");
| ^~~~~~~~~~~~~~~~~~~~~~~~
| |
| char *
include/drm/drm_print.h:530:57: note: in definition of macro '__drm_dbg'
530 | #define __drm_dbg(cat, fmt, ...) ___drm_dbg(cat, fmt, ##__VA_ARGS__)
| ^~~
drivers/gpu/drm/drm_crtc_helper.c:329:33: note: in expansion of macro 'DRM_DEBUG_KMS'
329 | DRM_DEBUG_KMS("Encoder fixup failed\n");
| ^~~~~~~~~~~~~
include/drm/drm_print.h:525:63: note: expected 'enum drm_debug_category' but argument is of type 'char *'
525 | void ___drm_dbg(struct _ddebug *desc, enum drm_debug_category category, const char *format, ...);
| ~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~
>> include/drm/drm_print.h:530:41: error: too few arguments to function '___drm_dbg'
530 | #define __drm_dbg(cat, fmt, ...) ___drm_dbg(cat, fmt, ##__VA_ARGS__)
| ^~~~~~~~~~
include/drm/drm_print.h:580:9: note: in expansion of macro '__drm_dbg'
580 | __drm_dbg(DRM_UT_KMS, fmt, ##__VA_ARGS__)
| ^~~~~~~~~
drivers/gpu/drm/drm_crtc_helper.c:329:33: note: in expansion of macro 'DRM_DEBUG_KMS'
329 | DRM_DEBUG_KMS("Encoder fixup failed\n");
| ^~~~~~~~~~~~~
include/drm/drm_print.h:525:6: note: declared here
525 | void ___drm_dbg(struct _ddebug *desc, enum drm_debug_category category, const char *format, ...);
| ^~~~~~~~~~
include/drm/drm_print.h:580:19: warning: passing argument 1 of '___drm_dbg' makes pointer from integer without a cast [-Wint-conversion]
580 | __drm_dbg(DRM_UT_KMS, fmt, ##__VA_ARGS__)
| ^~~~~~~~~~
| |
| int
include/drm/drm_print.h:530:52: note: in definition of macro '__drm_dbg'
530 | #define __drm_dbg(cat, fmt, ...) ___drm_dbg(cat, fmt, ##__VA_ARGS__)
| ^~~
drivers/gpu/drm/drm_crtc_helper.c:338:25: note: in expansion of macro 'DRM_DEBUG_KMS'
338 | DRM_DEBUG_KMS("CRTC fixup failed\n");
| ^~~~~~~~~~~~~
include/drm/drm_print.h:525:33: note: expected 'struct _ddebug *' but argument is of type 'int'
525 | void ___drm_dbg(struct _ddebug *desc, enum drm_debug_category category, const char *format, ...);
| ~~~~~~~~~~~~~~~~^~~~
drivers/gpu/drm/drm_crtc_helper.c:338:39: error: incompatible type for argument 2 of '___drm_dbg'
338 | DRM_DEBUG_KMS("CRTC fixup failed\n");
| ^~~~~~~~~~~~~~~~~~~~~
| |
| char *
include/drm/drm_print.h:530:57: note: in definition of macro '__drm_dbg'
530 | #define __drm_dbg(cat, fmt, ...) ___drm_dbg(cat, fmt, ##__VA_ARGS__)
| ^~~
drivers/gpu/drm/drm_crtc_helper.c:338:25: note: in expansion of macro 'DRM_DEBUG_KMS'
338 | DRM_DEBUG_KMS("CRTC fixup failed\n");
| ^~~~~~~~~~~~~
include/drm/drm_print.h:525:63: note: expected 'enum drm_debug_category' but argument is of type 'char *'
525 | void ___drm_dbg(struct _ddebug *desc, enum drm_debug_category category, const char *format, ...);
| ~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~
>> include/drm/drm_print.h:530:41: error: too few arguments to function '___drm_dbg'
530 | #define __drm_dbg(cat, fmt, ...) ___drm_dbg(cat, fmt, ##__VA_ARGS__)
| ^~~~~~~~~~
include/drm/drm_print.h:580:9: note: in expansion of macro '__drm_dbg'
580 | __drm_dbg(DRM_UT_KMS, fmt, ##__VA_ARGS__)
| ^~~~~~~~~
drivers/gpu/drm/drm_crtc_helper.c:338:25: note: in expansion of macro 'DRM_DEBUG_KMS'
338 | DRM_DEBUG_KMS("CRTC fixup failed\n");
| ^~~~~~~~~~~~~
include/drm/drm_print.h:525:6: note: declared here
525 | void ___drm_dbg(struct _ddebug *desc, enum drm_debug_category category, const char *format, ...);
| ^~~~~~~~~~
include/drm/drm_print.h:580:19: warning: passing argument 1 of '___drm_dbg' makes pointer from integer without a cast [-Wint-conversion]
580 | __drm_dbg(DRM_UT_KMS, fmt, ##__VA_ARGS__)
| ^~~~~~~~~~
| |
| int
include/drm/drm_print.h:530:52: note: in definition of macro '__drm_dbg'
530 | #define __drm_dbg(cat, fmt, ...) ___drm_dbg(cat, fmt, ##__VA_ARGS__)
| ^~~
drivers/gpu/drm/drm_crtc_helper.c:342:9: note: in expansion of macro 'DRM_DEBUG_KMS'
342 | DRM_DEBUG_KMS("[CRTC:%d:%s]\n", crtc->base.id, crtc->name);
| ^~~~~~~~~~~~~
include/drm/drm_print.h:525:33: note: expected 'struct _ddebug *' but argument is of type 'int'
525 | void ___drm_dbg(struct _ddebug *desc, enum drm_debug_category category, const char *format, ...);
| ~~~~~~~~~~~~~~~~^~~~
drivers/gpu/drm/drm_crtc_helper.c:342:23: error: incompatible type for argument 2 of '___drm_dbg'
342 | DRM_DEBUG_KMS("[CRTC:%d:%s]\n", crtc->base.id, crtc->name);
| ^~~~~~~~~~~~~~~~
| |
| char *
include/drm/drm_print.h:530:57: note: in definition of macro '__drm_dbg'
530 | #define __drm_dbg(cat, fmt, ...) ___drm_dbg(cat, fmt, ##__VA_ARGS__)
| ^~~
drivers/gpu/drm/drm_crtc_helper.c:342:9: note: in expansion of macro 'DRM_DEBUG_KMS'
342 | DRM_DEBUG_KMS("[CRTC:%d:%s]\n", crtc->base.id, crtc->name);
| ^~~~~~~~~~~~~
include/drm/drm_print.h:525:63: note: expected 'enum drm_debug_category' but argument is of type 'char *'
525 | void ___drm_dbg(struct _ddebug *desc, enum drm_debug_category category, const char *format, ...);
| ~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~
>> drivers/gpu/drm/drm_crtc_helper.c:342:51: warning: passing argument 3 of '___drm_dbg' makes pointer from integer without a cast [-Wint-conversion]
342 | DRM_DEBUG_KMS("[CRTC:%d:%s]\n", crtc->base.id, crtc->name);
| ~~~~~~~~~~^~~
| |
| uint32_t {aka unsigned int}
include/drm/drm_print.h:530:64: note: in definition of macro '__drm_dbg'
530 | #define __drm_dbg(cat, fmt, ...) ___drm_dbg(cat, fmt, ##__VA_ARGS__)
| ^~~~~~~~~~~
drivers/gpu/drm/drm_crtc_helper.c:342:9: note: in expansion of macro 'DRM_DEBUG_KMS'
342 | DRM_DEBUG_KMS("[CRTC:%d:%s]\n", crtc->base.id, crtc->name);
| ^~~~~~~~~~~~~
include/drm/drm_print.h:525:85: note: expected 'const char *' but argument is of type 'uint32_t' {aka 'unsigned int'}
525 | void ___drm_dbg(struct _ddebug *desc, enum drm_debug_category category, const char *format, ...);
| ~~~~~~~~~~~~^~~~~~
include/drm/drm_print.h:580:19: warning: passing argument 1 of '___drm_dbg' makes pointer from integer without a cast [-Wint-conversion]
580 | __drm_dbg(DRM_UT_KMS, fmt, ##__VA_ARGS__)
| ^~~~~~~~~~
| |
| int
include/drm/drm_print.h:530:52: note: in definition of macro '__drm_dbg'
530 | #define __drm_dbg(cat, fmt, ...) ___drm_dbg(cat, fmt, ##__VA_ARGS__)
| ^~~
drivers/gpu/drm/drm_crtc_helper.c:381:17: note: in expansion of macro 'DRM_DEBUG_KMS'
381 | DRM_DEBUG_KMS("[ENCODER:%d:%s] set [MODE:%s]\n",
| ^~~~~~~~~~~~~
include/drm/drm_print.h:525:33: note: expected 'struct _ddebug *' but argument is of type 'int'
525 | void ___drm_dbg(struct _ddebug *desc, enum drm_debug_category category, const char *format, ...);
| ~~~~~~~~~~~~~~~~^~~~
drivers/gpu/drm/drm_crtc_helper.c:381:31: error: incompatible type for argument 2 of '___drm_dbg'
381 | DRM_DEBUG_KMS("[ENCODER:%d:%s] set [MODE:%s]\n",
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
| |
| char *
include/drm/drm_print.h:530:57: note: in definition of macro '__drm_dbg'
530 | #define __drm_dbg(cat, fmt, ...) ___drm_dbg(cat, fmt, ##__VA_ARGS__)
| ^~~
drivers/gpu/drm/drm_crtc_helper.c:381:17: note: in expansion of macro 'DRM_DEBUG_KMS'
381 | DRM_DEBUG_KMS("[ENCODER:%d:%s] set [MODE:%s]\n",
| ^~~~~~~~~~~~~
include/drm/drm_print.h:525:63: note: expected 'enum drm_debug_category' but argument is of type 'char *'
525 | void ___drm_dbg(struct _ddebug *desc, enum drm_debug_category category, const char *format, ...);
| ~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~
drivers/gpu/drm/drm_crtc_helper.c:382:38: warning: passing argument 3 of '___drm_dbg' makes pointer from integer without a cast [-Wint-conversion]
382 | encoder->base.id, encoder->name, mode->name);
| ~~~~~~~~~~~~~^~~
| |
| uint32_t {aka unsigned int}
include/drm/drm_print.h:530:64: note: in definition of macro '__drm_dbg'
530 | #define __drm_dbg(cat, fmt, ...) ___drm_dbg(cat, fmt, ##__VA_ARGS__)
| ^~~~~~~~~~~
drivers/gpu/drm/drm_crtc_helper.c:381:17: note: in expansion of macro 'DRM_DEBUG_KMS'
381 | DRM_DEBUG_KMS("[ENCODER:%d:%s] set [MODE:%s]\n",
| ^~~~~~~~~~~~~
include/drm/drm_print.h:525:85: note: expected 'const char *' but argument is of type 'uint32_t' {aka 'unsigned int'}
525 | void ___drm_dbg(struct _ddebug *desc, enum drm_debug_category category, const char *format, ...);
| ~~~~~~~~~~~~^~~~~~
drivers/gpu/drm/drm_crtc_helper.c: In function 'drm_crtc_helper_set_config':
include/drm/drm_print.h:580:19: warning: passing argument 1 of '___drm_dbg' makes pointer from integer without a cast [-Wint-conversion]
580 | __drm_dbg(DRM_UT_KMS, fmt, ##__VA_ARGS__)
| ^~~~~~~~~~
| |
| int
include/drm/drm_print.h:530:52: note: in definition of macro '__drm_dbg'
530 | #define __drm_dbg(cat, fmt, ...) ___drm_dbg(cat, fmt, ##__VA_ARGS__)
| ^~~
drivers/gpu/drm/drm_crtc_helper.c:532:9: note: in expansion of macro 'DRM_DEBUG_KMS'
532 | DRM_DEBUG_KMS("\n");
| ^~~~~~~~~~~~~
include/drm/drm_print.h:525:33: note: expected 'struct _ddebug *' but argument is of type 'int'
525 | void ___drm_dbg(struct _ddebug *desc, enum drm_debug_category category, const char *format, ...);
| ~~~~~~~~~~~~~~~~^~~~
drivers/gpu/drm/drm_crtc_helper.c:532:23: error: incompatible type for argument 2 of '___drm_dbg'
532 | DRM_DEBUG_KMS("\n");
| ^~~~
| |
| char *
include/drm/drm_print.h:530:57: note: in definition of macro '__drm_dbg'
530 | #define __drm_dbg(cat, fmt, ...) ___drm_dbg(cat, fmt, ##__VA_ARGS__)
| ^~~
drivers/gpu/drm/drm_crtc_helper.c:532:9: note: in expansion of macro 'DRM_DEBUG_KMS'
532 | DRM_DEBUG_KMS("\n");
| ^~~~~~~~~~~~~
include/drm/drm_print.h:525:63: note: expected 'enum drm_debug_category' but argument is of type 'char *'
525 | void ___drm_dbg(struct _ddebug *desc, enum drm_debug_category category, const char *format, ...);
| ~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~
>> include/drm/drm_print.h:530:41: error: too few arguments to function '___drm_dbg'
530 | #define __drm_dbg(cat, fmt, ...) ___drm_dbg(cat, fmt, ##__VA_ARGS__)
| ^~~~~~~~~~
include/drm/drm_print.h:580:9: note: in expansion of macro '__drm_dbg'
580 | __drm_dbg(DRM_UT_KMS, fmt, ##__VA_ARGS__)
| ^~~~~~~~~
drivers/gpu/drm/drm_crtc_helper.c:532:9: note: in expansion of macro 'DRM_DEBUG_KMS'
532 | DRM_DEBUG_KMS("\n");
| ^~~~~~~~~~~~~
include/drm/drm_print.h:525:6: note: declared here
525 | void ___drm_dbg(struct _ddebug *desc, enum drm_debug_category category, const char *format, ...);
| ^~~~~~~~~~
include/drm/drm_print.h:580:19: warning: passing argument 1 of '___drm_dbg' makes pointer from integer without a cast [-Wint-conversion]
580 | __drm_dbg(DRM_UT_KMS, fmt, ##__VA_ARGS__)
| ^~~~~~~~~~
| |
| int
include/drm/drm_print.h:530:52: note: in definition of macro '__drm_dbg'
530 | #define __drm_dbg(cat, fmt, ...) ___drm_dbg(cat, fmt, ##__VA_ARGS__)
| ^~~
drivers/gpu/drm/drm_crtc_helper.c:551:17: note: in expansion of macro 'DRM_DEBUG_KMS'
551 | DRM_DEBUG_KMS("[CRTC:%d:%s] [FB:%d] #connectors=%d (x y) (%i %i)\n",
| ^~~~~~~~~~~~~
include/drm/drm_print.h:525:33: note: expected 'struct _ddebug *' but argument is of type 'int'
525 | void ___drm_dbg(struct _ddebug *desc, enum drm_debug_category category, const char *format, ...);
| ~~~~~~~~~~~~~~~~^~~~
drivers/gpu/drm/drm_crtc_helper.c:551:31: error: incompatible type for argument 2 of '___drm_dbg'
551 | DRM_DEBUG_KMS("[CRTC:%d:%s] [FB:%d] #connectors=%d (x y) (%i %i)\n",
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
| |
| char *
include/drm/drm_print.h:530:57: note: in definition of macro '__drm_dbg'
530 | #define __drm_dbg(cat, fmt, ...) ___drm_dbg(cat, fmt, ##__VA_ARGS__)
| ^~~
drivers/gpu/drm/drm_crtc_helper.c:551:17: note: in expansion of macro 'DRM_DEBUG_KMS'
551 | DRM_DEBUG_KMS("[CRTC:%d:%s] [FB:%d] #connectors=%d (x y) (%i %i)\n",
| ^~~~~~~~~~~~~
include/drm/drm_print.h:525:63: note: expected 'enum drm_debug_category' but argument is of type 'char *'
525 | void ___drm_dbg(struct _ddebug *desc, enum drm_debug_category category, const char *format, ...);
| ~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~
drivers/gpu/drm/drm_crtc_helper.c:552:46: warning: passing argument 3 of '___drm_dbg' makes pointer from integer without a cast [-Wint-conversion]
552 | set->crtc->base.id, set->crtc->name,
| ~~~~~~~~~~~~~~~^~~
| |
| uint32_t {aka unsigned int}
include/drm/drm_print.h:530:64: note: in definition of macro '__drm_dbg'
530 | #define __drm_dbg(cat, fmt, ...) ___drm_dbg(cat, fmt, ##__VA_ARGS__)
| ^~~~~~~~~~~
drivers/gpu/drm/drm_crtc_helper.c:551:17: note: in expansion of macro 'DRM_DEBUG_KMS'
551 | DRM_DEBUG_KMS("[CRTC:%d:%s] [FB:%d] #connectors=%d (x y) (%i %i)\n",
| ^~~~~~~~~~~~~
include/drm/drm_print.h:525:85: note: expected 'const char *' but argument is of type 'uint32_t' {aka 'unsigned int'}
525 | void ___drm_dbg(struct _ddebug *desc, enum drm_debug_category category, const char *format, ...);
| ~~~~~~~~~~~~^~~~~~
include/drm/drm_print.h:580:19: warning: passing argument 1 of '___drm_dbg' makes pointer from integer without a cast [-Wint-conversion]
580 | __drm_dbg(DRM_UT_KMS, fmt, ##__VA_ARGS__)
| ^~~~~~~~~~
| |
| int
include/drm/drm_print.h:530:52: note: in definition of macro '__drm_dbg'
530 | #define __drm_dbg(cat, fmt, ...) ___drm_dbg(cat, fmt, ##__VA_ARGS__)
| ^~~
drivers/gpu/drm/drm_crtc_helper.c:556:17: note: in expansion of macro 'DRM_DEBUG_KMS'
556 | DRM_DEBUG_KMS("[CRTC:%d:%s] [NOFB]\n",
| ^~~~~~~~~~~~~
include/drm/drm_print.h:525:33: note: expected 'struct _ddebug *' but argument is of type 'int'
525 | void ___drm_dbg(struct _ddebug *desc, enum drm_debug_category category, const char *format, ...);
| ~~~~~~~~~~~~~~~~^~~~
drivers/gpu/drm/drm_crtc_helper.c:556:31: error: incompatible type for argument 2 of '___drm_dbg'
556 | DRM_DEBUG_KMS("[CRTC:%d:%s] [NOFB]\n",
| ^~~~~~~~~~~~~~~~~~~~~~~
| |
| char *
include/drm/drm_print.h:530:57: note: in definition of macro '__drm_dbg'
530 | #define __drm_dbg(cat, fmt, ...) ___drm_dbg(cat, fmt, ##__VA_ARGS__)
| ^~~
drivers/gpu/drm/drm_crtc_helper.c:556:17: note: in expansion of macro 'DRM_DEBUG_KMS'
556 | DRM_DEBUG_KMS("[CRTC:%d:%s] [NOFB]\n",
| ^~~~~~~~~~~~~
include/drm/drm_print.h:525:63: note: expected 'enum drm_debug_category' but argument is of type 'char *'
525 | void ___drm_dbg(struct _ddebug *desc, enum drm_debug_category category, const char *format, ...);
| ~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~
drivers/gpu/drm/drm_crtc_helper.c:557:46: warning: passing argument 3 of '___drm_dbg' makes pointer from integer without a cast [-Wint-conversion]
557 | set->crtc->base.id, set->crtc->name);
| ~~~~~~~~~~~~~~~^~~
| |
| uint32_t {aka unsigned int}
include/drm/drm_print.h:530:64: note: in definition of macro '__drm_dbg'
530 | #define __drm_dbg(cat, fmt, ...) ___drm_dbg(cat, fmt, ##__VA_ARGS__)
| ^~~~~~~~~~~
drivers/gpu/drm/drm_crtc_helper.c:556:17: note: in expansion of macro 'DRM_DEBUG_KMS'
556 | DRM_DEBUG_KMS("[CRTC:%d:%s] [NOFB]\n",
| ^~~~~~~~~~~~~
include/drm/drm_print.h:525:85: note: expected 'const char *' but argument is of type 'uint32_t' {aka 'unsigned int'}
525 | void ___drm_dbg(struct _ddebug *desc, enum drm_debug_category category, const char *format, ...);
| ~~~~~~~~~~~~^~~~~~
include/drm/drm_print.h:580:19: warning: passing argument 1 of '___drm_dbg' makes pointer from integer without a cast [-Wint-conversion]
580 | __drm_dbg(DRM_UT_KMS, fmt, ##__VA_ARGS__)
| ^~~~~~~~~~
| |
| int
include/drm/drm_print.h:530:52: note: in definition of macro '__drm_dbg'
530 | #define __drm_dbg(cat, fmt, ...) ___drm_dbg(cat, fmt, ##__VA_ARGS__)
| ^~~
drivers/gpu/drm/drm_crtc_helper.c:607:25: note: in expansion of macro 'DRM_DEBUG_KMS'
607 | DRM_DEBUG_KMS("crtc has no fb, full mode set\n");
| ^~~~~~~~~~~~~
include/drm/drm_print.h:525:33: note: expected 'struct _ddebug *' but argument is of type 'int'
525 | void ___drm_dbg(struct _ddebug *desc, enum drm_debug_category category, const char *format, ...);
| ~~~~~~~~~~~~~~~~^~~~
drivers/gpu/drm/drm_crtc_helper.c:607:39: error: incompatible type for argument 2 of '___drm_dbg'
607 | DRM_DEBUG_KMS("crtc has no fb, full mode set\n");
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
| |
| char *
include/drm/drm_print.h:530:57: note: in definition of macro '__drm_dbg'
530 | #define __drm_dbg(cat, fmt, ...) ___drm_dbg(cat, fmt, ##__VA_ARGS__)
| ^~~
drivers/gpu/drm/drm_crtc_helper.c:607:25: note: in expansion of macro 'DRM_DEBUG_KMS'
607 | DRM_DEBUG_KMS("crtc has no fb, full mode set\n");
| ^~~~~~~~~~~~~
include/drm/drm_print.h:525:63: note: expected 'enum drm_debug_category' but argument is of type 'char *'
525 | void ___drm_dbg(struct _ddebug *desc, enum drm_debug_category category, const char *format, ...);
| ~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~
>> include/drm/drm_print.h:530:41: error: too few arguments to function '___drm_dbg'
530 | #define __drm_dbg(cat, fmt, ...) ___drm_dbg(cat, fmt, ##__VA_ARGS__)
| ^~~~~~~~~~
include/drm/drm_print.h:580:9: note: in expansion of macro '__drm_dbg'
580 | __drm_dbg(DRM_UT_KMS, fmt, ##__VA_ARGS__)
| ^~~~~~~~~
drivers/gpu/drm/drm_crtc_helper.c:607:25: note: in expansion of macro 'DRM_DEBUG_KMS'
607 | DRM_DEBUG_KMS("crtc has no fb, full mode set\n");
| ^~~~~~~~~~~~~
include/drm/drm_print.h:525:6: note: declared here
525 | void ___drm_dbg(struct _ddebug *desc, enum drm_debug_category category, const char *format, ...);
| ^~~~~~~~~~
include/drm/drm_print.h:580:19: warning: passing argument 1 of '___drm_dbg' makes pointer from integer without a cast [-Wint-conversion]
580 | __drm_dbg(DRM_UT_KMS, fmt, ##__VA_ARGS__)
| ^~~~~~~~~~
| |
| int
include/drm/drm_print.h:530:52: note: in definition of macro '__drm_dbg'
530 | #define __drm_dbg(cat, fmt, ...) ___drm_dbg(cat, fmt, ##__VA_ARGS__)
| ^~~
drivers/gpu/drm/drm_crtc_helper.c:619:17: note: in expansion of macro 'DRM_DEBUG_KMS'
619 | DRM_DEBUG_KMS("modes are different, full mode set\n");
| ^~~~~~~~~~~~~
include/drm/drm_print.h:525:33: note: expected 'struct _ddebug *' but argument is of type 'int'
525 | void ___drm_dbg(struct _ddebug *desc, enum drm_debug_category category, const char *format, ...);
| ~~~~~~~~~~~~~~~~^~~~
drivers/gpu/drm/drm_crtc_helper.c:619:31: error: incompatible type for argument 2 of '___drm_dbg'
619 | DRM_DEBUG_KMS("modes are different, full mode set\n");
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
| |
| char *
include/drm/drm_print.h:530:57: note: in definition of macro '__drm_dbg'
530 | #define __drm_dbg(cat, fmt, ...) ___drm_dbg(cat, fmt, ##__VA_ARGS__)
| ^~~
drivers/gpu/drm/drm_crtc_helper.c:619:17: note: in expansion of macro 'DRM_DEBUG_KMS'
619 | DRM_DEBUG_KMS("modes are different, full mode set\n");
| ^~~~~~~~~~~~~
include/drm/drm_print.h:525:63: note: expected 'enum drm_debug_category' but argument is of type 'char *'
525 | void ___drm_dbg(struct _ddebug *desc, enum drm_debug_category category, const char *format, ...);
| ~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~
>> include/drm/drm_print.h:530:41: error: too few arguments to function '___drm_dbg'
530 | #define __drm_dbg(cat, fmt, ...) ___drm_dbg(cat, fmt, ##__VA_ARGS__)
| ^~~~~~~~~~
include/drm/drm_print.h:580:9: note: in expansion of macro '__drm_dbg'
580 | __drm_dbg(DRM_UT_KMS, fmt, ##__VA_ARGS__)
| ^~~~~~~~~
drivers/gpu/drm/drm_crtc_helper.c:619:17: note: in expansion of macro 'DRM_DEBUG_KMS'
619 | DRM_DEBUG_KMS("modes are different, full mode set\n");
| ^~~~~~~~~~~~~
include/drm/drm_print.h:525:6: note: declared here
525 | void ___drm_dbg(struct _ddebug *desc, enum drm_debug_category category, const char *format, ...);
| ^~~~~~~~~~
include/drm/drm_print.h:580:19: warning: passing argument 1 of '___drm_dbg' makes pointer from integer without a cast [-Wint-conversion]
580 | __drm_dbg(DRM_UT_KMS, fmt, ##__VA_ARGS__)
| ^~~~~~~~~~
| |
| int
include/drm/drm_print.h:530:52: note: in definition of macro '__drm_dbg'
530 | #define __drm_dbg(cat, fmt, ...) ___drm_dbg(cat, fmt, ##__VA_ARGS__)
| ^~~
drivers/gpu/drm/drm_crtc_helper.c:655:41: note: in expansion of macro 'DRM_DEBUG_KMS'
655 | DRM_DEBUG_KMS("connector dpms not on, full mode switch\n");
| ^~~~~~~~~~~~~
include/drm/drm_print.h:525:33: note: expected 'struct _ddebug *' but argument is of type 'int'
525 | void ___drm_dbg(struct _ddebug *desc, enum drm_debug_category category, const char *format, ...);
| ~~~~~~~~~~~~~~~~^~~~
drivers/gpu/drm/drm_crtc_helper.c:655:55: error: incompatible type for argument 2 of '___drm_dbg'
655 | DRM_DEBUG_KMS("connector dpms not on, full mode switch\n");
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
| |
| char *
include/drm/drm_print.h:530:57: note: in definition of macro '__drm_dbg'
530 | #define __drm_dbg(cat, fmt, ...) ___drm_dbg(cat, fmt, ##__VA_ARGS__)
| ^~~
drivers/gpu/drm/drm_crtc_helper.c:655:41: note: in expansion of macro 'DRM_DEBUG_KMS'
655 | DRM_DEBUG_KMS("connector dpms not on, full mode switch\n");
| ^~~~~~~~~~~~~
include/drm/drm_print.h:525:63: note: expected 'enum drm_debug_category' but argument is of type 'char *'
525 | void ___drm_dbg(struct _ddebug *desc, enum drm_debug_category category, const char *format, ...);
| ~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~
>> include/drm/drm_print.h:530:41: error: too few arguments to function '___drm_dbg'
530 | #define __drm_dbg(cat, fmt, ...) ___drm_dbg(cat, fmt, ##__VA_ARGS__)
| ^~~~~~~~~~
include/drm/drm_print.h:580:9: note: in expansion of macro '__drm_dbg'
580 | __drm_dbg(DRM_UT_KMS, fmt, ##__VA_ARGS__)
| ^~~~~~~~~
drivers/gpu/drm/drm_crtc_helper.c:655:41: note: in expansion of macro 'DRM_DEBUG_KMS'
655 | DRM_DEBUG_KMS("connector dpms not on, full mode switch\n");
| ^~~~~~~~~~~~~
include/drm/drm_print.h:525:6: note: declared here
525 | void ___drm_dbg(struct _ddebug *desc, enum drm_debug_category category, const char *format, ...);
| ^~~~~~~~~~
include/drm/drm_print.h:580:19: warning: passing argument 1 of '___drm_dbg' makes pointer from integer without a cast [-Wint-conversion]
580 | __drm_dbg(DRM_UT_KMS, fmt, ##__VA_ARGS__)
| ^~~~~~~~~~
| |
| int
include/drm/drm_print.h:530:52: note: in definition of macro '__drm_dbg'
530 | #define __drm_dbg(cat, fmt, ...) ___drm_dbg(cat, fmt, ##__VA_ARGS__)
| ^~~
drivers/gpu/drm/drm_crtc_helper.c:664:25: note: in expansion of macro 'DRM_DEBUG_KMS'
664 | DRM_DEBUG_KMS("encoder changed, full mode switch\n");
| ^~~~~~~~~~~~~
include/drm/drm_print.h:525:33: note: expected 'struct _ddebug *' but argument is of type 'int'
525 | void ___drm_dbg(struct _ddebug *desc, enum drm_debug_category category, const char *format, ...);
| ~~~~~~~~~~~~~~~~^~~~
drivers/gpu/drm/drm_crtc_helper.c:664:39: error: incompatible type for argument 2 of '___drm_dbg'
664 | DRM_DEBUG_KMS("encoder changed, full mode switch\n");
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
| |
| char *
include/drm/drm_print.h:530:57: note: in definition of macro '__drm_dbg'
530 | #define __drm_dbg(cat, fmt, ...) ___drm_dbg(cat, fmt, ##__VA_ARGS__)
| ^~~
drivers/gpu/drm/drm_crtc_helper.c:664:25: note: in expansion of macro 'DRM_DEBUG_KMS'
664 | DRM_DEBUG_KMS("encoder changed, full mode switch\n");
| ^~~~~~~~~~~~~
include/drm/drm_print.h:525:63: note: expected 'enum drm_debug_category' but argument is of type 'char *'
525 | void ___drm_dbg(struct _ddebug *desc, enum drm_debug_category category, const char *format, ...);
| ~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~
>> include/drm/drm_print.h:530:41: error: too few arguments to function '___drm_dbg'
530 | #define __drm_dbg(cat, fmt, ...) ___drm_dbg(cat, fmt, ##__VA_ARGS__)
| ^~~~~~~~~~
include/drm/drm_print.h:580:9: note: in expansion of macro '__drm_dbg'
580 | __drm_dbg(DRM_UT_KMS, fmt, ##__VA_ARGS__)
| ^~~~~~~~~
drivers/gpu/drm/drm_crtc_helper.c:664:25: note: in expansion of macro 'DRM_DEBUG_KMS'
664 | DRM_DEBUG_KMS("encoder changed, full mode switch\n");
| ^~~~~~~~~~~~~
include/drm/drm_print.h:525:6: note: declared here
525 | void ___drm_dbg(struct _ddebug *desc, enum drm_debug_category category, const char *format, ...);
| ^~~~~~~~~~
include/drm/drm_print.h:580:19: warning: passing argument 1 of '___drm_dbg' makes pointer from integer without a cast [-Wint-conversion]
580 | __drm_dbg(DRM_UT_KMS, fmt, ##__VA_ARGS__)
| ^~~~~~~~~~
| |
| int
include/drm/drm_print.h:530:52: note: in definition of macro '__drm_dbg'
530 | #define __drm_dbg(cat, fmt, ...) ___drm_dbg(cat, fmt, ##__VA_ARGS__)
| ^~~
drivers/gpu/drm/drm_crtc_helper.c:705:25: note: in expansion of macro 'DRM_DEBUG_KMS'
705 | DRM_DEBUG_KMS("crtc changed, full mode switch\n");
| ^~~~~~~~~~~~~
include/drm/drm_print.h:525:33: note: expected 'struct _ddebug *' but argument is of type 'int'
525 | void ___drm_dbg(struct _ddebug *desc, enum drm_debug_category category, const char *format, ...);
| ~~~~~~~~~~~~~~~~^~~~
drivers/gpu/drm/drm_crtc_helper.c:705:39: error: incompatible type for argument 2 of '___drm_dbg'
705 | DRM_DEBUG_KMS("crtc changed, full mode switch\n");
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
| |
| char *
include/drm/drm_print.h:530:57: note: in definition of macro '__drm_dbg'
530 | #define __drm_dbg(cat, fmt, ...) ___drm_dbg(cat, fmt, ##__VA_ARGS__)
| ^~~
drivers/gpu/drm/drm_crtc_helper.c:705:25: note: in expansion of macro 'DRM_DEBUG_KMS'
705 | DRM_DEBUG_KMS("crtc changed, full mode switch\n");
| ^~~~~~~~~~~~~
include/drm/drm_print.h:525:63: note: expected 'enum drm_debug_category' but argument is of type 'char *'
525 | void ___drm_dbg(struct _ddebug *desc, enum drm_debug_category category, const char *format, ...);
| ~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~
>> include/drm/drm_print.h:530:41: error: too few arguments to function '___drm_dbg'
530 | #define __drm_dbg(cat, fmt, ...) ___drm_dbg(cat, fmt, ##__VA_ARGS__)
| ^~~~~~~~~~
include/drm/drm_print.h:580:9: note: in expansion of macro '__drm_dbg'
580 | __drm_dbg(DRM_UT_KMS, fmt, ##__VA_ARGS__)
| ^~~~~~~~~
drivers/gpu/drm/drm_crtc_helper.c:705:25: note: in expansion of macro 'DRM_DEBUG_KMS'
705 | DRM_DEBUG_KMS("crtc changed, full mode switch\n");
| ^~~~~~~~~~~~~
include/drm/drm_print.h:525:6: note: declared here
525 | void ___drm_dbg(struct _ddebug *desc, enum drm_debug_category category, const char *format, ...);
| ^~~~~~~~~~
include/drm/drm_print.h:580:19: warning: passing argument 1 of '___drm_dbg' makes pointer from integer without a cast [-Wint-conversion]
580 | __drm_dbg(DRM_UT_KMS, fmt, ##__VA_ARGS__)
| ^~~~~~~~~~
| |
| int
include/drm/drm_print.h:530:52: note: in definition of macro '__drm_dbg'
530 | #define __drm_dbg(cat, fmt, ...) ___drm_dbg(cat, fmt, ##__VA_ARGS__)
| ^~~
drivers/gpu/drm/drm_crtc_helper.c:710:25: note: in expansion of macro 'DRM_DEBUG_KMS'
710 | DRM_DEBUG_KMS("[CONNECTOR:%d:%s] to [CRTC:%d:%s]\n",
| ^~~~~~~~~~~~~
include/drm/drm_print.h:525:33: note: expected 'struct _ddebug *' but argument is of type 'int'
525 | void ___drm_dbg(struct _ddebug *desc, enum drm_debug_category category, const char *format, ...);
| ~~~~~~~~~~~~~~~~^~~~
drivers/gpu/drm/drm_crtc_helper.c:710:39: error: incompatible type for argument 2 of '___drm_dbg'
710 | DRM_DEBUG_KMS("[CONNECTOR:%d:%s] to [CRTC:%d:%s]\n",
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
| |
| char *
include/drm/drm_print.h:530:57: note: in definition of macro '__drm_dbg'
530 | #define __drm_dbg(cat, fmt, ...) ___drm_dbg(cat, fmt, ##__VA_ARGS__)
| ^~~
drivers/gpu/drm/drm_crtc_helper.c:710:25: note: in expansion of macro 'DRM_DEBUG_KMS'
710 | DRM_DEBUG_KMS("[CONNECTOR:%d:%s] to [CRTC:%d:%s]\n",
| ^~~~~~~~~~~~~
include/drm/drm_print.h:525:63: note: expected 'enum drm_debug_category' but argument is of type 'char *'
525 | void ___drm_dbg(struct _ddebug *desc, enum drm_debug_category category, const char *format, ...);
| ~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~
drivers/gpu/drm/drm_crtc_helper.c:711:54: warning: passing argument 3 of '___drm_dbg' makes pointer from integer without a cast [-Wint-conversion]
711 | connector->base.id, connector->name,
| ~~~~~~~~~~~~~~~^~~
| |
| uint32_t {aka unsigned int}
include/drm/drm_print.h:530:64: note: in definition of macro '__drm_dbg'
530 | #define __drm_dbg(cat, fmt, ...) ___drm_dbg(cat, fmt, ##__VA_ARGS__)
| ^~~~~~~~~~~
drivers/gpu/drm/drm_crtc_helper.c:710:25: note: in expansion of macro 'DRM_DEBUG_KMS'
710 | DRM_DEBUG_KMS("[CONNECTOR:%d:%s] to [CRTC:%d:%s]\n",
| ^~~~~~~~~~~~~
include/drm/drm_print.h:525:85: note: expected 'const char *' but argument is of type 'uint32_t' {aka 'unsigned int'}
525 | void ___drm_dbg(struct _ddebug *desc, enum drm_debug_category category, const char *format, ...);
| ~~~~~~~~~~~~^~~~~~
include/drm/drm_print.h:580:19: warning: passing argument 1 of '___drm_dbg' makes pointer from integer without a cast [-Wint-conversion]
580 | __drm_dbg(DRM_UT_KMS, fmt, ##__VA_ARGS__)
| ^~~~~~~~~~
| |
| int
include/drm/drm_print.h:530:52: note: in definition of macro '__drm_dbg'
530 | #define __drm_dbg(cat, fmt, ...) ___drm_dbg(cat, fmt, ##__VA_ARGS__)
| ^~~
drivers/gpu/drm/drm_crtc_helper.c:714:25: note: in expansion of macro 'DRM_DEBUG_KMS'
714 | DRM_DEBUG_KMS("[CONNECTOR:%d:%s] to [NOCRTC]\n",
| ^~~~~~~~~~~~~
include/drm/drm_print.h:525:33: note: expected 'struct _ddebug *' but argument is of type 'int'
525 | void ___drm_dbg(struct _ddebug *desc, enum drm_debug_category category, const char *format, ...);
| ~~~~~~~~~~~~~~~~^~~~
drivers/gpu/drm/drm_crtc_helper.c:714:39: error: incompatible type for argument 2 of '___drm_dbg'
714 | DRM_DEBUG_KMS("[CONNECTOR:%d:%s] to [NOCRTC]\n",
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
| |
| char *
include/drm/drm_print.h:530:57: note: in definition of macro '__drm_dbg'
530 | #define __drm_dbg(cat, fmt, ...) ___drm_dbg(cat, fmt, ##__VA_ARGS__)
| ^~~
drivers/gpu/drm/drm_crtc_helper.c:714:25: note: in expansion of macro 'DRM_DEBUG_KMS'
714 | DRM_DEBUG_KMS("[CONNECTOR:%d:%s] to [NOCRTC]\n",
| ^~~~~~~~~~~~~
include/drm/drm_print.h:525:63: note: expected 'enum drm_debug_category' but argument is of type 'char *'
525 | void ___drm_dbg(struct _ddebug *desc, enum drm_debug_category category, const char *format, ...);
| ~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~
drivers/gpu/drm/drm_crtc_helper.c:715:54: warning: passing argument 3 of '___drm_dbg' makes pointer from integer without a cast [-Wint-conversion]
715 | connector->base.id, connector->name);
| ~~~~~~~~~~~~~~~^~~
| |
| uint32_t {aka unsigned int}
include/drm/drm_print.h:530:64: note: in definition of macro '__drm_dbg'
530 | #define __drm_dbg(cat, fmt, ...) ___drm_dbg(cat, fmt, ##__VA_ARGS__)
| ^~~~~~~~~~~
drivers/gpu/drm/drm_crtc_helper.c:714:25: note: in expansion of macro 'DRM_DEBUG_KMS'
714 | DRM_DEBUG_KMS("[CONNECTOR:%d:%s] to [NOCRTC]\n",
| ^~~~~~~~~~~~~
include/drm/drm_print.h:525:85: note: expected 'const char *' but argument is of type 'uint32_t' {aka 'unsigned int'}
525 | void ___drm_dbg(struct _ddebug *desc, enum drm_debug_category category, const char *format, ...);
| ~~~~~~~~~~~~^~~~~~
include/drm/drm_print.h:580:19: warning: passing argument 1 of '___drm_dbg' makes pointer from integer without a cast [-Wint-conversion]
580 | __drm_dbg(DRM_UT_KMS, fmt, ##__VA_ARGS__)
| ^~~~~~~~~~
| |
| int
include/drm/drm_print.h:530:52: note: in definition of macro '__drm_dbg'
530 | #define __drm_dbg(cat, fmt, ...) ___drm_dbg(cat, fmt, ##__VA_ARGS__)
| ^~~
drivers/gpu/drm/drm_crtc_helper.c:726:25: note: in expansion of macro 'DRM_DEBUG_KMS'
726 | DRM_DEBUG_KMS("attempting to set mode from"
| ^~~~~~~~~~~~~
include/drm/drm_print.h:525:33: note: expected 'struct _ddebug *' but argument is of type 'int'
525 | void ___drm_dbg(struct _ddebug *desc, enum drm_debug_category category, const char *format, ...);
| ~~~~~~~~~~~~~~~~^~~~
drivers/gpu/drm/drm_crtc_helper.c:726:39: error: incompatible type for argument 2 of '___drm_dbg'
726 | DRM_DEBUG_KMS("attempting to set mode from"
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
| |
| char *
include/drm/drm_print.h:530:57: note: in definition of macro '__drm_dbg'
530 | #define __drm_dbg(cat, fmt, ...) ___drm_dbg(cat, fmt, ##__VA_ARGS__)
| ^~~
drivers/gpu/drm/drm_crtc_helper.c:726:25: note: in expansion of macro 'DRM_DEBUG_KMS'
726 | DRM_DEBUG_KMS("attempting to set mode from"
| ^~~~~~~~~~~~~
include/drm/drm_print.h:525:63: note: expected 'enum drm_debug_category' but argument is of type 'char *'
525 | void ___drm_dbg(struct _ddebug *desc, enum drm_debug_category category, const char *format, ...);
| ~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~
>> include/drm/drm_print.h:530:41: error: too few arguments to function '___drm_dbg'
530 | #define __drm_dbg(cat, fmt, ...) ___drm_dbg(cat, fmt, ##__VA_ARGS__)
| ^~~~~~~~~~
include/drm/drm_print.h:580:9: note: in expansion of macro '__drm_dbg'
580 | __drm_dbg(DRM_UT_KMS, fmt, ##__VA_ARGS__)
| ^~~~~~~~~
drivers/gpu/drm/drm_crtc_helper.c:726:25: note: in expansion of macro 'DRM_DEBUG_KMS'
726 | DRM_DEBUG_KMS("attempting to set mode from"
| ^~~~~~~~~~~~~
include/drm/drm_print.h:525:6: note: declared here
525 | void ___drm_dbg(struct _ddebug *desc, enum drm_debug_category category, const char *format, ...);
| ^~~~~~~~~~
include/drm/drm_print.h:580:19: warning: passing argument 1 of '___drm_dbg' makes pointer from integer without a cast [-Wint-conversion]
580 | __drm_dbg(DRM_UT_KMS, fmt, ##__VA_ARGS__)
| ^~~~~~~~~~
| |
| int
include/drm/drm_print.h:530:52: note: in definition of macro '__drm_dbg'
530 | #define __drm_dbg(cat, fmt, ...) ___drm_dbg(cat, fmt, ##__VA_ARGS__)
| ^~~
drivers/gpu/drm/drm_crtc_helper.c:739:25: note: in expansion of macro 'DRM_DEBUG_KMS'
739 | DRM_DEBUG_KMS("Setting connector DPMS state to on\n");
| ^~~~~~~~~~~~~
include/drm/drm_print.h:525:33: note: expected 'struct _ddebug *' but argument is of type 'int'
525 | void ___drm_dbg(struct _ddebug *desc, enum drm_debug_category category, const char *format, ...);
| ~~~~~~~~~~~~~~~~^~~~
drivers/gpu/drm/drm_crtc_helper.c:739:39: error: incompatible type for argument 2 of '___drm_dbg'
739 | DRM_DEBUG_KMS("Setting connector DPMS state to on\n");
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
| |
| char *
include/drm/drm_print.h:530:57: note: in definition of macro '__drm_dbg'
530 | #define __drm_dbg(cat, fmt, ...) ___drm_dbg(cat, fmt, ##__VA_ARGS__)
| ^~~
drivers/gpu/drm/drm_crtc_helper.c:739:25: note: in expansion of macro 'DRM_DEBUG_KMS'
739 | DRM_DEBUG_KMS("Setting connector DPMS state to on\n");
| ^~~~~~~~~~~~~
include/drm/drm_print.h:525:63: note: expected 'enum drm_debug_category' but argument is of type 'char *'
525 | void ___drm_dbg(struct _ddebug *desc, enum drm_debug_category category, const char *format, ...);
| ~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~
>> include/drm/drm_print.h:530:41: error: too few arguments to function '___drm_dbg'
530 | #define __drm_dbg(cat, fmt, ...) ___drm_dbg(cat, fmt, ##__VA_ARGS__)
| ^~~~~~~~~~
include/drm/drm_print.h:580:9: note: in expansion of macro '__drm_dbg'
580 | __drm_dbg(DRM_UT_KMS, fmt, ##__VA_ARGS__)
| ^~~~~~~~~
drivers/gpu/drm/drm_crtc_helper.c:739:25: note: in expansion of macro 'DRM_DEBUG_KMS'
739 | DRM_DEBUG_KMS("Setting connector DPMS state to on\n");
| ^~~~~~~~~~~~~
include/drm/drm_print.h:525:6: note: declared here
525 | void ___drm_dbg(struct _ddebug *desc, enum drm_debug_category category, const char *format, ...);
| ^~~~~~~~~~
include/drm/drm_print.h:580:19: warning: passing argument 1 of '___drm_dbg' makes pointer from integer without a cast [-Wint-conversion]
580 | __drm_dbg(DRM_UT_KMS, fmt, ##__VA_ARGS__)
| ^~~~~~~~~~
| |
| int
include/drm/drm_print.h:530:52: note: in definition of macro '__drm_dbg'
530 | #define __drm_dbg(cat, fmt, ...) ___drm_dbg(cat, fmt, ##__VA_ARGS__)
| ^~~
drivers/gpu/drm/drm_crtc_helper.c:741:33: note: in expansion of macro 'DRM_DEBUG_KMS'
741 | DRM_DEBUG_KMS("\t[CONNECTOR:%d:%s] set DPMS on\n", set->connectors[i]->base.id,
| ^~~~~~~~~~~~~
include/drm/drm_print.h:525:33: note: expected 'struct _ddebug *' but argument is of type 'int'
525 | void ___drm_dbg(struct _ddebug *desc, enum drm_debug_category category, const char *format, ...);
| ~~~~~~~~~~~~~~~~^~~~
drivers/gpu/drm/drm_crtc_helper.c:741:47: error: incompatible type for argument 2 of '___drm_dbg'
741 | DRM_DEBUG_KMS("\t[CONNECTOR:%d:%s] set DPMS on\n", set->connectors[i]->base.id,
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
| |
| char *
include/drm/drm_print.h:530:57: note: in definition of macro '__drm_dbg'
530 | #define __drm_dbg(cat, fmt, ...) ___drm_dbg(cat, fmt, ##__VA_ARGS__)
| ^~~
drivers/gpu/drm/drm_crtc_helper.c:741:33: note: in expansion of macro 'DRM_DEBUG_KMS'
741 | DRM_DEBUG_KMS("\t[CONNECTOR:%d:%s] set DPMS on\n", set->connectors[i]->base.id,
| ^~~~~~~~~~~~~
include/drm/drm_print.h:525:63: note: expected 'enum drm_debug_category' but argument is of type 'char *'
525 | void ___drm_dbg(struct _ddebug *desc, enum drm_debug_category category, const char *format, ...);
| ~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~
drivers/gpu/drm/drm_crtc_helper.c:741:108: warning: passing argument 3 of '___drm_dbg' makes pointer from integer without a cast [-Wint-conversion]
741 | DRM_DEBUG_KMS("\t[CONNECTOR:%d:%s] set DPMS on\n", set->connectors[i]->base.id,
| ~~~~~~~~~~~~~~~~~~~~~~~~^~~
| |
| uint32_t {aka unsigned int}
include/drm/drm_print.h:530:64: note: in definition of macro '__drm_dbg'
530 | #define __drm_dbg(cat, fmt, ...) ___drm_dbg(cat, fmt, ##__VA_ARGS__)
| ^~~~~~~~~~~
drivers/gpu/drm/drm_crtc_helper.c:741:33: note: in expansion of macro 'DRM_DEBUG_KMS'
741 | DRM_DEBUG_KMS("\t[CONNECTOR:%d:%s] set DPMS on\n", set->connectors[i]->base.id,
| ^~~~~~~~~~~~~
include/drm/drm_print.h:525:85: note: expected 'const char *' but argument is of type 'uint32_t' {aka 'unsigned int'}
525 | void ___drm_dbg(struct _ddebug *desc, enum drm_debug_category category, const char *format, ...);
| ~~~~~~~~~~~~^~~~~~
..
vim +/___drm_dbg +463 drivers/gpu/drm/drm_gem_cma_helper.c
78467dc5f70fb9 Joonyoung Shim 2013-06-28 426
d7883f8759ab64 Thierry Reding 2014-11-03 427 /**
d7883f8759ab64 Thierry Reding 2014-11-03 428 * drm_gem_cma_prime_import_sg_table - produce a CMA GEM object from another
d7883f8759ab64 Thierry Reding 2014-11-03 429 * driver's scatter/gather table of pinned pages
d7883f8759ab64 Thierry Reding 2014-11-03 430 * @dev: device to import into
d7883f8759ab64 Thierry Reding 2014-11-03 431 * @attach: DMA-BUF attachment
d7883f8759ab64 Thierry Reding 2014-11-03 432 * @sgt: scatter/gather table of pinned pages
d7883f8759ab64 Thierry Reding 2014-11-03 433 *
d7883f8759ab64 Thierry Reding 2014-11-03 434 * This function imports a scatter/gather table exported via DMA-BUF by
d7883f8759ab64 Thierry Reding 2014-11-03 435 * another driver. Imported buffers must be physically contiguous in memory
d7883f8759ab64 Thierry Reding 2014-11-03 436 * (i.e. the scatter/gather table must contain a single entry). Drivers that
421242aab39ebf Daniel Vetter 2016-12-29 437 * use the CMA helpers should set this as their
421242aab39ebf Daniel Vetter 2016-12-29 438 * &drm_driver.gem_prime_import_sg_table callback.
d7883f8759ab64 Thierry Reding 2014-11-03 439 *
d7883f8759ab64 Thierry Reding 2014-11-03 440 * Returns:
d7883f8759ab64 Thierry Reding 2014-11-03 441 * A pointer to a newly created GEM object or an ERR_PTR-encoded negative
d7883f8759ab64 Thierry Reding 2014-11-03 442 * error code on failure.
d7883f8759ab64 Thierry Reding 2014-11-03 443 */
78467dc5f70fb9 Joonyoung Shim 2013-06-28 444 struct drm_gem_object *
b5e9c1a25fcf8a Maarten Lankhorst 2014-01-09 445 drm_gem_cma_prime_import_sg_table(struct drm_device *dev,
b5e9c1a25fcf8a Maarten Lankhorst 2014-01-09 446 struct dma_buf_attachment *attach,
78467dc5f70fb9 Joonyoung Shim 2013-06-28 447 struct sg_table *sgt)
78467dc5f70fb9 Joonyoung Shim 2013-06-28 448 {
78467dc5f70fb9 Joonyoung Shim 2013-06-28 449 struct drm_gem_cma_object *cma_obj;
78467dc5f70fb9 Joonyoung Shim 2013-06-28 450
998fb1a0f478b8 Liviu Dudau 2017-11-10 451 /* check if the entries in the sg_table are contiguous */
d46e7ae24b8153 Marek Szyprowski 2020-05-08 452 if (drm_prime_get_contiguous_size(sgt) < attach->dmabuf->size)
78467dc5f70fb9 Joonyoung Shim 2013-06-28 453 return ERR_PTR(-EINVAL);
78467dc5f70fb9 Joonyoung Shim 2013-06-28 454
78467dc5f70fb9 Joonyoung Shim 2013-06-28 455 /* Create a CMA GEM buffer. */
cf8ccbc72d6109 Paul Cercueil 2021-05-23 456 cma_obj = __drm_gem_cma_create(dev, attach->dmabuf->size, true);
78467dc5f70fb9 Joonyoung Shim 2013-06-28 457 if (IS_ERR(cma_obj))
e7c36347130fc3 Sachin Kamat 2014-07-03 458 return ERR_CAST(cma_obj);
78467dc5f70fb9 Joonyoung Shim 2013-06-28 459
78467dc5f70fb9 Joonyoung Shim 2013-06-28 460 cma_obj->paddr = sg_dma_address(sgt->sgl);
78467dc5f70fb9 Joonyoung Shim 2013-06-28 461 cma_obj->sgt = sgt;
78467dc5f70fb9 Joonyoung Shim 2013-06-28 462
b5e9c1a25fcf8a Maarten Lankhorst 2014-01-09 @463 DRM_DEBUG_PRIME("dma_addr = %pad, size = %zu\n", &cma_obj->paddr, attach->dmabuf->size);
78467dc5f70fb9 Joonyoung Shim 2013-06-28 464
78467dc5f70fb9 Joonyoung Shim 2013-06-28 465 return &cma_obj->base;
78467dc5f70fb9 Joonyoung Shim 2013-06-28 466 }
78467dc5f70fb9 Joonyoung Shim 2013-06-28 467 EXPORT_SYMBOL_GPL(drm_gem_cma_prime_import_sg_table);
78467dc5f70fb9 Joonyoung Shim 2013-06-28 468
:::::: The code at line 463 was first introduced by commit
:::::: b5e9c1a25fcf8a0d664606251a53b5caa6a19d08 drm: Pass dma-buf as argument to gem_prime_import_sg_table
:::::: TO: Maarten Lankhorst <maarten.lankhorst(a)canonical.com>
:::::: CC: Maarten Lankhorst <maarten.lankhorst(a)canonical.com>
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
7 months, 2 weeks
Re: [PATCH v11 29/40] arm64/sme: Provide Kconfig for SME
by kernel test robot
Hi Mark,
I love your patch! Perhaps something to improve:
[auto build test WARNING on dfd42facf1e4ada021b939b4e19c935dcdd55566]
url: https://github.com/0day-ci/linux/commits/Mark-Brown/arm64-sme-Initial-sup...
base: dfd42facf1e4ada021b939b4e19c935dcdd55566
config: arm64-randconfig-s032-20220207 (https://download.01.org/0day-ci/archive/20220208/202202082237.RC01lAqd-lk...)
compiler: aarch64-linux-gcc (GCC) 11.2.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-dirty
# https://github.com/0day-ci/linux/commit/3c145e627affeb9240ccaebb147235e09...
git remote add linux-review https://github.com/0day-ci/linux
git fetch --no-tags linux-review Mark-Brown/arm64-sme-Initial-support-for-the-Scalable-Matrix-Extension/20220207-233825
git checkout 3c145e627affeb9240ccaebb147235e09b229b34
# save the config file to linux build tree
mkdir build_dir
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-11.2.0 make.cross C=1 CF='-fdiagnostic-prefix -D__CHECK_ENDIAN__' O=build_dir ARCH=arm64 SHELL=/bin/bash arch/arm64/kernel/ block/ drivers/nvme/host/ drivers/nvme/target/
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp(a)intel.com>
sparse warnings: (new ones prefixed by >>)
>> arch/arm64/kernel/signal.c:664:43: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected struct user_ctxs [noderef] __user *user @@ got struct user_ctxs * @@
arch/arm64/kernel/signal.c:664:43: sparse: expected struct user_ctxs [noderef] __user *user
arch/arm64/kernel/signal.c:664:43: sparse: got struct user_ctxs *
arch/arm64/kernel/signal.c:936:26: sparse: sparse: incorrect type in assignment (different address spaces) @@ expected void ( [noderef] [usertype] __user *[assigned] [usertype] sigtramp )( ... ) @@ got void * @@
arch/arm64/kernel/signal.c:936:26: sparse: expected void ( [noderef] [usertype] __user *[assigned] [usertype] sigtramp )( ... )
arch/arm64/kernel/signal.c:936:26: sparse: got void *
>> arch/arm64/kernel/signal.c:395:35: sparse: sparse: dereference of noderef expression
>> arch/arm64/kernel/signal.c:395:35: sparse: sparse: dereference of noderef expression
arch/arm64/kernel/signal.c:429:53: sparse: sparse: dereference of noderef expression
arch/arm64/kernel/signal.c:429:53: sparse: sparse: dereference of noderef expression
vim +664 arch/arm64/kernel/signal.c
47ccb02868cead Dave Martin 2017-06-15 621
2c020ed8d148f7 Catalin Marinas 2012-03-05 622 static int restore_sigframe(struct pt_regs *regs,
2c020ed8d148f7 Catalin Marinas 2012-03-05 623 struct rt_sigframe __user *sf)
2c020ed8d148f7 Catalin Marinas 2012-03-05 624 {
2c020ed8d148f7 Catalin Marinas 2012-03-05 625 sigset_t set;
2c020ed8d148f7 Catalin Marinas 2012-03-05 626 int i, err;
47ccb02868cead Dave Martin 2017-06-15 627 struct user_ctxs user;
2c020ed8d148f7 Catalin Marinas 2012-03-05 628
2c020ed8d148f7 Catalin Marinas 2012-03-05 629 err = __copy_from_user(&set, &sf->uc.uc_sigmask, sizeof(set));
2c020ed8d148f7 Catalin Marinas 2012-03-05 630 if (err == 0)
2c020ed8d148f7 Catalin Marinas 2012-03-05 631 set_current_blocked(&set);
2c020ed8d148f7 Catalin Marinas 2012-03-05 632
2c020ed8d148f7 Catalin Marinas 2012-03-05 633 for (i = 0; i < 31; i++)
2c020ed8d148f7 Catalin Marinas 2012-03-05 634 __get_user_error(regs->regs[i], &sf->uc.uc_mcontext.regs[i],
2c020ed8d148f7 Catalin Marinas 2012-03-05 635 err);
2c020ed8d148f7 Catalin Marinas 2012-03-05 636 __get_user_error(regs->sp, &sf->uc.uc_mcontext.sp, err);
2c020ed8d148f7 Catalin Marinas 2012-03-05 637 __get_user_error(regs->pc, &sf->uc.uc_mcontext.pc, err);
2c020ed8d148f7 Catalin Marinas 2012-03-05 638 __get_user_error(regs->pstate, &sf->uc.uc_mcontext.pstate, err);
2c020ed8d148f7 Catalin Marinas 2012-03-05 639
2c020ed8d148f7 Catalin Marinas 2012-03-05 640 /*
2c020ed8d148f7 Catalin Marinas 2012-03-05 641 * Avoid sys_rt_sigreturn() restarting.
2c020ed8d148f7 Catalin Marinas 2012-03-05 642 */
17c28958600928 Dave Martin 2017-08-01 643 forget_syscall(regs);
2c020ed8d148f7 Catalin Marinas 2012-03-05 644
dbd4d7ca563fd0 Mark Rutland 2016-03-01 645 err |= !valid_user_regs(®s->user_regs, current);
47ccb02868cead Dave Martin 2017-06-15 646 if (err == 0)
47ccb02868cead Dave Martin 2017-06-15 647 err = parse_user_sigframe(&user, sf);
2c020ed8d148f7 Catalin Marinas 2012-03-05 648
6d502b6ba1b267 Suzuki K Poulose 2020-01-13 649 if (err == 0 && system_supports_fpsimd()) {
8cd969d28fd284 Dave Martin 2017-10-31 650 if (!user.fpsimd)
8cd969d28fd284 Dave Martin 2017-10-31 651 return -EINVAL;
8cd969d28fd284 Dave Martin 2017-10-31 652
8cd969d28fd284 Dave Martin 2017-10-31 653 if (user.sve) {
8cd969d28fd284 Dave Martin 2017-10-31 654 if (!system_supports_sve())
8cd969d28fd284 Dave Martin 2017-10-31 655 return -EINVAL;
8cd969d28fd284 Dave Martin 2017-10-31 656
8cd969d28fd284 Dave Martin 2017-10-31 657 err = restore_sve_fpsimd_context(&user);
8cd969d28fd284 Dave Martin 2017-10-31 658 } else {
47ccb02868cead Dave Martin 2017-06-15 659 err = restore_fpsimd_context(user.fpsimd);
8cd969d28fd284 Dave Martin 2017-10-31 660 }
8cd969d28fd284 Dave Martin 2017-10-31 661 }
2c020ed8d148f7 Catalin Marinas 2012-03-05 662
a884c063c23007 Mark Brown 2022-02-07 663 if (err == 0 && system_supports_sme() && user.za)
a884c063c23007 Mark Brown 2022-02-07 @664 err = restore_za_context(&user);
a884c063c23007 Mark Brown 2022-02-07 665
2c020ed8d148f7 Catalin Marinas 2012-03-05 666 return err;
2c020ed8d148f7 Catalin Marinas 2012-03-05 667 }
2c020ed8d148f7 Catalin Marinas 2012-03-05 668
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
7 months, 2 weeks
[jimc:dyn-drm-trc 20/21] drivers/gpu/drm/virtio/virtgpu_display.c:179:27: error: incompatible type for argument 2 of '___drm_dbg'
by kernel test robot
tree: https://github.com/jimc/linux.git dyn-drm-trc
head: a78f403dcd7765c2691998346cffdd311310e1d0
commit: 13e0bac0f355292a71358b9a61022e9f4b1bcc43 [20/21] drm_print: add struct _ddebug desc to drm_*dbg
config: openrisc-randconfig-r021-20220208 (https://download.01.org/0day-ci/archive/20220208/202202082222.IuhOFAb1-lk...)
compiler: or1k-linux-gcc (GCC) 11.2.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/jimc/linux/commit/13e0bac0f355292a71358b9a61022e9f4b1b...
git remote add jimc https://github.com/jimc/linux.git
git fetch --no-tags jimc dyn-drm-trc
git checkout 13e0bac0f355292a71358b9a61022e9f4b1bcc43
# save the config file to linux build tree
mkdir build_dir
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-11.2.0 make.cross O=build_dir ARCH=openrisc SHELL=/bin/bash drivers/gpu/drm/
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp(a)intel.com>
All error/warnings (new ones prefixed by >>):
In file included from drivers/gpu/drm/drm_debugfs_crc.c:38:
drivers/gpu/drm/drm_debugfs_crc.c: In function 'crc_control_write':
include/drm/drm_print.h:580:19: warning: passing argument 1 of '___drm_dbg' makes pointer from integer without a cast [-Wint-conversion]
580 | __drm_dbg(DRM_UT_KMS, fmt, ##__VA_ARGS__)
| ^~~~~~~~~~
| |
| int
include/drm/drm_print.h:530:52: note: in definition of macro '__drm_dbg'
530 | #define __drm_dbg(cat, fmt, ...) ___drm_dbg(cat, fmt, ##__VA_ARGS__)
| ^~~
drivers/gpu/drm/drm_debugfs_crc.c:134:17: note: in expansion of macro 'DRM_DEBUG_KMS'
134 | DRM_DEBUG_KMS("Expected < %lu bytes into crtc crc control\n",
| ^~~~~~~~~~~~~
include/drm/drm_print.h:525:33: note: expected 'struct _ddebug *' but argument is of type 'int'
525 | void ___drm_dbg(struct _ddebug *desc, enum drm_debug_category category, const char *format, ...);
| ~~~~~~~~~~~~~~~~^~~~
drivers/gpu/drm/drm_debugfs_crc.c:134:31: error: incompatible type for argument 2 of '___drm_dbg'
134 | DRM_DEBUG_KMS("Expected < %lu bytes into crtc crc control\n",
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
| |
| char *
include/drm/drm_print.h:530:57: note: in definition of macro '__drm_dbg'
530 | #define __drm_dbg(cat, fmt, ...) ___drm_dbg(cat, fmt, ##__VA_ARGS__)
| ^~~
drivers/gpu/drm/drm_debugfs_crc.c:134:17: note: in expansion of macro 'DRM_DEBUG_KMS'
134 | DRM_DEBUG_KMS("Expected < %lu bytes into crtc crc control\n",
| ^~~~~~~~~~~~~
include/drm/drm_print.h:525:63: note: expected 'enum drm_debug_category' but argument is of type 'char *'
525 | void ___drm_dbg(struct _ddebug *desc, enum drm_debug_category category, const char *format, ...);
| ~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~
In file included from arch/openrisc/include/asm/processor.h:19,
from arch/openrisc/include/asm/thread_info.h:22,
from include/linux/thread_info.h:60,
from include/asm-generic/preempt.h:5,
from ./arch/openrisc/include/generated/asm/preempt.h:1,
from include/linux/preempt.h:78,
from include/linux/spinlock.h:55,
from include/linux/wait.h:9,
from include/linux/wait_bit.h:8,
from include/linux/fs.h:6,
from include/linux/debugfs.h:15,
from drivers/gpu/drm/drm_debugfs_crc.c:31:
>> arch/openrisc/include/asm/page.h:25:25: warning: passing argument 3 of '___drm_dbg' makes pointer from integer without a cast [-Wint-conversion]
25 | #define PAGE_SIZE (1UL << PAGE_SHIFT)
| ^~~~~~~~~~~~~~~~~~~
| |
| long unsigned int
include/drm/drm_print.h:530:64: note: in expansion of macro 'PAGE_SIZE'
530 | #define __drm_dbg(cat, fmt, ...) ___drm_dbg(cat, fmt, ##__VA_ARGS__)
| ^~~~~~~~~~~
include/drm/drm_print.h:580:9: note: in expansion of macro '__drm_dbg'
580 | __drm_dbg(DRM_UT_KMS, fmt, ##__VA_ARGS__)
| ^~~~~~~~~
drivers/gpu/drm/drm_debugfs_crc.c:134:17: note: in expansion of macro 'DRM_DEBUG_KMS'
134 | DRM_DEBUG_KMS("Expected < %lu bytes into crtc crc control\n",
| ^~~~~~~~~~~~~
In file included from drivers/gpu/drm/drm_debugfs_crc.c:38:
include/drm/drm_print.h:525:85: note: expected 'const char *' but argument is of type 'long unsigned int'
525 | void ___drm_dbg(struct _ddebug *desc, enum drm_debug_category category, const char *format, ...);
| ~~~~~~~~~~~~^~~~~~
--
In file included from include/drm/drm_mm.h:51,
from include/drm/drm_vma_manager.h:26,
from include/drm/drm_gem.h:40,
from drivers/gpu/drm/virtio/virtgpu_drv.h:40,
from drivers/gpu/drm/virtio/virtgpu_display.c:35:
drivers/gpu/drm/virtio/virtgpu_display.c: In function 'virtio_gpu_conn_get_modes':
>> drivers/gpu/drm/virtio/virtgpu_display.c:179:27: error: incompatible type for argument 2 of '___drm_dbg'
179 | DRM_DEBUG("add mode: %dx%d\n", width, height);
| ^~~~~~~~~~~~~~~~~~~
| |
| char *
include/drm/drm_print.h:530:57: note: in definition of macro '__drm_dbg'
530 | #define __drm_dbg(cat, fmt, ...) ___drm_dbg(cat, fmt, ##__VA_ARGS__)
| ^~~
drivers/gpu/drm/virtio/virtgpu_display.c:179:17: note: in expansion of macro 'DRM_DEBUG'
179 | DRM_DEBUG("add mode: %dx%d\n", width, height);
| ^~~~~~~~~
include/drm/drm_print.h:525:63: note: expected 'enum drm_debug_category' but argument is of type 'char *'
525 | void ___drm_dbg(struct _ddebug *desc, enum drm_debug_category category, const char *format, ...);
| ~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~
>> drivers/gpu/drm/virtio/virtgpu_display.c:179:48: warning: passing argument 3 of '___drm_dbg' makes pointer from integer without a cast [-Wint-conversion]
179 | DRM_DEBUG("add mode: %dx%d\n", width, height);
| ^~~~~
| |
| int
include/drm/drm_print.h:530:64: note: in definition of macro '__drm_dbg'
530 | #define __drm_dbg(cat, fmt, ...) ___drm_dbg(cat, fmt, ##__VA_ARGS__)
| ^~~~~~~~~~~
drivers/gpu/drm/virtio/virtgpu_display.c:179:17: note: in expansion of macro 'DRM_DEBUG'
179 | DRM_DEBUG("add mode: %dx%d\n", width, height);
| ^~~~~~~~~
include/drm/drm_print.h:525:85: note: expected 'const char *' but argument is of type 'int'
525 | void ___drm_dbg(struct _ddebug *desc, enum drm_debug_category category, const char *format, ...);
| ~~~~~~~~~~~~^~~~~~
drivers/gpu/drm/virtio/virtgpu_display.c: In function 'virtio_gpu_conn_mode_valid':
drivers/gpu/drm/virtio/virtgpu_display.c:208:19: error: incompatible type for argument 2 of '___drm_dbg'
208 | DRM_DEBUG("del mode: %dx%d\n", mode->hdisplay, mode->vdisplay);
| ^~~~~~~~~~~~~~~~~~~
| |
| char *
include/drm/drm_print.h:530:57: note: in definition of macro '__drm_dbg'
530 | #define __drm_dbg(cat, fmt, ...) ___drm_dbg(cat, fmt, ##__VA_ARGS__)
| ^~~
drivers/gpu/drm/virtio/virtgpu_display.c:208:9: note: in expansion of macro 'DRM_DEBUG'
208 | DRM_DEBUG("del mode: %dx%d\n", mode->hdisplay, mode->vdisplay);
| ^~~~~~~~~
include/drm/drm_print.h:525:63: note: expected 'enum drm_debug_category' but argument is of type 'char *'
525 | void ___drm_dbg(struct _ddebug *desc, enum drm_debug_category category, const char *format, ...);
| ~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~
drivers/gpu/drm/virtio/virtgpu_display.c:208:44: warning: passing argument 3 of '___drm_dbg' makes pointer from integer without a cast [-Wint-conversion]
208 | DRM_DEBUG("del mode: %dx%d\n", mode->hdisplay, mode->vdisplay);
| ~~~~^~~~~~~~~~
| |
| u16 {aka short unsigned int}
include/drm/drm_print.h:530:64: note: in definition of macro '__drm_dbg'
530 | #define __drm_dbg(cat, fmt, ...) ___drm_dbg(cat, fmt, ##__VA_ARGS__)
| ^~~~~~~~~~~
drivers/gpu/drm/virtio/virtgpu_display.c:208:9: note: in expansion of macro 'DRM_DEBUG'
208 | DRM_DEBUG("del mode: %dx%d\n", mode->hdisplay, mode->vdisplay);
| ^~~~~~~~~
include/drm/drm_print.h:525:85: note: expected 'const char *' but argument is of type 'u16' {aka 'short unsigned int'}
525 | void ___drm_dbg(struct _ddebug *desc, enum drm_debug_category category, const char *format, ...);
| ~~~~~~~~~~~~^~~~~~
--
In file included from include/drm/drm_mm.h:51,
from include/drm/drm_vma_manager.h:26,
from include/drm/drm_gem.h:40,
from drivers/gpu/drm/virtio/virtgpu_drv.h:40,
from drivers/gpu/drm/virtio/virtgpu_vq.c:34:
drivers/gpu/drm/virtio/virtgpu_vq.c: In function 'reclaim_vbufs':
>> drivers/gpu/drm/virtio/virtgpu_vq.c:191:27: error: incompatible type for argument 2 of '___drm_dbg'
191 | DRM_DEBUG("Huh? zero vbufs reclaimed");
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~
| |
| char *
include/drm/drm_print.h:530:57: note: in definition of macro '__drm_dbg'
530 | #define __drm_dbg(cat, fmt, ...) ___drm_dbg(cat, fmt, ##__VA_ARGS__)
| ^~~
drivers/gpu/drm/virtio/virtgpu_vq.c:191:17: note: in expansion of macro 'DRM_DEBUG'
191 | DRM_DEBUG("Huh? zero vbufs reclaimed");
| ^~~~~~~~~
include/drm/drm_print.h:525:63: note: expected 'enum drm_debug_category' but argument is of type 'char *'
525 | void ___drm_dbg(struct _ddebug *desc, enum drm_debug_category category, const char *format, ...);
| ~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~
include/drm/drm_print.h:530:41: error: too few arguments to function '___drm_dbg'
530 | #define __drm_dbg(cat, fmt, ...) ___drm_dbg(cat, fmt, ##__VA_ARGS__)
| ^~~~~~~~~~
include/drm/drm_print.h:572:9: note: in expansion of macro '__drm_dbg'
572 | __drm_dbg(DRM_UT_CORE, fmt, ##__VA_ARGS__)
| ^~~~~~~~~
drivers/gpu/drm/virtio/virtgpu_vq.c:191:17: note: in expansion of macro 'DRM_DEBUG'
191 | DRM_DEBUG("Huh? zero vbufs reclaimed");
| ^~~~~~~~~
include/drm/drm_print.h:525:6: note: declared here
525 | void ___drm_dbg(struct _ddebug *desc, enum drm_debug_category category, const char *format, ...);
| ^~~~~~~~~~
drivers/gpu/drm/virtio/virtgpu_vq.c: In function 'virtio_gpu_dequeue_ctrl_func':
drivers/gpu/drm/virtio/virtgpu_vq.c:226:43: error: incompatible type for argument 2 of '___drm_dbg'
226 | DRM_DEBUG("response 0x%x\n", le32_to_cpu(resp->type));
| ^~~~~~~~~~~~~~~~~
| |
| char *
include/drm/drm_print.h:530:57: note: in definition of macro '__drm_dbg'
530 | #define __drm_dbg(cat, fmt, ...) ___drm_dbg(cat, fmt, ##__VA_ARGS__)
| ^~~
drivers/gpu/drm/virtio/virtgpu_vq.c:226:33: note: in expansion of macro 'DRM_DEBUG'
226 | DRM_DEBUG("response 0x%x\n", le32_to_cpu(resp->type));
| ^~~~~~~~~
include/drm/drm_print.h:525:63: note: expected 'enum drm_debug_category' but argument is of type 'char *'
525 | void ___drm_dbg(struct _ddebug *desc, enum drm_debug_category category, const char *format, ...);
| ~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~
In file included from include/linux/swab.h:5,
from include/uapi/linux/byteorder/big_endian.h:14,
from include/linux/byteorder/big_endian.h:5,
from arch/openrisc/include/uapi/asm/byteorder.h:1,
from include/asm-generic/bitops/le.h:6,
from arch/openrisc/include/asm/bitops.h:45,
from include/linux/bitops.h:33,
from include/linux/log2.h:12,
from include/asm-generic/div64.h:55,
from ./arch/openrisc/include/generated/asm/div64.h:1,
from include/linux/math.h:5,
from include/linux/math64.h:6,
from include/linux/time64.h:5,
from include/linux/restart_block.h:10,
from include/linux/thread_info.h:14,
from include/asm-generic/current.h:5,
from ./arch/openrisc/include/generated/asm/current.h:1,
from include/linux/sched.h:12,
from include/linux/ratelimit.h:6,
from include/linux/dev_printk.h:16,
from include/linux/device.h:15,
from include/linux/dma-mapping.h:7,
from drivers/gpu/drm/virtio/virtgpu_vq.c:29:
>> include/uapi/linux/swab.h:119:31: warning: passing argument 3 of '___drm_dbg' makes pointer from integer without a cast [-Wint-conversion]
118 | (__builtin_constant_p((__u32)(x)) ? \
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
119 | ___constant_swab32(x) : \
| ~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~
| |
| unsigned int
120 | __fswab32(x))
| ~~~~~~~~~~~~~
include/uapi/linux/byteorder/big_endian.h:35:26: note: in expansion of macro '__swab32'
35 | #define __le32_to_cpu(x) __swab32((__force __u32)(__le32)(x))
| ^~~~~~~~
include/linux/byteorder/generic.h:89:21: note: in expansion of macro '__le32_to_cpu'
89 | #define le32_to_cpu __le32_to_cpu
| ^~~~~~~~~~~~~
include/drm/drm_print.h:530:64: note: in expansion of macro 'le32_to_cpu'
530 | #define __drm_dbg(cat, fmt, ...) ___drm_dbg(cat, fmt, ##__VA_ARGS__)
| ^~~~~~~~~~~
include/drm/drm_print.h:572:9: note: in expansion of macro '__drm_dbg'
572 | __drm_dbg(DRM_UT_CORE, fmt, ##__VA_ARGS__)
| ^~~~~~~~~
drivers/gpu/drm/virtio/virtgpu_vq.c:226:33: note: in expansion of macro 'DRM_DEBUG'
226 | DRM_DEBUG("response 0x%x\n", le32_to_cpu(resp->type));
| ^~~~~~~~~
In file included from include/drm/drm_mm.h:51,
from include/drm/drm_vma_manager.h:26,
from include/drm/drm_gem.h:40,
from drivers/gpu/drm/virtio/virtgpu_drv.h:40,
from drivers/gpu/drm/virtio/virtgpu_vq.c:34:
include/drm/drm_print.h:525:85: note: expected 'const char *' but argument is of type 'unsigned int'
525 | void ___drm_dbg(struct _ddebug *desc, enum drm_debug_category category, const char *format, ...);
| ~~~~~~~~~~~~^~~~~~
drivers/gpu/drm/virtio/virtgpu_vq.c: In function 'virtio_gpu_cmd_get_display_info_cb':
drivers/gpu/drm/virtio/virtgpu_vq.c:651:35: error: incompatible type for argument 2 of '___drm_dbg'
651 | DRM_DEBUG("output %d: %dx%d+%d+%d", i,
| ^~~~~~~~~~~~~~~~~~~~~~~~
| |
| char *
include/drm/drm_print.h:530:57: note: in definition of macro '__drm_dbg'
530 | #define __drm_dbg(cat, fmt, ...) ___drm_dbg(cat, fmt, ##__VA_ARGS__)
| ^~~
drivers/gpu/drm/virtio/virtgpu_vq.c:651:25: note: in expansion of macro 'DRM_DEBUG'
651 | DRM_DEBUG("output %d: %dx%d+%d+%d", i,
| ^~~~~~~~~
include/drm/drm_print.h:525:63: note: expected 'enum drm_debug_category' but argument is of type 'char *'
525 | void ___drm_dbg(struct _ddebug *desc, enum drm_debug_category category, const char *format, ...);
| ~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~
>> drivers/gpu/drm/virtio/virtgpu_vq.c:651:61: warning: passing argument 3 of '___drm_dbg' makes pointer from integer without a cast [-Wint-conversion]
651 | DRM_DEBUG("output %d: %dx%d+%d+%d", i,
| ^
| |
| int
include/drm/drm_print.h:530:64: note: in definition of macro '__drm_dbg'
530 | #define __drm_dbg(cat, fmt, ...) ___drm_dbg(cat, fmt, ##__VA_ARGS__)
| ^~~~~~~~~~~
drivers/gpu/drm/virtio/virtgpu_vq.c:651:25: note: in expansion of macro 'DRM_DEBUG'
651 | DRM_DEBUG("output %d: %dx%d+%d+%d", i,
| ^~~~~~~~~
include/drm/drm_print.h:525:85: note: expected 'const char *' but argument is of type 'int'
525 | void ___drm_dbg(struct _ddebug *desc, enum drm_debug_category category, const char *format, ...);
| ~~~~~~~~~~~~^~~~~~
drivers/gpu/drm/virtio/virtgpu_vq.c:657:35: error: incompatible type for argument 2 of '___drm_dbg'
657 | DRM_DEBUG("output %d: disabled", i);
| ^~~~~~~~~~~~~~~~~~~~~
| |
| char *
include/drm/drm_print.h:530:57: note: in definition of macro '__drm_dbg'
530 | #define __drm_dbg(cat, fmt, ...) ___drm_dbg(cat, fmt, ##__VA_ARGS__)
| ^~~
drivers/gpu/drm/virtio/virtgpu_vq.c:657:25: note: in expansion of macro 'DRM_DEBUG'
657 | DRM_DEBUG("output %d: disabled", i);
| ^~~~~~~~~
include/drm/drm_print.h:525:63: note: expected 'enum drm_debug_category' but argument is of type 'char *'
525 | void ___drm_dbg(struct _ddebug *desc, enum drm_debug_category category, const char *format, ...);
| ~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~
drivers/gpu/drm/virtio/virtgpu_vq.c:657:58: warning: passing argument 3 of '___drm_dbg' makes pointer from integer without a cast [-Wint-conversion]
657 | DRM_DEBUG("output %d: disabled", i);
| ^
| |
| int
include/drm/drm_print.h:530:64: note: in definition of macro '__drm_dbg'
530 | #define __drm_dbg(cat, fmt, ...) ___drm_dbg(cat, fmt, ##__VA_ARGS__)
| ^~~~~~~~~~~
drivers/gpu/drm/virtio/virtgpu_vq.c:657:25: note: in expansion of macro 'DRM_DEBUG'
657 | DRM_DEBUG("output %d: disabled", i);
| ^~~~~~~~~
include/drm/drm_print.h:525:85: note: expected 'const char *' but argument is of type 'int'
525 | void ___drm_dbg(struct _ddebug *desc, enum drm_debug_category category, const char *format, ...);
| ~~~~~~~~~~~~^~~~~~
--
In file included from include/drm/drm_mm.h:51,
from include/drm/drm_vma_manager.h:26,
from include/drm/drm_gem.h:40,
from drivers/gpu/drm/virtio/virtgpu_drv.h:40,
from drivers/gpu/drm/virtio/virtgpu_plane.c:31:
drivers/gpu/drm/virtio/virtgpu_plane.c: In function 'virtio_gpu_primary_plane_update':
>> drivers/gpu/drm/virtio/virtgpu_plane.c:185:27: error: incompatible type for argument 2 of '___drm_dbg'
185 | DRM_DEBUG("nofb\n");
| ^~~~~~~~
| |
| char *
include/drm/drm_print.h:530:57: note: in definition of macro '__drm_dbg'
530 | #define __drm_dbg(cat, fmt, ...) ___drm_dbg(cat, fmt, ##__VA_ARGS__)
| ^~~
drivers/gpu/drm/virtio/virtgpu_plane.c:185:17: note: in expansion of macro 'DRM_DEBUG'
185 | DRM_DEBUG("nofb\n");
| ^~~~~~~~~
include/drm/drm_print.h:525:63: note: expected 'enum drm_debug_category' but argument is of type 'char *'
525 | void ___drm_dbg(struct _ddebug *desc, enum drm_debug_category category, const char *format, ...);
| ~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~
include/drm/drm_print.h:530:41: error: too few arguments to function '___drm_dbg'
530 | #define __drm_dbg(cat, fmt, ...) ___drm_dbg(cat, fmt, ##__VA_ARGS__)
| ^~~~~~~~~~
include/drm/drm_print.h:572:9: note: in expansion of macro '__drm_dbg'
572 | __drm_dbg(DRM_UT_CORE, fmt, ##__VA_ARGS__)
| ^~~~~~~~~
drivers/gpu/drm/virtio/virtgpu_plane.c:185:17: note: in expansion of macro 'DRM_DEBUG'
185 | DRM_DEBUG("nofb\n");
| ^~~~~~~~~
include/drm/drm_print.h:525:6: note: declared here
525 | void ___drm_dbg(struct _ddebug *desc, enum drm_debug_category category, const char *format, ...);
| ^~~~~~~~~~
drivers/gpu/drm/virtio/virtgpu_plane.c:208:27: error: incompatible type for argument 2 of '___drm_dbg'
208 | DRM_DEBUG("handle 0x%x, crtc %dx%d+%d+%d, src %dx%d+%d+%d\n",
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
| |
| char *
include/drm/drm_print.h:530:57: note: in definition of macro '__drm_dbg'
530 | #define __drm_dbg(cat, fmt, ...) ___drm_dbg(cat, fmt, ##__VA_ARGS__)
| ^~~
drivers/gpu/drm/virtio/virtgpu_plane.c:208:17: note: in expansion of macro 'DRM_DEBUG'
208 | DRM_DEBUG("handle 0x%x, crtc %dx%d+%d+%d, src %dx%d+%d+%d\n",
| ^~~~~~~~~
include/drm/drm_print.h:525:63: note: expected 'enum drm_debug_category' but argument is of type 'char *'
525 | void ___drm_dbg(struct _ddebug *desc, enum drm_debug_category category, const char *format, ...);
| ~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~
>> drivers/gpu/drm/virtio/virtgpu_plane.c:209:29: warning: passing argument 3 of '___drm_dbg' makes pointer from integer without a cast [-Wint-conversion]
209 | bo->hw_res_handle,
| ~~^~~~~~~~~~~~~~~
| |
| uint32_t {aka unsigned int}
include/drm/drm_print.h:530:64: note: in definition of macro '__drm_dbg'
530 | #define __drm_dbg(cat, fmt, ...) ___drm_dbg(cat, fmt, ##__VA_ARGS__)
| ^~~~~~~~~~~
drivers/gpu/drm/virtio/virtgpu_plane.c:208:17: note: in expansion of macro 'DRM_DEBUG'
208 | DRM_DEBUG("handle 0x%x, crtc %dx%d+%d+%d, src %dx%d+%d+%d\n",
| ^~~~~~~~~
include/drm/drm_print.h:525:85: note: expected 'const char *' but argument is of type 'uint32_t' {aka 'unsigned int'}
525 | void ___drm_dbg(struct _ddebug *desc, enum drm_debug_category category, const char *format, ...);
| ~~~~~~~~~~~~^~~~~~
drivers/gpu/drm/virtio/virtgpu_plane.c: In function 'virtio_gpu_cursor_plane_update':
drivers/gpu/drm/virtio/virtgpu_plane.c:331:27: error: incompatible type for argument 2 of '___drm_dbg'
331 | DRM_DEBUG("update, handle %d, pos +%d+%d, hot %d,%d\n", handle,
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
| |
| char *
include/drm/drm_print.h:530:57: note: in definition of macro '__drm_dbg'
530 | #define __drm_dbg(cat, fmt, ...) ___drm_dbg(cat, fmt, ##__VA_ARGS__)
| ^~~
drivers/gpu/drm/virtio/virtgpu_plane.c:331:17: note: in expansion of macro 'DRM_DEBUG'
331 | DRM_DEBUG("update, handle %d, pos +%d+%d, hot %d,%d\n", handle,
| ^~~~~~~~~
include/drm/drm_print.h:525:63: note: expected 'enum drm_debug_category' but argument is of type 'char *'
525 | void ___drm_dbg(struct _ddebug *desc, enum drm_debug_category category, const char *format, ...);
| ~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~
drivers/gpu/drm/virtio/virtgpu_plane.c:331:73: warning: passing argument 3 of '___drm_dbg' makes pointer from integer without a cast [-Wint-conversion]
331 | DRM_DEBUG("update, handle %d, pos +%d+%d, hot %d,%d\n", handle,
| ^~~~~~
| |
| uint32_t {aka unsigned int}
include/drm/drm_print.h:530:64: note: in definition of macro '__drm_dbg'
530 | #define __drm_dbg(cat, fmt, ...) ___drm_dbg(cat, fmt, ##__VA_ARGS__)
| ^~~~~~~~~~~
drivers/gpu/drm/virtio/virtgpu_plane.c:331:17: note: in expansion of macro 'DRM_DEBUG'
331 | DRM_DEBUG("update, handle %d, pos +%d+%d, hot %d,%d\n", handle,
| ^~~~~~~~~
include/drm/drm_print.h:525:85: note: expected 'const char *' but argument is of type 'uint32_t' {aka 'unsigned int'}
525 | void ___drm_dbg(struct _ddebug *desc, enum drm_debug_category category, const char *format, ...);
| ~~~~~~~~~~~~^~~~~~
drivers/gpu/drm/virtio/virtgpu_plane.c:349:27: error: incompatible type for argument 2 of '___drm_dbg'
349 | DRM_DEBUG("move +%d+%d\n",
| ^~~~~~~~~~~~~~~
| |
| char *
include/drm/drm_print.h:530:57: note: in definition of macro '__drm_dbg'
530 | #define __drm_dbg(cat, fmt, ...) ___drm_dbg(cat, fmt, ##__VA_ARGS__)
| ^~~
drivers/gpu/drm/virtio/virtgpu_plane.c:349:17: note: in expansion of macro 'DRM_DEBUG'
349 | DRM_DEBUG("move +%d+%d\n",
| ^~~~~~~~~
include/drm/drm_print.h:525:63: note: expected 'enum drm_debug_category' but argument is of type 'char *'
525 | void ___drm_dbg(struct _ddebug *desc, enum drm_debug_category category, const char *format, ...);
| ~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~
drivers/gpu/drm/virtio/virtgpu_plane.c:350:39: warning: passing argument 3 of '___drm_dbg' makes pointer from integer without a cast [-Wint-conversion]
350 | plane->state->crtc_x,
| ~~~~~~~~~~~~^~~~~~~~
| |
| int32_t {aka int}
include/drm/drm_print.h:530:64: note: in definition of macro '__drm_dbg'
530 | #define __drm_dbg(cat, fmt, ...) ___drm_dbg(cat, fmt, ##__VA_ARGS__)
| ^~~~~~~~~~~
drivers/gpu/drm/virtio/virtgpu_plane.c:349:17: note: in expansion of macro 'DRM_DEBUG'
349 | DRM_DEBUG("move +%d+%d\n",
| ^~~~~~~~~
include/drm/drm_print.h:525:85: note: expected 'const char *' but argument is of type 'int32_t' {aka 'int'}
525 | void ___drm_dbg(struct _ddebug *desc, enum drm_debug_category category, const char *format, ...);
| ~~~~~~~~~~~~^~~~~~
vim +/___drm_dbg +179 drivers/gpu/drm/virtio/virtgpu_display.c
a3d639776e601d Sam Ravnborg 2019-06-30 34
a3d639776e601d Sam Ravnborg 2019-06-30 @35 #include "virtgpu_drv.h"
dc5698e80cf724 Dave Airlie 2013-09-09 36
bbbed8884f8e62 Gerd Hoffmann 2016-05-26 37 #define XRES_MIN 32
bbbed8884f8e62 Gerd Hoffmann 2016-05-26 38 #define YRES_MIN 32
dc5698e80cf724 Dave Airlie 2013-09-09 39
dc5698e80cf724 Dave Airlie 2013-09-09 40 #define XRES_DEF 1024
dc5698e80cf724 Dave Airlie 2013-09-09 41 #define YRES_DEF 768
dc5698e80cf724 Dave Airlie 2013-09-09 42
dc5698e80cf724 Dave Airlie 2013-09-09 43 #define XRES_MAX 8192
dc5698e80cf724 Dave Airlie 2013-09-09 44 #define YRES_MAX 8192
dc5698e80cf724 Dave Airlie 2013-09-09 45
570c815698c4c1 Gurchetan Singh 2019-12-18 46 #define drm_connector_to_virtio_gpu_output(x) \
570c815698c4c1 Gurchetan Singh 2019-12-18 47 container_of(x, struct virtio_gpu_output, conn)
570c815698c4c1 Gurchetan Singh 2019-12-18 48
dc5698e80cf724 Dave Airlie 2013-09-09 49 static const struct drm_crtc_funcs virtio_gpu_crtc_funcs = {
dc5698e80cf724 Dave Airlie 2013-09-09 50 .set_config = drm_atomic_helper_set_config,
dc5698e80cf724 Dave Airlie 2013-09-09 51 .destroy = drm_crtc_cleanup,
dc5698e80cf724 Dave Airlie 2013-09-09 52
0d841ac0ec213f Daniel Vetter 2016-06-10 53 .page_flip = drm_atomic_helper_page_flip,
dc5698e80cf724 Dave Airlie 2013-09-09 54 .reset = drm_atomic_helper_crtc_reset,
dc5698e80cf724 Dave Airlie 2013-09-09 55 .atomic_duplicate_state = drm_atomic_helper_crtc_duplicate_state,
dc5698e80cf724 Dave Airlie 2013-09-09 56 .atomic_destroy_state = drm_atomic_helper_crtc_destroy_state,
dc5698e80cf724 Dave Airlie 2013-09-09 57 };
dc5698e80cf724 Dave Airlie 2013-09-09 58
dc5698e80cf724 Dave Airlie 2013-09-09 59 static const struct drm_framebuffer_funcs virtio_gpu_fb_funcs = {
3823da3aeb47c1 Daniel Stone 2018-03-30 60 .create_handle = drm_gem_fb_create_handle,
3823da3aeb47c1 Daniel Stone 2018-03-30 61 .destroy = drm_gem_fb_destroy,
b07baa0393d09f Gerd Hoffmann 2019-06-11 62 .dirty = drm_atomic_helper_dirtyfb,
dc5698e80cf724 Dave Airlie 2013-09-09 63 };
dc5698e80cf724 Dave Airlie 2013-09-09 64
9567728ae28c6a Gurchetan Singh 2019-12-18 65 static int
dc5698e80cf724 Dave Airlie 2013-09-09 66 virtio_gpu_framebuffer_init(struct drm_device *dev,
dc5698e80cf724 Dave Airlie 2013-09-09 67 struct virtio_gpu_framebuffer *vgfb,
1eb83451ba55d7 Ville Syrjälä 2015-11-11 68 const struct drm_mode_fb_cmd2 *mode_cmd,
dc5698e80cf724 Dave Airlie 2013-09-09 69 struct drm_gem_object *obj)
dc5698e80cf724 Dave Airlie 2013-09-09 70 {
dc5698e80cf724 Dave Airlie 2013-09-09 71 int ret;
9d492b6bece4ec Rodrigo Siqueira 2018-02-22 72
3823da3aeb47c1 Daniel Stone 2018-03-30 73 vgfb->base.obj[0] = obj;
dc5698e80cf724 Dave Airlie 2013-09-09 74
9d020467a1c2f7 Ville Syrjälä 2016-11-18 75 drm_helper_mode_fill_fb_struct(dev, &vgfb->base, mode_cmd);
9d020467a1c2f7 Ville Syrjälä 2016-11-18 76
dc5698e80cf724 Dave Airlie 2013-09-09 77 ret = drm_framebuffer_init(dev, &vgfb->base, &virtio_gpu_fb_funcs);
dc5698e80cf724 Dave Airlie 2013-09-09 78 if (ret) {
3823da3aeb47c1 Daniel Stone 2018-03-30 79 vgfb->base.obj[0] = NULL;
dc5698e80cf724 Dave Airlie 2013-09-09 80 return ret;
dc5698e80cf724 Dave Airlie 2013-09-09 81 }
dc5698e80cf724 Dave Airlie 2013-09-09 82 return 0;
dc5698e80cf724 Dave Airlie 2013-09-09 83 }
dc5698e80cf724 Dave Airlie 2013-09-09 84
dc5698e80cf724 Dave Airlie 2013-09-09 85 static void virtio_gpu_crtc_mode_set_nofb(struct drm_crtc *crtc)
dc5698e80cf724 Dave Airlie 2013-09-09 86 {
dc5698e80cf724 Dave Airlie 2013-09-09 87 struct drm_device *dev = crtc->dev;
dc5698e80cf724 Dave Airlie 2013-09-09 88 struct virtio_gpu_device *vgdev = dev->dev_private;
dc5698e80cf724 Dave Airlie 2013-09-09 89 struct virtio_gpu_output *output = drm_crtc_to_virtio_gpu_output(crtc);
dc5698e80cf724 Dave Airlie 2013-09-09 90
dc5698e80cf724 Dave Airlie 2013-09-09 91 virtio_gpu_cmd_set_scanout(vgdev, output->index, 0,
dc5698e80cf724 Dave Airlie 2013-09-09 92 crtc->mode.hdisplay,
dc5698e80cf724 Dave Airlie 2013-09-09 93 crtc->mode.vdisplay, 0, 0);
790bcd79142885 Gerd Hoffmann 2020-02-14 94 virtio_gpu_notify(vgdev);
dc5698e80cf724 Dave Airlie 2013-09-09 95 }
dc5698e80cf724 Dave Airlie 2013-09-09 96
0b20a0f8c3cb6f Laurent Pinchart 2017-06-30 97 static void virtio_gpu_crtc_atomic_enable(struct drm_crtc *crtc,
351f950db4ab28 Maxime Ripard 2020-10-08 98 struct drm_atomic_state *state)
dc5698e80cf724 Dave Airlie 2013-09-09 99 {
dc5698e80cf724 Dave Airlie 2013-09-09 100 }
dc5698e80cf724 Dave Airlie 2013-09-09 101
64581714b58bc3 Laurent Pinchart 2017-06-30 102 static void virtio_gpu_crtc_atomic_disable(struct drm_crtc *crtc,
351f950db4ab28 Maxime Ripard 2020-10-08 103 struct drm_atomic_state *state)
dc5698e80cf724 Dave Airlie 2013-09-09 104 {
dc5698e80cf724 Dave Airlie 2013-09-09 105 struct drm_device *dev = crtc->dev;
dc5698e80cf724 Dave Airlie 2013-09-09 106 struct virtio_gpu_device *vgdev = dev->dev_private;
dc5698e80cf724 Dave Airlie 2013-09-09 107 struct virtio_gpu_output *output = drm_crtc_to_virtio_gpu_output(crtc);
dc5698e80cf724 Dave Airlie 2013-09-09 108
dc5698e80cf724 Dave Airlie 2013-09-09 109 virtio_gpu_cmd_set_scanout(vgdev, output->index, 0, 0, 0, 0, 0);
790bcd79142885 Gerd Hoffmann 2020-02-14 110 virtio_gpu_notify(vgdev);
dc5698e80cf724 Dave Airlie 2013-09-09 111 }
dc5698e80cf724 Dave Airlie 2013-09-09 112
dc5698e80cf724 Dave Airlie 2013-09-09 113 static int virtio_gpu_crtc_atomic_check(struct drm_crtc *crtc,
29b77ad7b9ca8c Maxime Ripard 2020-10-28 114 struct drm_atomic_state *state)
dc5698e80cf724 Dave Airlie 2013-09-09 115 {
dc5698e80cf724 Dave Airlie 2013-09-09 116 return 0;
dc5698e80cf724 Dave Airlie 2013-09-09 117 }
dc5698e80cf724 Dave Airlie 2013-09-09 118
9a11d2e7e66b6b Gustavo Padovan 2016-04-14 119 static void virtio_gpu_crtc_atomic_flush(struct drm_crtc *crtc,
f6ebe9f9c9233a Maxime Ripard 2020-10-28 120 struct drm_atomic_state *state)
9a11d2e7e66b6b Gustavo Padovan 2016-04-14 121 {
253f28b6237264 Maxime Ripard 2020-11-05 122 struct drm_crtc_state *crtc_state = drm_atomic_get_new_crtc_state(state,
253f28b6237264 Maxime Ripard 2020-11-05 123 crtc);
1bc371cd0ec907 Gerd Hoffmann 2020-08-18 124 struct virtio_gpu_output *output = drm_crtc_to_virtio_gpu_output(crtc);
1bc371cd0ec907 Gerd Hoffmann 2020-08-18 125
1bc371cd0ec907 Gerd Hoffmann 2020-08-18 126 /*
1bc371cd0ec907 Gerd Hoffmann 2020-08-18 127 * virtio-gpu can't do modeset and plane update operations
1bc371cd0ec907 Gerd Hoffmann 2020-08-18 128 * independent from each other. So the actual modeset happens
1bc371cd0ec907 Gerd Hoffmann 2020-08-18 129 * in the plane update callback, and here we just check
1bc371cd0ec907 Gerd Hoffmann 2020-08-18 130 * whenever we must force the modeset.
1bc371cd0ec907 Gerd Hoffmann 2020-08-18 131 */
253f28b6237264 Maxime Ripard 2020-11-05 132 if (drm_atomic_crtc_needs_modeset(crtc_state)) {
1bc371cd0ec907 Gerd Hoffmann 2020-08-18 133 output->needs_modeset = true;
1bc371cd0ec907 Gerd Hoffmann 2020-08-18 134 }
9a11d2e7e66b6b Gustavo Padovan 2016-04-14 135 }
9a11d2e7e66b6b Gustavo Padovan 2016-04-14 136
dc5698e80cf724 Dave Airlie 2013-09-09 137 static const struct drm_crtc_helper_funcs virtio_gpu_crtc_helper_funcs = {
dc5698e80cf724 Dave Airlie 2013-09-09 138 .mode_set_nofb = virtio_gpu_crtc_mode_set_nofb,
dc5698e80cf724 Dave Airlie 2013-09-09 139 .atomic_check = virtio_gpu_crtc_atomic_check,
9a11d2e7e66b6b Gustavo Padovan 2016-04-14 140 .atomic_flush = virtio_gpu_crtc_atomic_flush,
0b20a0f8c3cb6f Laurent Pinchart 2017-06-30 141 .atomic_enable = virtio_gpu_crtc_atomic_enable,
64581714b58bc3 Laurent Pinchart 2017-06-30 142 .atomic_disable = virtio_gpu_crtc_atomic_disable,
dc5698e80cf724 Dave Airlie 2013-09-09 143 };
dc5698e80cf724 Dave Airlie 2013-09-09 144
dc5698e80cf724 Dave Airlie 2013-09-09 145 static void virtio_gpu_enc_mode_set(struct drm_encoder *encoder,
dc5698e80cf724 Dave Airlie 2013-09-09 146 struct drm_display_mode *mode,
dc5698e80cf724 Dave Airlie 2013-09-09 147 struct drm_display_mode *adjusted_mode)
dc5698e80cf724 Dave Airlie 2013-09-09 148 {
dc5698e80cf724 Dave Airlie 2013-09-09 149 }
dc5698e80cf724 Dave Airlie 2013-09-09 150
dc5698e80cf724 Dave Airlie 2013-09-09 151 static void virtio_gpu_enc_enable(struct drm_encoder *encoder)
dc5698e80cf724 Dave Airlie 2013-09-09 152 {
dc5698e80cf724 Dave Airlie 2013-09-09 153 }
dc5698e80cf724 Dave Airlie 2013-09-09 154
dc5698e80cf724 Dave Airlie 2013-09-09 155 static void virtio_gpu_enc_disable(struct drm_encoder *encoder)
dc5698e80cf724 Dave Airlie 2013-09-09 156 {
dc5698e80cf724 Dave Airlie 2013-09-09 157 }
dc5698e80cf724 Dave Airlie 2013-09-09 158
dc5698e80cf724 Dave Airlie 2013-09-09 159 static int virtio_gpu_conn_get_modes(struct drm_connector *connector)
dc5698e80cf724 Dave Airlie 2013-09-09 160 {
dc5698e80cf724 Dave Airlie 2013-09-09 161 struct virtio_gpu_output *output =
dc5698e80cf724 Dave Airlie 2013-09-09 162 drm_connector_to_virtio_gpu_output(connector);
dc5698e80cf724 Dave Airlie 2013-09-09 163 struct drm_display_mode *mode = NULL;
dc5698e80cf724 Dave Airlie 2013-09-09 164 int count, width, height;
dc5698e80cf724 Dave Airlie 2013-09-09 165
b4b01b4995fb15 Gerd Hoffmann 2018-10-30 166 if (output->edid) {
b4b01b4995fb15 Gerd Hoffmann 2018-10-30 167 count = drm_add_edid_modes(connector, output->edid);
b4b01b4995fb15 Gerd Hoffmann 2018-10-30 168 if (count)
b4b01b4995fb15 Gerd Hoffmann 2018-10-30 169 return count;
b4b01b4995fb15 Gerd Hoffmann 2018-10-30 170 }
b4b01b4995fb15 Gerd Hoffmann 2018-10-30 171
dc5698e80cf724 Dave Airlie 2013-09-09 172 width = le32_to_cpu(output->info.r.width);
dc5698e80cf724 Dave Airlie 2013-09-09 173 height = le32_to_cpu(output->info.r.height);
dc5698e80cf724 Dave Airlie 2013-09-09 174 count = drm_add_modes_noedid(connector, XRES_MAX, YRES_MAX);
dc5698e80cf724 Dave Airlie 2013-09-09 175
dc5698e80cf724 Dave Airlie 2013-09-09 176 if (width == 0 || height == 0) {
dc5698e80cf724 Dave Airlie 2013-09-09 177 drm_set_preferred_mode(connector, XRES_DEF, YRES_DEF);
dc5698e80cf724 Dave Airlie 2013-09-09 178 } else {
dc5698e80cf724 Dave Airlie 2013-09-09 @179 DRM_DEBUG("add mode: %dx%d\n", width, height);
dc5698e80cf724 Dave Airlie 2013-09-09 180 mode = drm_cvt_mode(connector->dev, width, height, 60,
dc5698e80cf724 Dave Airlie 2013-09-09 181 false, false, false);
dc5698e80cf724 Dave Airlie 2013-09-09 182 mode->type |= DRM_MODE_TYPE_PREFERRED;
dc5698e80cf724 Dave Airlie 2013-09-09 183 drm_mode_probed_add(connector, mode);
dc5698e80cf724 Dave Airlie 2013-09-09 184 count++;
dc5698e80cf724 Dave Airlie 2013-09-09 185 }
dc5698e80cf724 Dave Airlie 2013-09-09 186
dc5698e80cf724 Dave Airlie 2013-09-09 187 return count;
dc5698e80cf724 Dave Airlie 2013-09-09 188 }
dc5698e80cf724 Dave Airlie 2013-09-09 189
:::::: The code at line 179 was first introduced by commit
:::::: dc5698e80cf724770283e10414054662bdf6ccfa Add virtio gpu driver.
:::::: TO: Dave Airlie <airlied(a)gmail.com>
:::::: CC: Gerd Hoffmann <kraxel(a)redhat.com>
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
7 months, 2 weeks
Re: [PATCH v11 29/40] arm64/sme: Provide Kconfig for SME
by kernel test robot
Hi Mark,
I love your patch! Perhaps something to improve:
[auto build test WARNING on dfd42facf1e4ada021b939b4e19c935dcdd55566]
url: https://github.com/0day-ci/linux/commits/Mark-Brown/arm64-sme-Initial-sup...
base: dfd42facf1e4ada021b939b4e19c935dcdd55566
config: arm64-randconfig-s032-20220207 (https://download.01.org/0day-ci/archive/20220208/202202080624.bZPyvbcL-lk...)
compiler: aarch64-linux-gcc (GCC) 11.2.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-dirty
# https://github.com/0day-ci/linux/commit/3c145e627affeb9240ccaebb147235e09...
git remote add linux-review https://github.com/0day-ci/linux
git fetch --no-tags linux-review Mark-Brown/arm64-sme-Initial-support-for-the-Scalable-Matrix-Extension/20220207-233825
git checkout 3c145e627affeb9240ccaebb147235e09b229b34
# save the config file to linux build tree
mkdir build_dir
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-11.2.0 make.cross C=1 CF='-fdiagnostic-prefix -D__CHECK_ENDIAN__' O=build_dir ARCH=arm64 SHELL=/bin/bash arch/arm64/kernel/ block/ drivers/nvme/host/ drivers/nvme/target/
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp(a)intel.com>
sparse warnings: (new ones prefixed by >>)
>> arch/arm64/kernel/signal.c:664:43: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected struct user_ctxs [noderef] __user *user @@ got struct user_ctxs * @@
arch/arm64/kernel/signal.c:664:43: sparse: expected struct user_ctxs [noderef] __user *user
arch/arm64/kernel/signal.c:664:43: sparse: got struct user_ctxs *
arch/arm64/kernel/signal.c:936:26: sparse: sparse: incorrect type in assignment (different address spaces) @@ expected void ( [noderef] [usertype] __user *[assigned] [usertype] sigtramp )( ... ) @@ got void * @@
arch/arm64/kernel/signal.c:936:26: sparse: expected void ( [noderef] [usertype] __user *[assigned] [usertype] sigtramp )( ... )
arch/arm64/kernel/signal.c:936:26: sparse: got void *
>> arch/arm64/kernel/signal.c:395:35: sparse: sparse: dereference of noderef expression
>> arch/arm64/kernel/signal.c:395:35: sparse: sparse: dereference of noderef expression
arch/arm64/kernel/signal.c:429:53: sparse: sparse: dereference of noderef expression
arch/arm64/kernel/signal.c:429:53: sparse: sparse: dereference of noderef expression
vim +664 arch/arm64/kernel/signal.c
47ccb02868cead Dave Martin 2017-06-15 621
2c020ed8d148f7 Catalin Marinas 2012-03-05 622 static int restore_sigframe(struct pt_regs *regs,
2c020ed8d148f7 Catalin Marinas 2012-03-05 623 struct rt_sigframe __user *sf)
2c020ed8d148f7 Catalin Marinas 2012-03-05 624 {
2c020ed8d148f7 Catalin Marinas 2012-03-05 625 sigset_t set;
2c020ed8d148f7 Catalin Marinas 2012-03-05 626 int i, err;
47ccb02868cead Dave Martin 2017-06-15 627 struct user_ctxs user;
2c020ed8d148f7 Catalin Marinas 2012-03-05 628
2c020ed8d148f7 Catalin Marinas 2012-03-05 629 err = __copy_from_user(&set, &sf->uc.uc_sigmask, sizeof(set));
2c020ed8d148f7 Catalin Marinas 2012-03-05 630 if (err == 0)
2c020ed8d148f7 Catalin Marinas 2012-03-05 631 set_current_blocked(&set);
2c020ed8d148f7 Catalin Marinas 2012-03-05 632
2c020ed8d148f7 Catalin Marinas 2012-03-05 633 for (i = 0; i < 31; i++)
2c020ed8d148f7 Catalin Marinas 2012-03-05 634 __get_user_error(regs->regs[i], &sf->uc.uc_mcontext.regs[i],
2c020ed8d148f7 Catalin Marinas 2012-03-05 635 err);
2c020ed8d148f7 Catalin Marinas 2012-03-05 636 __get_user_error(regs->sp, &sf->uc.uc_mcontext.sp, err);
2c020ed8d148f7 Catalin Marinas 2012-03-05 637 __get_user_error(regs->pc, &sf->uc.uc_mcontext.pc, err);
2c020ed8d148f7 Catalin Marinas 2012-03-05 638 __get_user_error(regs->pstate, &sf->uc.uc_mcontext.pstate, err);
2c020ed8d148f7 Catalin Marinas 2012-03-05 639
2c020ed8d148f7 Catalin Marinas 2012-03-05 640 /*
2c020ed8d148f7 Catalin Marinas 2012-03-05 641 * Avoid sys_rt_sigreturn() restarting.
2c020ed8d148f7 Catalin Marinas 2012-03-05 642 */
17c28958600928 Dave Martin 2017-08-01 643 forget_syscall(regs);
2c020ed8d148f7 Catalin Marinas 2012-03-05 644
dbd4d7ca563fd0 Mark Rutland 2016-03-01 645 err |= !valid_user_regs(®s->user_regs, current);
47ccb02868cead Dave Martin 2017-06-15 646 if (err == 0)
47ccb02868cead Dave Martin 2017-06-15 647 err = parse_user_sigframe(&user, sf);
2c020ed8d148f7 Catalin Marinas 2012-03-05 648
6d502b6ba1b267 Suzuki K Poulose 2020-01-13 649 if (err == 0 && system_supports_fpsimd()) {
8cd969d28fd284 Dave Martin 2017-10-31 650 if (!user.fpsimd)
8cd969d28fd284 Dave Martin 2017-10-31 651 return -EINVAL;
8cd969d28fd284 Dave Martin 2017-10-31 652
8cd969d28fd284 Dave Martin 2017-10-31 653 if (user.sve) {
8cd969d28fd284 Dave Martin 2017-10-31 654 if (!system_supports_sve())
8cd969d28fd284 Dave Martin 2017-10-31 655 return -EINVAL;
8cd969d28fd284 Dave Martin 2017-10-31 656
8cd969d28fd284 Dave Martin 2017-10-31 657 err = restore_sve_fpsimd_context(&user);
8cd969d28fd284 Dave Martin 2017-10-31 658 } else {
47ccb02868cead Dave Martin 2017-06-15 659 err = restore_fpsimd_context(user.fpsimd);
8cd969d28fd284 Dave Martin 2017-10-31 660 }
8cd969d28fd284 Dave Martin 2017-10-31 661 }
2c020ed8d148f7 Catalin Marinas 2012-03-05 662
a884c063c23007 Mark Brown 2022-02-07 663 if (err == 0 && system_supports_sme() && user.za)
a884c063c23007 Mark Brown 2022-02-07 @664 err = restore_za_context(&user);
a884c063c23007 Mark Brown 2022-02-07 665
2c020ed8d148f7 Catalin Marinas 2012-03-05 666 return err;
2c020ed8d148f7 Catalin Marinas 2012-03-05 667 }
2c020ed8d148f7 Catalin Marinas 2012-03-05 668
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
7 months, 2 weeks
[ojeda-linux:ci 4/9] rust/helpers.c:39:17: warning: no previous declaration for 'rust_helper_BUG'
by kernel test robot
tree: https://github.com/ojeda/linux.git ci
head: a694f7e200388d6d9686a7d52d348167ce97c388
commit: 614f533db2f380569e01a27b5064527a2f95728e [4/9] rust: helpers: avoid `-Wmissing-prototypes` in `W=1` builds
config: x86_64-randconfig-c022-20220207 (https://download.01.org/0day-ci/archive/20220208/202202081303.QEI35DwC-lk...)
compiler: gcc-9 (Debian 9.3.0-22) 9.3.0
reproduce (this is a W=1 build):
# https://github.com/ojeda/linux/commit/614f533db2f380569e01a27b5064527a2f9...
git remote add ojeda-linux https://github.com/ojeda/linux.git
git fetch --no-tags ojeda-linux ci
git checkout 614f533db2f380569e01a27b5064527a2f95728e
# save the config file to linux build tree
mkdir build_dir
make W=1 O=build_dir ARCH=x86_64 SHELL=/bin/bash
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp(a)intel.com>
All warnings (new ones prefixed by >>):
>> rust/helpers.c:39:17: warning: no previous declaration for 'rust_helper_BUG' [-Wmissing-declarations]
39 | __noreturn void rust_helper_BUG(void)
| ^~~~~~~~~~~~~~~
>> rust/helpers.c:45:6: warning: no previous declaration for 'rust_helper_clk_disable_unprepare' [-Wmissing-declarations]
45 | void rust_helper_clk_disable_unprepare(struct clk *clk)
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
>> rust/helpers.c:51:5: warning: no previous declaration for 'rust_helper_clk_prepare_enable' [-Wmissing-declarations]
51 | int rust_helper_clk_prepare_enable(struct clk *clk)
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
>> rust/helpers.c:57:15: warning: no previous declaration for 'rust_helper_copy_from_user' [-Wmissing-declarations]
57 | unsigned long rust_helper_copy_from_user(void *to, const void __user *from, unsigned long n)
| ^~~~~~~~~~~~~~~~~~~~~~~~~~
>> rust/helpers.c:63:15: warning: no previous declaration for 'rust_helper_copy_to_user' [-Wmissing-declarations]
63 | unsigned long rust_helper_copy_to_user(void __user *to, const void *from, unsigned long n)
| ^~~~~~~~~~~~~~~~~~~~~~~~
>> rust/helpers.c:69:15: warning: no previous declaration for 'rust_helper_clear_user' [-Wmissing-declarations]
69 | unsigned long rust_helper_clear_user(void __user *to, unsigned long n)
| ^~~~~~~~~~~~~~~~~~~~~~
>> rust/helpers.c:75:15: warning: no previous declaration for 'rust_helper_ioremap' [-Wmissing-declarations]
75 | void __iomem *rust_helper_ioremap(resource_size_t offset, unsigned long size)
| ^~~~~~~~~~~~~~~~~~~
>> rust/helpers.c:81:4: warning: no previous declaration for 'rust_helper_readb' [-Wmissing-declarations]
81 | u8 rust_helper_readb(const volatile void __iomem *addr)
| ^~~~~~~~~~~~~~~~~
>> rust/helpers.c:87:5: warning: no previous declaration for 'rust_helper_readw' [-Wmissing-declarations]
87 | u16 rust_helper_readw(const volatile void __iomem *addr)
| ^~~~~~~~~~~~~~~~~
>> rust/helpers.c:93:5: warning: no previous declaration for 'rust_helper_readl' [-Wmissing-declarations]
93 | u32 rust_helper_readl(const volatile void __iomem *addr)
| ^~~~~~~~~~~~~~~~~
>> rust/helpers.c:100:5: warning: no previous declaration for 'rust_helper_readq' [-Wmissing-declarations]
100 | u64 rust_helper_readq(const volatile void __iomem *addr)
| ^~~~~~~~~~~~~~~~~
>> rust/helpers.c:107:6: warning: no previous declaration for 'rust_helper_writeb' [-Wmissing-declarations]
107 | void rust_helper_writeb(u8 value, volatile void __iomem *addr)
| ^~~~~~~~~~~~~~~~~~
>> rust/helpers.c:113:6: warning: no previous declaration for 'rust_helper_writew' [-Wmissing-declarations]
113 | void rust_helper_writew(u16 value, volatile void __iomem *addr)
| ^~~~~~~~~~~~~~~~~~
>> rust/helpers.c:119:6: warning: no previous declaration for 'rust_helper_writel' [-Wmissing-declarations]
119 | void rust_helper_writel(u32 value, volatile void __iomem *addr)
| ^~~~~~~~~~~~~~~~~~
>> rust/helpers.c:126:6: warning: no previous declaration for 'rust_helper_writeq' [-Wmissing-declarations]
126 | void rust_helper_writeq(u64 value, volatile void __iomem *addr)
| ^~~~~~~~~~~~~~~~~~
>> rust/helpers.c:133:4: warning: no previous declaration for 'rust_helper_readb_relaxed' [-Wmissing-declarations]
133 | u8 rust_helper_readb_relaxed(const volatile void __iomem *addr)
| ^~~~~~~~~~~~~~~~~~~~~~~~~
>> rust/helpers.c:139:5: warning: no previous declaration for 'rust_helper_readw_relaxed' [-Wmissing-declarations]
139 | u16 rust_helper_readw_relaxed(const volatile void __iomem *addr)
| ^~~~~~~~~~~~~~~~~~~~~~~~~
>> rust/helpers.c:145:5: warning: no previous declaration for 'rust_helper_readl_relaxed' [-Wmissing-declarations]
145 | u32 rust_helper_readl_relaxed(const volatile void __iomem *addr)
| ^~~~~~~~~~~~~~~~~~~~~~~~~
>> rust/helpers.c:152:5: warning: no previous declaration for 'rust_helper_readq_relaxed' [-Wmissing-declarations]
152 | u64 rust_helper_readq_relaxed(const volatile void __iomem *addr)
| ^~~~~~~~~~~~~~~~~~~~~~~~~
>> rust/helpers.c:159:6: warning: no previous declaration for 'rust_helper_writeb_relaxed' [-Wmissing-declarations]
159 | void rust_helper_writeb_relaxed(u8 value, volatile void __iomem *addr)
| ^~~~~~~~~~~~~~~~~~~~~~~~~~
rust/helpers.c:165:6: warning: no previous declaration for 'rust_helper_writew_relaxed' [-Wmissing-declarations]
165 | void rust_helper_writew_relaxed(u16 value, volatile void __iomem *addr)
| ^~~~~~~~~~~~~~~~~~~~~~~~~~
rust/helpers.c:171:6: warning: no previous declaration for 'rust_helper_writel_relaxed' [-Wmissing-declarations]
171 | void rust_helper_writel_relaxed(u32 value, volatile void __iomem *addr)
| ^~~~~~~~~~~~~~~~~~~~~~~~~~
rust/helpers.c:178:6: warning: no previous declaration for 'rust_helper_writeq_relaxed' [-Wmissing-declarations]
178 | void rust_helper_writeq_relaxed(u64 value, volatile void __iomem *addr)
| ^~~~~~~~~~~~~~~~~~~~~~~~~~
rust/helpers.c:184:6: warning: no previous declaration for 'rust_helper___spin_lock_init' [-Wmissing-declarations]
184 | void rust_helper___spin_lock_init(spinlock_t *lock, const char *name,
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
rust/helpers.c:195:6: warning: no previous declaration for 'rust_helper_spin_lock' [-Wmissing-declarations]
195 | void rust_helper_spin_lock(spinlock_t *lock)
| ^~~~~~~~~~~~~~~~~~~~~
rust/helpers.c:201:6: warning: no previous declaration for 'rust_helper_spin_unlock' [-Wmissing-declarations]
201 | void rust_helper_spin_unlock(spinlock_t *lock)
| ^~~~~~~~~~~~~~~~~~~~~~~
rust/helpers.c:207:15: warning: no previous declaration for 'rust_helper_spin_lock_irqsave' [-Wmissing-declarations]
207 | unsigned long rust_helper_spin_lock_irqsave(spinlock_t *lock)
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
rust/helpers.c:215:6: warning: no previous declaration for 'rust_helper_spin_unlock_irqrestore' [-Wmissing-declarations]
215 | void rust_helper_spin_unlock_irqrestore(spinlock_t *lock, unsigned long flags)
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
rust/helpers.c:221:6: warning: no previous declaration for 'rust_helper_init_wait' [-Wmissing-declarations]
221 | void rust_helper_init_wait(struct wait_queue_entry *wq_entry)
| ^~~~~~~~~~~~~~~~~~~~~
rust/helpers.c:227:5: warning: no previous declaration for 'rust_helper_signal_pending' [-Wmissing-declarations]
227 | int rust_helper_signal_pending(struct task_struct *t)
| ^~~~~~~~~~~~~~~~~~~~~~~~~~
rust/helpers.c:233:14: warning: no previous declaration for 'rust_helper_alloc_pages' [-Wmissing-declarations]
233 | struct page *rust_helper_alloc_pages(gfp_t gfp_mask, unsigned int order)
| ^~~~~~~~~~~~~~~~~~~~~~~
rust/helpers.c:239:7: warning: no previous declaration for 'rust_helper_kmap' [-Wmissing-declarations]
239 | void *rust_helper_kmap(struct page *page)
| ^~~~~~~~~~~~~~~~
rust/helpers.c:245:6: warning: no previous declaration for 'rust_helper_kunmap' [-Wmissing-declarations]
245 | void rust_helper_kunmap(struct page *page)
| ^~~~~~~~~~~~~~~~~~
rust/helpers.c:251:5: warning: no previous declaration for 'rust_helper_cond_resched' [-Wmissing-declarations]
251 | int rust_helper_cond_resched(void)
| ^~~~~~~~~~~~~~~~~~~~~~~~
rust/helpers.c:257:8: warning: no previous declaration for 'rust_helper_copy_from_iter' [-Wmissing-declarations]
257 | size_t rust_helper_copy_from_iter(void *addr, size_t bytes, struct iov_iter *i)
| ^~~~~~~~~~~~~~~~~~~~~~~~~~
rust/helpers.c:263:8: warning: no previous declaration for 'rust_helper_copy_to_iter' [-Wmissing-declarations]
263 | size_t rust_helper_copy_to_iter(const void *addr, size_t bytes, struct iov_iter *i)
| ^~~~~~~~~~~~~~~~~~~~~~~~
rust/helpers.c:269:6: warning: no previous declaration for 'rust_helper_IS_ERR' [-Wmissing-declarations]
269 | bool rust_helper_IS_ERR(__force const void *ptr)
| ^~~~~~~~~~~~~~~~~~
rust/helpers.c:275:6: warning: no previous declaration for 'rust_helper_PTR_ERR' [-Wmissing-declarations]
275 | long rust_helper_PTR_ERR(__force const void *ptr)
| ^~~~~~~~~~~~~~~~~~~
rust/helpers.c:281:13: warning: no previous declaration for 'rust_helper_errname' [-Wmissing-declarations]
281 | const char *rust_helper_errname(int err)
| ^~~~~~~~~~~~~~~~~~~
rust/helpers.c:287:6: warning: no previous declaration for 'rust_helper_mutex_lock' [-Wmissing-declarations]
287 | void rust_helper_mutex_lock(struct mutex *lock)
| ^~~~~~~~~~~~~~~~~~~~~~
rust/helpers.c:293:6: warning: no previous declaration for 'rust_helper_amba_set_drvdata' [-Wmissing-declarations]
293 | void rust_helper_amba_set_drvdata(struct amba_device *dev, void *data)
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
rust/helpers.c:299:7: warning: no previous declaration for 'rust_helper_amba_get_drvdata' [-Wmissing-declarations]
299 | void *rust_helper_amba_get_drvdata(struct amba_device *dev)
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
rust/helpers.c:306:1: warning: no previous declaration for 'rust_helper_platform_get_drvdata' [-Wmissing-declarations]
306 | rust_helper_platform_get_drvdata(const struct platform_device *pdev)
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
rust/helpers.c:313:1: warning: no previous declaration for 'rust_helper_platform_set_drvdata' [-Wmissing-declarations]
313 | rust_helper_platform_set_drvdata(struct platform_device *pdev,
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
rust/helpers.c:320:12: warning: no previous declaration for 'rust_helper_REFCOUNT_INIT' [-Wmissing-declarations]
320 | refcount_t rust_helper_REFCOUNT_INIT(int n)
| ^~~~~~~~~~~~~~~~~~~~~~~~~
rust/helpers.c:326:6: warning: no previous declaration for 'rust_helper_refcount_inc' [-Wmissing-declarations]
326 | void rust_helper_refcount_inc(refcount_t *r)
| ^~~~~~~~~~~~~~~~~~~~~~~~
rust/helpers.c:332:6: warning: no previous declaration for 'rust_helper_refcount_dec_and_test' [-Wmissing-declarations]
332 | bool rust_helper_refcount_dec_and_test(refcount_t *r)
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
rust/helpers.c:338:6: warning: no previous declaration for 'rust_helper_rb_link_node' [-Wmissing-declarations]
338 | void rust_helper_rb_link_node(struct rb_node *node, struct rb_node *parent,
| ^~~~~~~~~~~~~~~~~~~~~~~~
rust/helpers.c:345:21: warning: no previous declaration for 'rust_helper_get_current' [-Wmissing-declarations]
345 | struct task_struct *rust_helper_get_current(void)
| ^~~~~~~~~~~~~~~~~~~~~~~
rust/helpers.c:351:6: warning: no previous declaration for 'rust_helper_get_task_struct' [-Wmissing-declarations]
351 | void rust_helper_get_task_struct(struct task_struct * t)
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~
rust/helpers.c:357:6: warning: no previous declaration for 'rust_helper_put_task_struct' [-Wmissing-declarations]
357 | void rust_helper_put_task_struct(struct task_struct * t)
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~
rust/helpers.c:363:5: warning: no previous declaration for 'rust_helper_security_binder_set_context_mgr' [-Wmissing-declarations]
363 | int rust_helper_security_binder_set_context_mgr(const struct cred *mgr)
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
rust/helpers.c:369:5: warning: no previous declaration for 'rust_helper_security_binder_transaction' [-Wmissing-declarations]
369 | int rust_helper_security_binder_transaction(const struct cred *from,
vim +/rust_helper_BUG +39 rust/helpers.c
40cbc3f043eeea Miguel Ojeda 2019-09-24 38
5444b8b2ad903d Gary Guo 2021-07-29 @39 __noreturn void rust_helper_BUG(void)
40cbc3f043eeea Miguel Ojeda 2019-09-24 40 {
40cbc3f043eeea Miguel Ojeda 2019-09-24 41 BUG();
40cbc3f043eeea Miguel Ojeda 2019-09-24 42 }
556905864c54b7 Wei Liu 2022-01-20 43 EXPORT_SYMBOL_GPL(rust_helper_BUG);
40cbc3f043eeea Miguel Ojeda 2019-09-24 44
632ef868c289ee Maciej Falkowski 2021-10-29 @45 void rust_helper_clk_disable_unprepare(struct clk *clk)
632ef868c289ee Maciej Falkowski 2021-10-29 46 {
632ef868c289ee Maciej Falkowski 2021-10-29 47 return clk_disable_unprepare(clk);
632ef868c289ee Maciej Falkowski 2021-10-29 48 }
632ef868c289ee Maciej Falkowski 2021-10-29 49 EXPORT_SYMBOL_GPL(rust_helper_clk_disable_unprepare);
632ef868c289ee Maciej Falkowski 2021-10-29 50
632ef868c289ee Maciej Falkowski 2021-10-29 @51 int rust_helper_clk_prepare_enable(struct clk *clk)
632ef868c289ee Maciej Falkowski 2021-10-29 52 {
632ef868c289ee Maciej Falkowski 2021-10-29 53 return clk_prepare_enable(clk);
632ef868c289ee Maciej Falkowski 2021-10-29 54 }
632ef868c289ee Maciej Falkowski 2021-10-29 55 EXPORT_SYMBOL_GPL(rust_helper_clk_prepare_enable);
632ef868c289ee Maciej Falkowski 2021-10-29 56
7c6155bc5ecf03 Miguel Ojeda 2020-11-27 @57 unsigned long rust_helper_copy_from_user(void *to, const void __user *from, unsigned long n)
7c6155bc5ecf03 Miguel Ojeda 2020-11-27 58 {
7c6155bc5ecf03 Miguel Ojeda 2020-11-27 59 return copy_from_user(to, from, n);
7c6155bc5ecf03 Miguel Ojeda 2020-11-27 60 }
556905864c54b7 Wei Liu 2022-01-20 61 EXPORT_SYMBOL_GPL(rust_helper_copy_from_user);
7c6155bc5ecf03 Miguel Ojeda 2020-11-27 62
7c6155bc5ecf03 Miguel Ojeda 2020-11-27 @63 unsigned long rust_helper_copy_to_user(void __user *to, const void *from, unsigned long n)
7c6155bc5ecf03 Miguel Ojeda 2020-11-27 64 {
7c6155bc5ecf03 Miguel Ojeda 2020-11-27 65 return copy_to_user(to, from, n);
7c6155bc5ecf03 Miguel Ojeda 2020-11-27 66 }
556905864c54b7 Wei Liu 2022-01-20 67 EXPORT_SYMBOL_GPL(rust_helper_copy_to_user);
40cbc3f043eeea Miguel Ojeda 2019-09-24 68
126c162b3f0d35 Wedson Almeida Filho 2021-04-23 @69 unsigned long rust_helper_clear_user(void __user *to, unsigned long n)
126c162b3f0d35 Wedson Almeida Filho 2021-04-23 70 {
126c162b3f0d35 Wedson Almeida Filho 2021-04-23 71 return clear_user(to, n);
126c162b3f0d35 Wedson Almeida Filho 2021-04-23 72 }
556905864c54b7 Wei Liu 2022-01-20 73 EXPORT_SYMBOL_GPL(rust_helper_clear_user);
126c162b3f0d35 Wedson Almeida Filho 2021-04-23 74
f9e2f7e1a4468a Wedson Almeida Filho 2021-07-29 @75 void __iomem *rust_helper_ioremap(resource_size_t offset, unsigned long size)
f9e2f7e1a4468a Wedson Almeida Filho 2021-07-29 76 {
f9e2f7e1a4468a Wedson Almeida Filho 2021-07-29 77 return ioremap(offset, size);
f9e2f7e1a4468a Wedson Almeida Filho 2021-07-29 78 }
f9e2f7e1a4468a Wedson Almeida Filho 2021-07-29 79 EXPORT_SYMBOL_GPL(rust_helper_ioremap);
f9e2f7e1a4468a Wedson Almeida Filho 2021-07-29 80
f9e2f7e1a4468a Wedson Almeida Filho 2021-07-29 @81 u8 rust_helper_readb(const volatile void __iomem *addr)
f9e2f7e1a4468a Wedson Almeida Filho 2021-07-29 82 {
f9e2f7e1a4468a Wedson Almeida Filho 2021-07-29 83 return readb(addr);
f9e2f7e1a4468a Wedson Almeida Filho 2021-07-29 84 }
f9e2f7e1a4468a Wedson Almeida Filho 2021-07-29 85 EXPORT_SYMBOL_GPL(rust_helper_readb);
f9e2f7e1a4468a Wedson Almeida Filho 2021-07-29 86
f9e2f7e1a4468a Wedson Almeida Filho 2021-07-29 @87 u16 rust_helper_readw(const volatile void __iomem *addr)
f9e2f7e1a4468a Wedson Almeida Filho 2021-07-29 88 {
f9e2f7e1a4468a Wedson Almeida Filho 2021-07-29 89 return readw(addr);
f9e2f7e1a4468a Wedson Almeida Filho 2021-07-29 90 }
f9e2f7e1a4468a Wedson Almeida Filho 2021-07-29 91 EXPORT_SYMBOL_GPL(rust_helper_readw);
f9e2f7e1a4468a Wedson Almeida Filho 2021-07-29 92
f9e2f7e1a4468a Wedson Almeida Filho 2021-07-29 @93 u32 rust_helper_readl(const volatile void __iomem *addr)
f9e2f7e1a4468a Wedson Almeida Filho 2021-07-29 94 {
f9e2f7e1a4468a Wedson Almeida Filho 2021-07-29 95 return readl(addr);
f9e2f7e1a4468a Wedson Almeida Filho 2021-07-29 96 }
f9e2f7e1a4468a Wedson Almeida Filho 2021-07-29 97 EXPORT_SYMBOL_GPL(rust_helper_readl);
f9e2f7e1a4468a Wedson Almeida Filho 2021-07-29 98
f9e2f7e1a4468a Wedson Almeida Filho 2021-07-29 99 #ifdef CONFIG_64BIT
f9e2f7e1a4468a Wedson Almeida Filho 2021-07-29 @100 u64 rust_helper_readq(const volatile void __iomem *addr)
f9e2f7e1a4468a Wedson Almeida Filho 2021-07-29 101 {
f9e2f7e1a4468a Wedson Almeida Filho 2021-07-29 102 return readq(addr);
f9e2f7e1a4468a Wedson Almeida Filho 2021-07-29 103 }
f9e2f7e1a4468a Wedson Almeida Filho 2021-07-29 104 EXPORT_SYMBOL_GPL(rust_helper_readq);
f9e2f7e1a4468a Wedson Almeida Filho 2021-07-29 105 #endif
f9e2f7e1a4468a Wedson Almeida Filho 2021-07-29 106
f9e2f7e1a4468a Wedson Almeida Filho 2021-07-29 @107 void rust_helper_writeb(u8 value, volatile void __iomem *addr)
f9e2f7e1a4468a Wedson Almeida Filho 2021-07-29 108 {
f9e2f7e1a4468a Wedson Almeida Filho 2021-07-29 109 writeb(value, addr);
f9e2f7e1a4468a Wedson Almeida Filho 2021-07-29 110 }
f9e2f7e1a4468a Wedson Almeida Filho 2021-07-29 111 EXPORT_SYMBOL_GPL(rust_helper_writeb);
f9e2f7e1a4468a Wedson Almeida Filho 2021-07-29 112
f9e2f7e1a4468a Wedson Almeida Filho 2021-07-29 @113 void rust_helper_writew(u16 value, volatile void __iomem *addr)
f9e2f7e1a4468a Wedson Almeida Filho 2021-07-29 114 {
f9e2f7e1a4468a Wedson Almeida Filho 2021-07-29 115 writew(value, addr);
f9e2f7e1a4468a Wedson Almeida Filho 2021-07-29 116 }
f9e2f7e1a4468a Wedson Almeida Filho 2021-07-29 117 EXPORT_SYMBOL_GPL(rust_helper_writew);
f9e2f7e1a4468a Wedson Almeida Filho 2021-07-29 118
f9e2f7e1a4468a Wedson Almeida Filho 2021-07-29 @119 void rust_helper_writel(u32 value, volatile void __iomem *addr)
f9e2f7e1a4468a Wedson Almeida Filho 2021-07-29 120 {
f9e2f7e1a4468a Wedson Almeida Filho 2021-07-29 121 writel(value, addr);
f9e2f7e1a4468a Wedson Almeida Filho 2021-07-29 122 }
f9e2f7e1a4468a Wedson Almeida Filho 2021-07-29 123 EXPORT_SYMBOL_GPL(rust_helper_writel);
f9e2f7e1a4468a Wedson Almeida Filho 2021-07-29 124
f9e2f7e1a4468a Wedson Almeida Filho 2021-07-29 125 #ifdef CONFIG_64BIT
f9e2f7e1a4468a Wedson Almeida Filho 2021-07-29 @126 void rust_helper_writeq(u64 value, volatile void __iomem *addr)
f9e2f7e1a4468a Wedson Almeida Filho 2021-07-29 127 {
f9e2f7e1a4468a Wedson Almeida Filho 2021-07-29 128 writeq(value, addr);
f9e2f7e1a4468a Wedson Almeida Filho 2021-07-29 129 }
f9e2f7e1a4468a Wedson Almeida Filho 2021-07-29 130 EXPORT_SYMBOL_GPL(rust_helper_writeq);
f9e2f7e1a4468a Wedson Almeida Filho 2021-07-29 131 #endif
f9e2f7e1a4468a Wedson Almeida Filho 2021-07-29 132
e29f395275ea15 Maciej Falkowski 2021-10-29 @133 u8 rust_helper_readb_relaxed(const volatile void __iomem *addr)
e29f395275ea15 Maciej Falkowski 2021-10-29 134 {
e29f395275ea15 Maciej Falkowski 2021-10-29 135 return readb_relaxed(addr);
e29f395275ea15 Maciej Falkowski 2021-10-29 136 }
e29f395275ea15 Maciej Falkowski 2021-10-29 137 EXPORT_SYMBOL_GPL(rust_helper_readb_relaxed);
e29f395275ea15 Maciej Falkowski 2021-10-29 138
e29f395275ea15 Maciej Falkowski 2021-10-29 @139 u16 rust_helper_readw_relaxed(const volatile void __iomem *addr)
e29f395275ea15 Maciej Falkowski 2021-10-29 140 {
e29f395275ea15 Maciej Falkowski 2021-10-29 141 return readw_relaxed(addr);
e29f395275ea15 Maciej Falkowski 2021-10-29 142 }
e29f395275ea15 Maciej Falkowski 2021-10-29 143 EXPORT_SYMBOL_GPL(rust_helper_readw_relaxed);
e29f395275ea15 Maciej Falkowski 2021-10-29 144
e29f395275ea15 Maciej Falkowski 2021-10-29 @145 u32 rust_helper_readl_relaxed(const volatile void __iomem *addr)
e29f395275ea15 Maciej Falkowski 2021-10-29 146 {
e29f395275ea15 Maciej Falkowski 2021-10-29 147 return readl_relaxed(addr);
e29f395275ea15 Maciej Falkowski 2021-10-29 148 }
e29f395275ea15 Maciej Falkowski 2021-10-29 149 EXPORT_SYMBOL_GPL(rust_helper_readl_relaxed);
e29f395275ea15 Maciej Falkowski 2021-10-29 150
e29f395275ea15 Maciej Falkowski 2021-10-29 151 #ifdef CONFIG_64BIT
e29f395275ea15 Maciej Falkowski 2021-10-29 @152 u64 rust_helper_readq_relaxed(const volatile void __iomem *addr)
e29f395275ea15 Maciej Falkowski 2021-10-29 153 {
e29f395275ea15 Maciej Falkowski 2021-10-29 154 return readq_relaxed(addr);
e29f395275ea15 Maciej Falkowski 2021-10-29 155 }
e29f395275ea15 Maciej Falkowski 2021-10-29 156 EXPORT_SYMBOL_GPL(rust_helper_readq_relaxed);
e29f395275ea15 Maciej Falkowski 2021-10-29 157 #endif
e29f395275ea15 Maciej Falkowski 2021-10-29 158
e29f395275ea15 Maciej Falkowski 2021-10-29 @159 void rust_helper_writeb_relaxed(u8 value, volatile void __iomem *addr)
e29f395275ea15 Maciej Falkowski 2021-10-29 160 {
e29f395275ea15 Maciej Falkowski 2021-10-29 161 writeb_relaxed(value, addr);
e29f395275ea15 Maciej Falkowski 2021-10-29 162 }
e29f395275ea15 Maciej Falkowski 2021-10-29 163 EXPORT_SYMBOL_GPL(rust_helper_writeb_relaxed);
e29f395275ea15 Maciej Falkowski 2021-10-29 164
e29f395275ea15 Maciej Falkowski 2021-10-29 @165 void rust_helper_writew_relaxed(u16 value, volatile void __iomem *addr)
e29f395275ea15 Maciej Falkowski 2021-10-29 166 {
e29f395275ea15 Maciej Falkowski 2021-10-29 167 writew_relaxed(value, addr);
e29f395275ea15 Maciej Falkowski 2021-10-29 168 }
e29f395275ea15 Maciej Falkowski 2021-10-29 169 EXPORT_SYMBOL_GPL(rust_helper_writew_relaxed);
e29f395275ea15 Maciej Falkowski 2021-10-29 170
e29f395275ea15 Maciej Falkowski 2021-10-29 @171 void rust_helper_writel_relaxed(u32 value, volatile void __iomem *addr)
e29f395275ea15 Maciej Falkowski 2021-10-29 172 {
e29f395275ea15 Maciej Falkowski 2021-10-29 173 writel_relaxed(value, addr);
e29f395275ea15 Maciej Falkowski 2021-10-29 174 }
e29f395275ea15 Maciej Falkowski 2021-10-29 175 EXPORT_SYMBOL_GPL(rust_helper_writel_relaxed);
e29f395275ea15 Maciej Falkowski 2021-10-29 176
e29f395275ea15 Maciej Falkowski 2021-10-29 177 #ifdef CONFIG_64BIT
e29f395275ea15 Maciej Falkowski 2021-10-29 @178 void rust_helper_writeq_relaxed(u64 value, volatile void __iomem *addr)
e29f395275ea15 Maciej Falkowski 2021-10-29 179 {
e29f395275ea15 Maciej Falkowski 2021-10-29 180 writeq_relaxed(value, addr);
e29f395275ea15 Maciej Falkowski 2021-10-29 181 }
e29f395275ea15 Maciej Falkowski 2021-10-29 182 EXPORT_SYMBOL_GPL(rust_helper_writeq_relaxed);
e29f395275ea15 Maciej Falkowski 2021-10-29 183 #endif
5444b8b2ad903d Gary Guo 2021-07-29 @184 void rust_helper___spin_lock_init(spinlock_t *lock, const char *name,
ba93231f3de539 Wedson Almeida Filho 2021-03-11 185 struct lock_class_key *key)
ba93231f3de539 Wedson Almeida Filho 2021-03-11 186 {
ba93231f3de539 Wedson Almeida Filho 2021-03-11 187 #ifdef CONFIG_DEBUG_SPINLOCK
ba93231f3de539 Wedson Almeida Filho 2021-03-11 188 __spin_lock_init(lock, name, key);
ba93231f3de539 Wedson Almeida Filho 2021-03-11 189 #else
ba93231f3de539 Wedson Almeida Filho 2021-03-11 190 spin_lock_init(lock);
ba93231f3de539 Wedson Almeida Filho 2021-03-11 191 #endif
ba93231f3de539 Wedson Almeida Filho 2021-03-11 192 }
5444b8b2ad903d Gary Guo 2021-07-29 193 EXPORT_SYMBOL_GPL(rust_helper___spin_lock_init);
ba93231f3de539 Wedson Almeida Filho 2021-03-11 194
ba93231f3de539 Wedson Almeida Filho 2021-03-11 @195 void rust_helper_spin_lock(spinlock_t *lock)
ba93231f3de539 Wedson Almeida Filho 2021-03-11 196 {
ba93231f3de539 Wedson Almeida Filho 2021-03-11 197 spin_lock(lock);
ba93231f3de539 Wedson Almeida Filho 2021-03-11 198 }
da968f8d40d365 Miguel Ojeda 2021-04-13 199 EXPORT_SYMBOL_GPL(rust_helper_spin_lock);
ba93231f3de539 Wedson Almeida Filho 2021-03-11 200
ba93231f3de539 Wedson Almeida Filho 2021-03-11 @201 void rust_helper_spin_unlock(spinlock_t *lock)
ba93231f3de539 Wedson Almeida Filho 2021-03-11 202 {
ba93231f3de539 Wedson Almeida Filho 2021-03-11 203 spin_unlock(lock);
ba93231f3de539 Wedson Almeida Filho 2021-03-11 204 }
da968f8d40d365 Miguel Ojeda 2021-04-13 205 EXPORT_SYMBOL_GPL(rust_helper_spin_unlock);
ba93231f3de539 Wedson Almeida Filho 2021-03-11 206
6d6e1d5ac5785e Wedson Almeida Filho 2021-11-05 @207 unsigned long rust_helper_spin_lock_irqsave(spinlock_t *lock)
6d6e1d5ac5785e Wedson Almeida Filho 2021-11-05 208 {
6d6e1d5ac5785e Wedson Almeida Filho 2021-11-05 209 unsigned long flags;
6d6e1d5ac5785e Wedson Almeida Filho 2021-11-05 210 spin_lock_irqsave(lock, flags);
6d6e1d5ac5785e Wedson Almeida Filho 2021-11-05 211 return flags;
6d6e1d5ac5785e Wedson Almeida Filho 2021-11-05 212 }
6d6e1d5ac5785e Wedson Almeida Filho 2021-11-05 213 EXPORT_SYMBOL_GPL(rust_helper_spin_lock_irqsave);
6d6e1d5ac5785e Wedson Almeida Filho 2021-11-05 214
6d6e1d5ac5785e Wedson Almeida Filho 2021-11-05 @215 void rust_helper_spin_unlock_irqrestore(spinlock_t *lock, unsigned long flags)
6d6e1d5ac5785e Wedson Almeida Filho 2021-11-05 216 {
6d6e1d5ac5785e Wedson Almeida Filho 2021-11-05 217 spin_unlock_irqrestore(lock, flags);
6d6e1d5ac5785e Wedson Almeida Filho 2021-11-05 218 }
6d6e1d5ac5785e Wedson Almeida Filho 2021-11-05 219 EXPORT_SYMBOL_GPL(rust_helper_spin_unlock_irqrestore);
6d6e1d5ac5785e Wedson Almeida Filho 2021-11-05 220
1640a97de758bc Wedson Almeida Filho 2021-03-11 @221 void rust_helper_init_wait(struct wait_queue_entry *wq_entry)
1640a97de758bc Wedson Almeida Filho 2021-03-11 222 {
1640a97de758bc Wedson Almeida Filho 2021-03-11 223 init_wait(wq_entry);
1640a97de758bc Wedson Almeida Filho 2021-03-11 224 }
da968f8d40d365 Miguel Ojeda 2021-04-13 225 EXPORT_SYMBOL_GPL(rust_helper_init_wait);
1640a97de758bc Wedson Almeida Filho 2021-03-11 226
6556b37a7fc577 Wedson Almeida Filho 2021-07-01 @227 int rust_helper_signal_pending(struct task_struct *t)
d8dcaf80c95350 Wedson Almeida Filho 2021-04-11 228 {
6556b37a7fc577 Wedson Almeida Filho 2021-07-01 229 return signal_pending(t);
1640a97de758bc Wedson Almeida Filho 2021-03-11 230 }
da968f8d40d365 Miguel Ojeda 2021-04-13 231 EXPORT_SYMBOL_GPL(rust_helper_signal_pending);
1640a97de758bc Wedson Almeida Filho 2021-03-11 232
d8dcaf80c95350 Wedson Almeida Filho 2021-04-11 @233 struct page *rust_helper_alloc_pages(gfp_t gfp_mask, unsigned int order)
d8dcaf80c95350 Wedson Almeida Filho 2021-04-11 234 {
d8dcaf80c95350 Wedson Almeida Filho 2021-04-11 235 return alloc_pages(gfp_mask, order);
d8dcaf80c95350 Wedson Almeida Filho 2021-04-11 236 }
da968f8d40d365 Miguel Ojeda 2021-04-13 237 EXPORT_SYMBOL_GPL(rust_helper_alloc_pages);
d8dcaf80c95350 Wedson Almeida Filho 2021-04-11 238
:::::: The code at line 39 was first introduced by commit
:::::: 5444b8b2ad903d4d85bc01519b16fea3555b1cb7 rust: use the generated helper bindings
:::::: TO: Gary Guo <gary(a)garyguo.net>
:::::: CC: Gary Guo <gary(a)garyguo.net>
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
7 months, 2 weeks
Re: [PATCH] uio: Replace mutex info_lock with percpu_ref to improve performance
by kernel test robot
Hi Guixin,
Thank you for the patch! Perhaps something to improve:
[auto build test WARNING on char-misc/char-misc-testing]
[also build test WARNING on v5.17-rc3 next-20220208]
[If your patch is applied to the wrong git tree, kindly drop us a note.
And when submitting patch, we suggest to use '--base' as documented in
https://git-scm.com/docs/git-format-patch]
url: https://github.com/0day-ci/linux/commits/Guixin-Liu/uio-Replace-mutex-inf...
base: https://git.kernel.org/pub/scm/linux/kernel/git/gregkh/char-misc.git b86f32951d173b43d1db8de883473fc53dc3c772
config: parisc-randconfig-s032-20220208 (https://download.01.org/0day-ci/archive/20220208/202202082111.R18zUEHK-lk...)
compiler: hppa-linux-gcc (GCC) 11.2.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-dirty
# https://github.com/0day-ci/linux/commit/271c7d04f21a7c880e9dfb056eca51835...
git remote add linux-review https://github.com/0day-ci/linux
git fetch --no-tags linux-review Guixin-Liu/uio-Replace-mutex-info_lock-with-percpu_ref-to-improve-performance/20220208-152119
git checkout 271c7d04f21a7c880e9dfb056eca51835576833d
# save the config file to linux build tree
mkdir build_dir
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-11.2.0 make.cross C=1 CF='-fdiagnostic-prefix -D__CHECK_ENDIAN__' O=build_dir ARCH=parisc SHELL=/bin/bash drivers/uio/
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp(a)intel.com>
sparse warnings: (new ones prefixed by >>)
>> drivers/uio/uio.c:564:24: sparse: sparse: incorrect type in return expression (different base types) @@ expected restricted __poll_t @@ got int @@
drivers/uio/uio.c:564:24: sparse: expected restricted __poll_t
drivers/uio/uio.c:564:24: sparse: got int
drivers/uio/uio.c:567:21: sparse: sparse: incorrect type in assignment (different base types) @@ expected restricted __poll_t [usertype] ret @@ got int @@
drivers/uio/uio.c:567:21: sparse: expected restricted __poll_t [usertype] ret
drivers/uio/uio.c:567:21: sparse: got int
>> drivers/uio/uio.c:699:24: sparse: sparse: incorrect type in return expression (different base types) @@ expected restricted vm_fault_t @@ got int @@
drivers/uio/uio.c:699:24: sparse: expected restricted vm_fault_t
drivers/uio/uio.c:699:24: sparse: got int
vim +564 drivers/uio/uio.c
556
557 static __poll_t uio_poll(struct file *filep, poll_table *wait)
558 {
559 struct uio_listener *listener = filep->private_data;
560 struct uio_device *idev = listener->dev;
561 __poll_t ret = 0;
562
563 if (!percpu_ref_tryget_live(&idev->info_ref))
> 564 return -EINVAL;
565
566 if (!idev->info || !idev->info->irq)
567 ret = -EIO;
568 percpu_ref_put(&idev->info_ref);
569
570 if (ret)
571 return ret;
572
573 poll_wait(filep, &idev->wait, wait);
574 if (listener->event_count != atomic_read(&idev->event))
575 return EPOLLIN | EPOLLRDNORM;
576 return 0;
577 }
578
579 static ssize_t uio_read(struct file *filep, char __user *buf,
580 size_t count, loff_t *ppos)
581 {
582 struct uio_listener *listener = filep->private_data;
583 struct uio_device *idev = listener->dev;
584 DECLARE_WAITQUEUE(wait, current);
585 ssize_t retval = 0;
586 s32 event_count;
587
588 if (count != sizeof(s32))
589 return -EINVAL;
590
591 add_wait_queue(&idev->wait, &wait);
592
593 do {
594 if (!percpu_ref_tryget_live(&idev->info_ref)) {
595 retval = -EINVAL;
596 break;
597 }
598
599 if (!idev->info || !idev->info->irq) {
600 retval = -EIO;
601 percpu_ref_put(&idev->info_ref);
602 break;
603 }
604 percpu_ref_put(&idev->info_ref);
605
606 set_current_state(TASK_INTERRUPTIBLE);
607
608 event_count = atomic_read(&idev->event);
609 if (event_count != listener->event_count) {
610 __set_current_state(TASK_RUNNING);
611 if (copy_to_user(buf, &event_count, count))
612 retval = -EFAULT;
613 else {
614 listener->event_count = event_count;
615 retval = count;
616 }
617 break;
618 }
619
620 if (filep->f_flags & O_NONBLOCK) {
621 retval = -EAGAIN;
622 break;
623 }
624
625 if (signal_pending(current)) {
626 retval = -ERESTARTSYS;
627 break;
628 }
629 schedule();
630 } while (1);
631
632 __set_current_state(TASK_RUNNING);
633 remove_wait_queue(&idev->wait, &wait);
634
635 return retval;
636 }
637
638 static ssize_t uio_write(struct file *filep, const char __user *buf,
639 size_t count, loff_t *ppos)
640 {
641 struct uio_listener *listener = filep->private_data;
642 struct uio_device *idev = listener->dev;
643 ssize_t retval;
644 s32 irq_on;
645
646 if (count != sizeof(s32))
647 return -EINVAL;
648
649 if (copy_from_user(&irq_on, buf, count))
650 return -EFAULT;
651
652 if (!percpu_ref_tryget_live(&idev->info_ref))
653 return -EINVAL;
654
655 if (!idev->info) {
656 retval = -EINVAL;
657 goto out;
658 }
659
660 if (!idev->info->irq) {
661 retval = -EIO;
662 goto out;
663 }
664
665 if (!idev->info->irqcontrol) {
666 retval = -ENOSYS;
667 goto out;
668 }
669
670 retval = idev->info->irqcontrol(idev->info, irq_on);
671
672 out:
673 percpu_ref_put(&idev->info_ref);
674 return retval ? retval : sizeof(s32);
675 }
676
677 static int uio_find_mem_index(struct vm_area_struct *vma)
678 {
679 struct uio_device *idev = vma->vm_private_data;
680
681 if (vma->vm_pgoff < MAX_UIO_MAPS) {
682 if (idev->info->mem[vma->vm_pgoff].size == 0)
683 return -1;
684 return (int)vma->vm_pgoff;
685 }
686 return -1;
687 }
688
689 static vm_fault_t uio_vma_fault(struct vm_fault *vmf)
690 {
691 struct uio_device *idev = vmf->vma->vm_private_data;
692 struct page *page;
693 unsigned long offset;
694 void *addr;
695 vm_fault_t ret = 0;
696 int mi;
697
698 if (!percpu_ref_tryget_live(&idev->info_ref))
> 699 return -EINVAL;
700
701 if (!idev->info) {
702 ret = VM_FAULT_SIGBUS;
703 goto out;
704 }
705
706 mi = uio_find_mem_index(vmf->vma);
707 if (mi < 0) {
708 ret = VM_FAULT_SIGBUS;
709 goto out;
710 }
711
712 /*
713 * We need to subtract mi because userspace uses offset = N*PAGE_SIZE
714 * to use mem[N].
715 */
716 offset = (vmf->pgoff - mi) << PAGE_SHIFT;
717
718 addr = (void *)(unsigned long)idev->info->mem[mi].addr + offset;
719 if (idev->info->mem[mi].memtype == UIO_MEM_LOGICAL)
720 page = virt_to_page(addr);
721 else
722 page = vmalloc_to_page(addr);
723 get_page(page);
724 vmf->page = page;
725
726 out:
727 percpu_ref_put(&idev->info_ref);
728 return ret;
729 }
730
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
7 months, 2 weeks