public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
* [U-Boot] [RFC 1/1] dm: video: tegra124: incorrect logical condition
@ 2018-01-31  0:16 Heinrich Schuchardt
  2018-03-06 10:08 ` Anatolij Gustschin
  0 siblings, 1 reply; 3+ messages in thread
From: Heinrich Schuchardt @ 2018-01-31  0:16 UTC (permalink / raw)
  To: u-boot

2 << 24 | A is always true. To use check against a bitmask we need &.

Identified with cppcheck.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
---
I do not have the hardware available. But the current coding is fishy.

Please, clarify what should be coded here.
---
 drivers/video/tegra124/sor.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/video/tegra124/sor.c b/drivers/video/tegra124/sor.c
index 700ab25d46..4b3381fae2 100644
--- a/drivers/video/tegra124/sor.c
+++ b/drivers/video/tegra124/sor.c
@@ -669,7 +669,7 @@ static void tegra_dc_sor_config_panel(struct tegra_dc_sor_data *sor,
 	tegra_sor_write_field(sor, CSTM,
 			      CSTM_ROTCLK_DEFAULT_MASK |
 			      CSTM_LVDS_EN_ENABLE,
-			      2 << CSTM_ROTCLK_SHIFT |
+			      2 << CSTM_ROTCLK_SHIFT &
 			      is_lvds ? CSTM_LVDS_EN_ENABLE :
 			      CSTM_LVDS_EN_DISABLE);
 
-- 
2.15.1

^ permalink raw reply related	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2018-03-07  0:31 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-01-31  0:16 [U-Boot] [RFC 1/1] dm: video: tegra124: incorrect logical condition Heinrich Schuchardt
2018-03-06 10:08 ` Anatolij Gustschin
2018-03-07  0:31   ` Heinrich Schuchardt

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox