[i-g-t,3/7] Fix comparison that always evaluates to false
diff mbox

Message ID 40642b983962135de1e7a13a25c63e6803c22410.1531005542.git.rodrigosiqueiramelo@gmail.com
State New
Headers show

Commit Message

Rodrigo Siqueira July 7, 2018, 11:22 p.m. UTC
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@gmail.com>
---
 tools/intel_reg_decode.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Patch
diff mbox

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";