[coreboot-gerrit] New patch to review for coreboot: 13c37f4 tegra124: actually parse is_lvds

Patrick Georgi (pgeorgi@google.com) gerrit at coreboot.org
Mon Nov 17 09:29:53 CET 2014


Patrick Georgi (pgeorgi at google.com) just uploaded a new patch set to gerrit, which you can find at http://review.coreboot.org/7501

-gerrit

commit 13c37f423cb48bc03c808b027d9e86853946bc80
Author: Patrick Georgi <patrick at georgi-clan.de>
Date:   Mon Nov 17 09:27:08 2014 +0100

    tegra124: actually parse is_lvds
    
    Precedence rules make the compiler optimize
    const | var ? val1 : val2; into val1. In our case this
    means not writing 2 << NV_SOR_CSTM_ROTCLK_SHIFT to the
    register and not caring about the content of is_lvds.
    
    Change-Id: I0b02c74f9445f51bfab9eeae2e8eb9480d104708
    Found-by: Coverity Scan
    Signed-off-by: Patrick Georgi <pgeorgi at google.com>
---
 src/soc/nvidia/tegra124/sor.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/soc/nvidia/tegra124/sor.c b/src/soc/nvidia/tegra124/sor.c
index 3ff39ed..3a27648 100644
--- a/src/soc/nvidia/tegra124/sor.c
+++ b/src/soc/nvidia/tegra124/sor.c
@@ -556,8 +556,8 @@ static void tegra_dc_sor_config_panel(struct tegra_dc_sor_data *sor,
 		NV_SOR_CSTM_ROTCLK_DEFAULT_MASK |
 		NV_SOR_CSTM_LVDS_EN_ENABLE,
 		2 << NV_SOR_CSTM_ROTCLK_SHIFT |
-		is_lvds ? NV_SOR_CSTM_LVDS_EN_ENABLE :
-		NV_SOR_CSTM_LVDS_EN_DISABLE);
+		(is_lvds ? NV_SOR_CSTM_LVDS_EN_ENABLE :
+		NV_SOR_CSTM_LVDS_EN_DISABLE));
 }
 
 static void tegra_dc_sor_enable_dc(struct tegra_dc_sor_data *sor)



More information about the coreboot-gerrit mailing list