[Intel-gfx] [PATCH i-g-t 3/7] Fix comparison that always evaluates to false

Rodrigo Siqueira rodrigosiqueiramelo at gmail.com
Sat Jul 7 23:22:52 UTC 2018


This commit fix the GCC warning:

warning: bitwise comparison always evaluates to false
[-Wtautological-compare]
  } else if ((val & DPLLB_MODE_LVDS) == DPLLB_MODE_DAC_SERIAL) {

The first comparison already checks DPLLB_MODE_LVDS, in this sense, the
second 'if' condition always will be false. This commit changes the
comparison to DPLLB_MODE_DAC_SERIAL.

Signed-off-by: Rodrigo Siqueira <rodrigosiqueiramelo at gmail.com>
---
 tools/intel_reg_decode.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/tools/intel_reg_decode.c b/tools/intel_reg_decode.c
index f3c7d74a..5a632e09 100644
--- a/tools/intel_reg_decode.c
+++ b/tools/intel_reg_decode.c
@@ -1277,7 +1277,7 @@ DEBUGSTRING(ironlake_debug_pch_dpll)
 			p2 = "Div 7";
 		else
 			p2 = "Div 14";
-	} else if ((val & DPLLB_MODE_LVDS) == DPLLB_MODE_DAC_SERIAL) {
+	} else if ((val & DPLLB_MODE_DAC_SERIAL) == DPLLB_MODE_DAC_SERIAL) {
 		mode = "Non-LVDS";
 		if (val & DPLL_DAC_SERIAL_P2_CLOCK_DIV_5)
 			p2 = "Div 5";
-- 
2.18.0



More information about the Intel-gfx mailing list