Re: [PATCHv10 4/6] drm/meson: Fix overflow implicit truncation warnings

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Thu, Feb 24, 2022 at 7:07 AM Sai Prakash Ranjan
<quic_saipraka@xxxxxxxxxxx> wrote:
>
> 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) |
>                   ^~~~~~~~~~~~~~~~~~~~~
>
> Cc: Arnd Bergmann <arnd@xxxxxxxx>
> Cc: Neil Armstrong <narmstrong@xxxxxxxxxxxx>
> Reported-by: kernel test robot <lkp@xxxxxxxxx>
> Signed-off-by: Sai Prakash Ranjan <quic_saipraka@xxxxxxxxxxx>

Reviewed-by: Arnd Bergmann <arnd@xxxxxxxx>

It took me a bit to understand why we got the warning in the first place, but I
should have just read the patch description, it's all there....



[Index of Archives]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [Linux for Sparc]     [IETF Annouce]     [Security]     [Bugtraq]     [Linux MIPS]     [ECOS]     [Asterisk Internet PBX]     [Linux API]

  Powered by Linux