linux/drivers/gpu/drm/tinydrm
Noralf Trønnes ce8c013700 drm/tinydrm: mipi-dbi: Fix field width specifier warning
This warning is seen on 64-bit builds in functions:
   'mipi_dbi_typec1_command':
   'mipi_dbi_typec3_command_read':
   'mipi_dbi_typec3_command':

>> 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=]
      DRM_DEBUG_DRIVER("cmd=%02x, par=%*ph\n", cmd, len, data); \
                       ^
   include/drm/drmP.h:228:40: note: in definition of macro 'DRM_DEBUG_DRIVER'
     drm_printk(KERN_DEBUG, DRM_UT_DRIVER, fmt, ##__VA_ARGS__)
                                           ^~~
>> drivers/gpu/drm/tinydrm/mipi-dbi.c:671:2: note: in expansion of macro 'MIPI_DBI_DEBUG_COMMAND'
     MIPI_DBI_DEBUG_COMMAND(cmd, parameters, num);
     ^~~~~~~~~~~~~~~~~~~~~~

Fix by casting 'len' to int in the macro MIPI_DBI_DEBUG_COMMAND().
There is no chance of overflow.

Signed-off-by: Noralf Trønnes <noralf@tronnes.org>
Signed-off-by: Dave Airlie <airlied@redhat.com>
2017-02-24 12:08:59 +10:00
..
core
Kconfig drm/tinydrm: Add support for Multi-Inno MI0283QT display 2017-02-18 18:05:02 +01:00
Makefile drm/tinydrm: Add support for Multi-Inno MI0283QT display 2017-02-18 18:05:02 +01:00
mi0283qt.c drm/tinydrm: Add support for Multi-Inno MI0283QT display 2017-02-18 18:05:02 +01:00
mipi-dbi.c drm/tinydrm: mipi-dbi: Fix field width specifier warning 2017-02-24 12:08:59 +10:00