From: Liao Yuanhong Date: Thu, 4 Sep 2025 11:30:34 +0000 (+0800) Subject: media: siano: Remove redundant ternary operators X-Git-Tag: v6.19-rc1~159^2~61 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=97e8e73777ab21f2ea9a917a76d2186748e9f9cb;p=thirdparty%2Fkernel%2Flinux.git 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 --- 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);