lkml.org 
[lkml]   [2021]   [Nov]   [24]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
Date
SubjectRe: [PATCH 18/20] media: mtk-mdp: address a clang warning
On Wed, Nov 24, 2021 at 8:13 PM Mauro Carvalho Chehab
<mchehab+huawei@kernel.org> wrote:
>
> The typecasts at the dvb-core generate clang warnings when W=1
> is enabled.
>
> Such warning is harmless, but it causes the build to break with
> CONFIG_WERROR and W=1 with clang, so do the cast on a way that
> it won't produce warnings anymore.
>
> Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>

Reviewed-by: Arnd Bergmann <arnd@arndb.de>

>
> - comp_type = (enum mtk_mdp_comp_type)of_id->data;
> + comp_type = (long)of_id->data;

I would generally use (uintptr_t) for this purpose, but the effect is the same.

Arnd

\
 
 \ /
  Last update: 2021-11-24 20:23    [W:0.137 / U:0.072 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site