From 97e8e73777ab21f2ea9a917a76d2186748e9f9cb Mon Sep 17 00:00:00 2001 From: Liao Yuanhong Date: Thu, 4 Sep 2025 19:30:34 +0800 Subject: [PATCH] media: siano: Remove redundant ternary operators For ternary operators in the form of "a ? false : true", 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 Signed-off-by: Sean Young Signed-off-by: Hans Verkuil --- drivers/media/common/siano/smsir.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/media/common/siano/smsir.c b/drivers/media/common/siano/smsir.c index d85c78c104b99..af07fed21ae12 100644 --- a/drivers/media/common/siano/smsir.c +++ b/drivers/media/common/siano/smsir.c @@ -28,7 +28,7 @@ void sms_ir_event(struct smscore_device_t *coredev, const char *buf, int len) for (i = 0; i < len >> 2; i++) { struct ir_raw_event ev = { .duration = abs(samples[i]), - .pulse = (samples[i] > 0) ? false : true + .pulse = samples[i] <= 0 }; ir_raw_event_store(coredev->ir.dev, &ev); -- 2.47.3