Dave pulled tinydrm yesterday which triggered some compiler warnings:
Dave Airlie:
drivers/gpu/drm/tinydrm/mipi-dbi.c: In function âmipi_dbi_debugfs_command_writeâ:
drivers/gpu/drm/tinydrm/mipi-dbi.c:905:8: warning: âcmdâ may be used uninitialized in this function [-Wmaybe-uninitialized]
ret = mipi_dbi_command_buf(mipi, cmd, parameters, i);
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
I didn't see this on gcc 4.8, but it showed up when I used gcc 6.2.
kbuild test robot:
[drm:drm-next 1199/1208] drivers/gpu/drm/tinydrm/core/tinydrm-helpers.c:198:26: error: redefinition of 'tinydrm_of_find_backlight'
kbuild test robot:
drivers/gpu/drm/tinydrm/mipi-dbi.c: In function 'mipi_dbi_typec1_command':
DRM_DEBUG_DRIVER("cmd=%02x, par=%*ph\n", cmd, len, data); \drivers/gpu/drm/tinydrm/mipi-dbi.c:65:20: warning: field width specifier '*' expects argument of type 'int', but argument 5 has type 'size_t {aka long unsigned int}' [-Wformat=]
^
include/drm/drmP.h:228:40: note: in definition of macro 'DRM_DEBUG_DRIVER'
drm_printk(KERN_DEBUG, DRM_UT_DRIVER, fmt, ##__VA_ARGS__)
^~~
MIPI_DBI_DEBUG_COMMAND(cmd, parameters, num);drivers/gpu/drm/tinydrm/mipi-dbi.c:671:2: note: in expansion of macro 'MIPI_DBI_DEBUG_COMMAND'
^~~~~~~~~~~~~~~~~~~~~~
Noralf.
Noralf TrÃnnes (3):
drm/tinydrm: mipi-dbi: Silence: âcmdâ may be used uninitialized
drm/tinydrm: mipi-dbi: Fix field width specifier warning
drm/tinydrm: helpers: Properly fix backlight dependency
drivers/gpu/drm/tinydrm/mipi-dbi.c | 6 +++---
include/drm/tinydrm/tinydrm-helpers.h | 19 -------------------
2 files changed, 3 insertions(+), 22 deletions(-)
--
2.10.2