[<prev] [next>] [day] [month] [year] [list]
Message-Id: <20250826145057.534259-1-liaoyuanhong@vivo.com>
Date: Tue, 26 Aug 2025 22:50:56 +0800
From: Liao Yuanhong <liaoyuanhong@...o.com>
To: Shreeya Patel <shreeya.patel@...labora.com>,
Mauro Carvalho Chehab <mchehab@...nel.org>,
linux-media@...r.kernel.org (open list:SYNOPSYS DESIGNWARE HDMI RX CONTROLLER DRIVER),
kernel@...labora.com (open list:SYNOPSYS DESIGNWARE HDMI RX CONTROLLER DRIVER),
linux-kernel@...r.kernel.org (open list)
Cc: Liao Yuanhong <liaoyuanhong@...o.com>
Subject: [PATCH] media: synopsys: hdmirx: media: Remove redundant ternary operators
For ternary operators in the form of a ? true : false, if a itself returns
a boolean result, the ternary operator can be omitted. Remove redundant
ternary operators to clean up the code.
Signed-off-by: Liao Yuanhong <liaoyuanhong@...o.com>
---
drivers/media/platform/synopsys/hdmirx/snps_hdmirx.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/media/platform/synopsys/hdmirx/snps_hdmirx.c b/drivers/media/platform/synopsys/hdmirx/snps_hdmirx.c
index b7d278b3889f..c3007e09bc9f 100644
--- a/drivers/media/platform/synopsys/hdmirx/snps_hdmirx.c
+++ b/drivers/media/platform/synopsys/hdmirx/snps_hdmirx.c
@@ -237,7 +237,7 @@ static bool tx_5v_power_present(struct snps_hdmirx_dev *hdmirx_dev)
break;
}
- ret = (cnt >= detection_threshold) ? true : false;
+ ret = cnt >= detection_threshold;
v4l2_dbg(3, debug, &hdmirx_dev->v4l2_dev, "%s: %d\n", __func__, ret);
return ret;
--
2.34.1
Powered by blists - more mailing lists