Re: [PATCH] drm/mediatek: Fix unused-but-set variable warning

2021-12-30 Thread miles.chen
Hi, On 28/12/2021 10:25, Miles Chen wrote: > Fix unused-but-set variable warning: >> drivers/gpu/drm/mediatek/mtk_cec.c:85:6: warning: variable 'tmp' set but not >> used [-Wunused-but-set-variable] >> > >Actually we ignore the value passed to mtk_cec_mask. In case of >mtk_cec_mask(cec, CEC_CKGEN

Re: [PATCH] drm/mediatek: Fix unused-but-set variable warning

2021-12-30 Thread miles.chen
>You are right, in both cases the bit is set, but the funciton does not do what >it is supposed to do. >Will just clear all bits of the mask. > >Without your patch, we will just write the val to the register and don't care >what the register value was before that. > >We should somehow mention tha

[PATCH] drm/mediatek: Fix unused-but-set variable warning

2021-12-30 Thread Miles Chen
Fix unused-but-set variable warning: drivers/gpu/drm/mediatek/mtk_cec.c:85:6: warning: variable 'tmp' set but not used [-Wunused-but-set-variable] Signed-off-by: Miles Chen --- drivers/gpu/drm/mediatek/mtk_cec.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/gpu/drm

Re: [PATCH] drm/mediatek: Fix unused-but-set variable warning

2021-12-29 Thread Matthias Brugger
On 29/12/2021 04:04, miles.c...@mediatek.com wrote: Hi, On 28/12/2021 10:25, Miles Chen wrote: Fix unused-but-set variable warning: drivers/gpu/drm/mediatek/mtk_cec.c:85:6: warning: variable 'tmp' set but not used [-Wunused-but-set-variable] Actually we ignore the value passed to mtk_ce

Re: [PATCH] drm/mediatek: Fix unused-but-set variable warning

2021-12-28 Thread Matthias Brugger
On 28/12/2021 10:25, Miles Chen wrote: Fix unused-but-set variable warning: drivers/gpu/drm/mediatek/mtk_cec.c:85:6: warning: variable 'tmp' set but not used [-Wunused-but-set-variable] Actually we ignore the value passed to mtk_cec_mask. In case of mtk_cec_mask(cec, CEC_CKGEN, 0 | CEC_32K