* [PATCH] staging: greybus: audio_codec.c: Remove unnecessary parentheses in if statement
@ 2026-02-02 13:32 Eitan Collett
2026-02-04 9:53 ` Greg Kroah-Hartman
0 siblings, 1 reply; 2+ messages in thread
From: Eitan Collett @ 2026-02-02 13:32 UTC (permalink / raw)
To: Vaibhav Agarwal, Mark Greer
Cc: Johan Hovold, Alex Elder, Greg Kroah-Hartman, greybus-dev,
linux-staging, linux-kernel
Adhere to Linux kernel coding style.
Reported by checkpatch:
CHECK: Unnecessary parentheses around 'w->id != snd_soc_dapm_aif_in'
CHECK: Unnecessary parentheses around 'w->id != snd_soc_dapm_aif_out'
Signed-off-by: Eitan Collett <eitan.collett@gmail.com>
---
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 444c53b4e08d..44aee8268d14 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;
}
--
2.52.0
^ permalink raw reply related [flat|nested] 2+ messages in thread* Re: [PATCH] staging: greybus: audio_codec.c: Remove unnecessary parentheses in if statement
2026-02-02 13:32 [PATCH] staging: greybus: audio_codec.c: Remove unnecessary parentheses in if statement Eitan Collett
@ 2026-02-04 9:53 ` Greg Kroah-Hartman
0 siblings, 0 replies; 2+ messages in thread
From: Greg Kroah-Hartman @ 2026-02-04 9:53 UTC (permalink / raw)
To: Eitan Collett
Cc: Vaibhav Agarwal, Mark Greer, Johan Hovold, Alex Elder,
greybus-dev, linux-staging, linux-kernel
On Mon, Feb 02, 2026 at 03:32:42PM +0200, Eitan Collett wrote:
> Adhere to Linux kernel coding style.
>
> Reported by checkpatch:
>
> CHECK: Unnecessary parentheses around 'w->id != snd_soc_dapm_aif_in'
> CHECK: Unnecessary parentheses around 'w->id != snd_soc_dapm_aif_out'
>
> Signed-off-by: Eitan Collett <eitan.collett@gmail.com>
> ---
> 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 444c53b4e08d..44aee8268d14 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) {
I hate this checkpatch "warning" sorry. Now you need to go and try to
remember if && is higher priority than !=, right?
Please just leave this as-is.
thanks,
greg k-h
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2026-02-04 9:53 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-02-02 13:32 [PATCH] staging: greybus: audio_codec.c: Remove unnecessary parentheses in if statement Eitan Collett
2026-02-04 9:53 ` Greg Kroah-Hartman
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox