[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <ed70a5d5-8e85-495b-9e56-eae472ba3046@ieee.org>
Date: Wed, 8 Jan 2025 20:56:50 -0600
From: Alex Elder <elder@...e.org>
To: Will Walsh <iron.will.walsh@...il.com>,
Vaibhav Agarwal <vaibhav.sr@...il.com>, Mark Greer <mgreer@...malcreek.com>,
Johan Hovold <johan@...nel.org>, Alex Elder <elder@...nel.org>,
Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
greybus-dev@...ts.linaro.org, linux-staging@...ts.linux.dev,
linux-kernel@...r.kernel.org, outreachy@...ts.linux.dev
Subject: Re: [PATCH] staging: greybus: remove unnecessary parentheses
On 1/8/25 6:36 PM, Will Walsh wrote:
> Unnecessary parentheses in boolean comparisons make it harder to read.
>
> Removed the extra parentheses on line 305 for code readability.
>
> Signed-off-by: Will Walsh <iron.will.walsh@...il.com>
I'm not sure this makes a big difference in readability but I
personally avoid extra parentheses unless adding them makes a
compiler warning go away.
Reviewed-by: Alex Elder <elder@...nel.org>
> ---
> drivers/staging/greybus/audio_codec.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/staging/greybus/audio_codec.c b/drivers/staging/greybus/audio_codec.c
> index 2f05e761fb9a..dfb5322964de 100644
> --- a/drivers/staging/greybus/audio_codec.c
> +++ b/drivers/staging/greybus/audio_codec.c
> @@ -305,7 +305,7 @@ int gbaudio_module_update(struct gbaudio_codec_info *codec,
> dev_dbg(module->dev, "%s:Module update %s sequence\n", w->name,
> enable ? "Enable" : "Disable");
>
> - if ((w->id != snd_soc_dapm_aif_in) && (w->id != snd_soc_dapm_aif_out)) {
> + if (w->id != snd_soc_dapm_aif_in && w->id != snd_soc_dapm_aif_out) {
> dev_dbg(codec->dev, "No action required for %s\n", w->name);
> return 0;
> }
Powered by blists - more mailing lists