mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Dmitry Osipenko <dmitry.osipenko@collabora.com>
To: Liao Yuanhong <liaoyuanhong@vivo.com>,
	Shreeya Patel <shreeya.patel@collabora.com>,
	Mauro Carvalho Chehab <mchehab@kernel.org>,
	"open list:SYNOPSYS DESIGNWARE HDMI RX CONTROLLER DRIVER"
	<linux-media@vger.kernel.org>,
	"open list:SYNOPSYS DESIGNWARE HDMI RX CONTROLLER DRIVER"
	<kernel@collabora.com>, open list <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH] media: synopsys: hdmirx: media: Remove redundant ternary operators
Date: Wed, 27 Aug 2025 19:44:35 +0300	[thread overview]
Message-ID: <6e4804dd-cb6d-4e3e-b964-633ae710c7df@collabora.com> (raw)
In-Reply-To: <20250826145057.534259-1-liaoyuanhong@vivo.com>

On 8/26/25 17:50, Liao Yuanhong wrote:
> 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@vivo.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;

Acked-by: Dmitry Osipenko <dmitry.osipenko@collabora.com>

-- 
Best regards,
Dmitry

      reply	other threads:[~2025-08-27 16:45 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-08-26 14:50 Liao Yuanhong
2025-08-27 16:44 ` Dmitry Osipenko [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=6e4804dd-cb6d-4e3e-b964-633ae710c7df@collabora.com \
    --to=dmitry.osipenko@collabora.com \
    --cc=kernel@collabora.com \
    --cc=liaoyuanhong@vivo.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-media@vger.kernel.org \
    --cc=mchehab@kernel.org \
    --cc=shreeya.patel@collabora.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®