drm/mediatek: remove unnecessary conversion to bool
Subsystems (3)
PATCH v2 1/1 drm/mediatek: remove unnecessary conversion to bool
In function mtk_dsi_clk_hs_state, remove unnecessary conversion to bool return, this change is to make the code a bit readable.
---
Changes since V1:
*optimize to make the code a bit more clear.
Link for V1:
*https://lore.kernel.org/patchwork/patch/1255327/
--- drivers/gpu/drm/mediatek/mtk_dsi.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-)
drivers/gpu/drm/mediatek/mtk_dsi.c +1 -4
@@ -316,10 +316,7 @@ static void mtk_dsi_lane0_ulp_mode_leave(struct mtk_dsi *dsi)static bool mtk_dsi_clk_hs_state (struct mtk_dsi *dsi) { -u32 tmp_reg1; - - tmp_reg1 =readl (dsi->regs +DSI_PHY_LCCON ); -return ((tmp_reg1 &LC_HS_TX_EN ) ==1 ); +return (readl (dsi->regs +DSI_PHY_LCCON ) &LC_HS_TX_EN ); }static void mtk_dsi_clk_hs_mode (struct mtk_dsi *dsi,bool enter)
Signature · 1 line
2.17.1
Hi, Bernard:
Bernard Zhao <[email protected]> 於 2020年6月16日 週二 下午2:51寫道:
Quoted 3 lines
In function
mtk_dsi_clk_hs_state, remove unnecessary conversion to bool return, this change is to make the code a bit readable.
Applied to mediatek-drm-fixes [1], thanks.
[1] https://git.kernel.org/pub/scm/linux/kernel/git/chunkuang.hu/linux.git/log/?h=mediatek-drm-fixes
Regards,
Chun-Kuang.
Quoted 29 lines
Signed-off-by Bernard Zhao <[email protected]>---
Changes since V1:
*optimize to make the code a bit more clear.Link for V1:
*https://lore.kernel.org/patchwork/patch/1255327/--- drivers/gpu/drm/mediatek/mtk_dsi.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-)drivers/gpu/drm/mediatek/mtk_dsi.c +1
-5@@ -316,10 +316,7 @@ static void mtk_dsi_lane0_ulp_mode_leave(struct mtk_dsi *dsi)static bool mtk_dsi_clk_hs_state (struct mtk_dsi *dsi) { -u32 tmp_reg1; - - tmp_reg1 =readl (dsi->regs +DSI_PHY_LCCON ); -return ((tmp_reg1 &LC_HS_TX_EN ) ==1 ); +return (readl (dsi->regs +DSI_PHY_LCCON ) &LC_HS_TX_EN ); }static void mtk_dsi_clk_hs_mode (struct mtk_dsi *dsi,bool enter) --
Quoted 2 lines
2.17.1
_______________________________________________
dri-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel