On Wed Sep 30 14:41:25 2026 +0800, Hermes Wu wrote:
> 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 <[email protected]>
> Signed-off-by: Hans Verkuil <[email protected]>

Patch committed.

Thanks,
Hans Verkuil

 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 54c23bd44f25..5b774eaf5b4e 100644
--- a/drivers/media/i2c/it6625.c
+++ b/drivers/media/i2c/it6625.c
@@ -557,7 +557,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)
@@ -565,7 +565,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)
@@ -573,7 +573,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)
@@ -581,7 +581,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)
_______________________________________________
linuxtv-commits mailing list -- [email protected]
To unsubscribe send an email to [email protected]

Reply via email to