[PATCH v2 07/21] media: i2c: it6625: drop redundant parentheses in status helpers
From: Hermes Wu via B4 Relay
Date: Wed Sep 30 2026 - 02:50:48 EST
From: Hermes Wu <Hermes.wu@xxxxxxxxxx>
is_hdmi(), hdmi_5v_power_present(), no_signal(), and audio_present()
wrap their ternary condition and true-branch bitwise-AND in
parentheses that C's operator precedence already makes unnecessary:
'<' binds tighter than '&', and '&' binds tighter than '?:'. Drop them;
behavior is unchanged.
Signed-off-by: Hermes Wu <Hermes.wu@xxxxxxxxxx>
---
drivers/media/i2c/it6625.c | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/drivers/media/i2c/it6625.c b/drivers/media/i2c/it6625.c
index 9382a64706919d380e8318c3139b42a4a7b2fd55..b48252a71bc1ed788de2df79c5fdaf7895f6e0c4 100644
--- a/drivers/media/i2c/it6625.c
+++ b/drivers/media/i2c/it6625.c
@@ -554,7 +554,7 @@ static inline bool is_hdmi(struct it6625 *it6625)
int val;
val = it6625_read_byte(it6625, REG_RX_STATUS);
- return (val < 0) ? false : (val & B_RX_HDMI);
+ return val < 0 ? false : val & B_RX_HDMI;
}
static inline bool hdmi_5v_power_present(struct it6625 *it6625)
@@ -562,7 +562,7 @@ static inline bool hdmi_5v_power_present(struct it6625 *it6625)
int val;
val = it6625_read_byte(it6625, REG_RX_STATUS);
- return (val < 0) ? false : (val & B_RX_5V);
+ return val < 0 ? false : val & B_RX_5V;
}
static inline bool no_signal(struct it6625 *it6625)
@@ -570,7 +570,7 @@ static inline bool no_signal(struct it6625 *it6625)
int val;
val = it6625_read_byte(it6625, REG_RX_STATUS);
- return (val < 0) ? true : !(val & B_RX_STABLE);
+ return val < 0 ? true : !(val & B_RX_STABLE);
}
static inline bool audio_present(struct it6625 *it6625)
@@ -578,7 +578,7 @@ static inline bool audio_present(struct it6625 *it6625)
int val;
val = it6625_read_byte(it6625, REG_RX_STATUS);
- return (val < 0) ? false : (val & B_RX_AUD_ON);
+ return val < 0 ? false : val & B_RX_AUD_ON;
}
static int get_audio_sampling_rate(struct it6625 *it6625)
--
2.34.1