From: "Jonathan Neuschäfer" <j.neuschaefer@gmx.net>
To: Ruan Jinjie <ruanjinjie@huawei.com>
Cc: mchehab@kernel.org, hverkuil-cisco@xs4all.nl,
j.neuschaefer@gmx.net, u.kleine-koenig@pengutronix.de,
linux-media@vger.kernel.org
Subject: Re: [PATCH -next 2/3] media: radio-wl1273: Remove an unnecessary ternary operator
Date: Mon, 14 Aug 2023 10:23:23 +0200 [thread overview]
Message-ID: <ZNnke/yUmg7xFa+v@probook> (raw)
In-Reply-To: <20230804031323.2105187-3-ruanjinjie@huawei.com>
[-- Attachment #1: Type: text/plain, Size: 876 bytes --]
On Fri, Aug 04, 2023 at 11:13:22AM +0800, Ruan Jinjie wrote:
> There is a ternary operator, the true or false judgement of which
> is unnecessary in C language semantics.
>
> Signed-off-by: Ruan Jinjie <ruanjinjie@huawei.com>
> ---
> drivers/media/radio/radio-wl1273.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/media/radio/radio-wl1273.c b/drivers/media/radio/radio-wl1273.c
> index e8166eac9efe..f6b98c304b72 100644
> --- a/drivers/media/radio/radio-wl1273.c
> +++ b/drivers/media/radio/radio-wl1273.c
> @@ -1020,7 +1020,7 @@ static int wl1273_fm_set_rds(struct wl1273_device *radio, unsigned int new_mode)
> }
>
> if (!r)
> - radio->rds_on = (new_mode == WL1273_RDS_ON) ? true : false;
> + radio->rds_on = new_mode == WL1273_RDS_ON;
Reviewed-by: Jonathan Neuschäfer <j.neuschaefer@gmx.net>
Thanks.
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]
next prev parent reply other threads:[~2023-08-14 8:37 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-08-04 3:13 [PATCH -next 0/3] media: Remove unnecessary ternary operators Ruan Jinjie
2023-08-04 3:13 ` [PATCH -next 1/3] media: dvb-frontends: drx39xyj: Remove an unnecessary ternary operator Ruan Jinjie
2023-08-04 6:05 ` Uwe Kleine-König
2023-08-04 6:18 ` Ruan Jinjie
2023-08-04 3:13 ` [PATCH -next 2/3] media: radio-wl1273: " Ruan Jinjie
2023-08-14 8:23 ` Jonathan Neuschäfer [this message]
2023-08-04 3:13 ` [PATCH -next 3/3] media: dvb-usb: gp8psk: " Ruan Jinjie
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=ZNnke/yUmg7xFa+v@probook \
--to=j.neuschaefer@gmx.net \
--cc=hverkuil-cisco@xs4all.nl \
--cc=linux-media@vger.kernel.org \
--cc=mchehab@kernel.org \
--cc=ruanjinjie@huawei.com \
--cc=u.kleine-koenig@pengutronix.de \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.