• Sai Prakash Ranjan's avatar
    drm/meson: Fix overflow implicit truncation warnings · 98692f52
    Sai Prakash Ranjan authored
    Fix -Woverflow warnings for drm/meson driver which is a result
    of moving arm64 custom MMIO accessor macros to asm-generic function
    implementations giving a bonus type-checking now and uncovering these
    overflow warnings.
    
    drivers/gpu/drm/meson/meson_viu.c: In function ‘meson_viu_init’:
    drivers/gpu/drm/meson/meson_registers.h:1826:48: error: large integer implicitly truncated to unsigned type [-Werror=overflow]
     #define  VIU_OSD_BLEND_REORDER(dest, src)      ((src) << (dest * 4))
                                                    ^
    drivers/gpu/drm/meson/meson_viu.c:472:18: note: in expansion of macro ‘VIU_OSD_BLEND_REORDER’
       writel_relaxed(VIU_OSD_BLEND_REORDER(0, 1) |
                      ^~~~~~~~~~~~~~~~~~~~~
    Reported-by: default avatarkernel test robot <lkp@intel.com>
    Signed-off-by: default avatarSai Prakash Ranjan <quic_saipraka@quicinc.com>
    Reviewed-by: default avatarArnd Bergmann <arnd@arndb.de>
    Cc: Arnd Bergmann <arnd@arndb.de>
    Cc: Neil Armstrong <narmstrong@baylibre.com>
    Signed-off-by: default avatarArnd Bergmann <arnd@arndb.de>
    98692f52
meson_viu.c 15.9 KB