1. 24 Feb, 2017 2 commits
    • Noralf Trønnes's avatar
      drm/tinydrm: mipi-dbi: Fix field width specifier warning · ce8c0137
      Noralf Trønnes authored
      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: default avatarNoralf Trønnes <noralf@tronnes.org>
      Signed-off-by: default avatarDave Airlie <airlied@redhat.com>
      ce8c0137
    • Noralf Trønnes's avatar
      drm/tinydrm: mipi-dbi: Silence: ‘cmd’ may be used uninitialized · b401f343
      Noralf Trønnes authored
      Fix this warning:
      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);
              ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
      
      cmd can't be used uninitialized, but to satisfy the compiler,
      initialize it to zero.
      Signed-off-by: default avatarNoralf Trønnes <noralf@tronnes.org>
      Signed-off-by: default avatarDave Airlie <airlied@redhat.com>
      b401f343
  2. 23 Feb, 2017 7 commits
  3. 22 Feb, 2017 1 commit
  4. 21 Feb, 2017 2 commits
  5. 18 Feb, 2017 7 commits
  6. 17 Feb, 2017 21 commits