From 7ebb5fae2c3711d6298a06b78c368663298604e2 Mon Sep 17 00:00:00 2001 From: Max Krummenacher Date: Mon, 24 Jul 2017 14:00:02 +0200 Subject: dsi.c: fix compilation with gcc 7 With gcc 7 the following compile time error occurs: | drivers/video/tegra/dc/dsi.c:766:34: error: '*' in boolean context, suggest '&&' instead [-Werror=int-in-bool-context] | drivers/video/tegra/dc/dsi.c:757:1: | (platform_t_phy_ps) ? ( \ | ~~~~~~~~~~~~~~~~~~~ | kernel-source/drivers/video/tegra/dc/dsi.c:766:34: | dsi->info.phy_timing.t_tlpx_ns * 1000, | drivers/video/tegra/dc/dsi.c:757:2: note: in definition of macro 'SELECT_T_PHY' | (platform_t_phy_ps) ? ( \ | ^~~~~~~~~~~~~~~~~ Signed-off-by: Max Krummenacher Acked-by: Marcel Ziswiler --- drivers/video/tegra/dc/dsi.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/video/tegra/dc/dsi.c b/drivers/video/tegra/dc/dsi.c index 284e0532e0cb..8cb81fdd29be 100644 --- a/drivers/video/tegra/dc/dsi.c +++ b/drivers/video/tegra/dc/dsi.c @@ -754,7 +754,7 @@ static void tegra_dsi_init_sw(struct tegra_dc *dc, } #define SELECT_T_PHY(platform_t_phy_ps, default_phy, clk_ps, hw_inc) ( \ -(platform_t_phy_ps) ? ( \ +(platform_t_phy_ps) != 0 ? ( \ ((DSI_CONVERT_T_PHY_PS_TO_T_PHY(platform_t_phy_ps, clk_ps, hw_inc)) < 0 ? 0 : \ (DSI_CONVERT_T_PHY_PS_TO_T_PHY(platform_t_phy_ps, clk_ps, hw_inc)))) : \ ((default_phy) < 0 ? 0 : (default_phy))) -- cgit v1.2.3