]> git.baikalelectronics.ru Git - kernel.git/commit
drm/msm: use %z format modifier for printing size_t
authorArnd Bergmann <arnd@arndb.de>
Thu, 3 Aug 2017 11:50:48 +0000 (13:50 +0200)
committerRob Clark <robdclark@gmail.com>
Wed, 1 Nov 2017 15:16:28 +0000 (11:16 -0400)
commit3d07a7b10a515b8be88a0bb8e25728df33be5548
tree244bc9d1c21ffa78903f78a839aed70024e1a5de
parent821107bf434c46ad67f1d823db5605df494b211d
drm/msm: use %z format modifier for printing size_t

The return type of ARRAY_SIZE() is size_t, so we have to use
%zu instead of %lu to avoid this warning:

drivers/gpu/drm/msm/msm_gpu.c: In function 'msm_gpu_init':
drivers/gpu/drm/msm/msm_gpu.c:742:31: error: format '%lu' expects argument of type 'long unsigned int', but argument 7 has type 'unsigned int' [-Werror=format=]

The warning it otherwise harmless as size_t is always the
same size as unsigned long in all supported architectures,
but gcc doesn't know that.

Fixes: c2fceabca6d5 ("drm/msm: Support multiple ringbuffers")
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Rob Clark <robdclark@gmail.com>
drivers/gpu/drm/msm/msm_gpu.c