From: Liao Yuanhong Date: Tue, 26 Aug 2025 14:52:43 +0000 (+0800) Subject: media: chips-media: wave5: Remove redundant ternary operators X-Git-Url: https://www.infradead.org/git/?a=commitdiff_plain;h=9df928c90c109c97bdb565f81d3674224f3d118a;p=users%2Fhch%2Fmisc.git media: chips-media: wave5: 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 Signed-off-by: Nicolas Dufresne Signed-off-by: Hans Verkuil --- diff --git a/drivers/media/platform/chips-media/wave5/wave5-vpu-enc.c b/drivers/media/platform/chips-media/wave5/wave5-vpu-enc.c index 279f23e1304a..506d6c6166a6 100644 --- a/drivers/media/platform/chips-media/wave5/wave5-vpu-enc.c +++ b/drivers/media/platform/chips-media/wave5/wave5-vpu-enc.c @@ -543,7 +543,7 @@ static int wave5_vpu_enc_s_fmt_out(struct file *file, void *fh, struct v4l2_form if (!info) return -EINVAL; - inst->cbcr_interleave = (info->comp_planes == 2) ? true : false; + inst->cbcr_interleave = info->comp_planes == 2; switch (inst->src_fmt.pixelformat) { case V4L2_PIX_FMT_NV21: