[<prev] [next>] [day] [month] [year] [list]
Message-Id: <20220115012303.29651-5-prabhakar.mahadev-lad.rj@bp.renesas.com>
Date: Sat, 15 Jan 2022 01:23:02 +0000
From: Lad Prabhakar <prabhakar.mahadev-lad.rj@...renesas.com>
To: Liam Girdwood <lgirdwood@...il.com>,
Mark Brown <broonie@...nel.org>,
Jaroslav Kysela <perex@...ex.cz>, Takashi Iwai <tiwai@...e.com>
Cc: Biju Das <biju.das.jz@...renesas.com>,
Pavel Machek <pavel@...x.de>,
Cezary Rojewski <cezary.rojewski@...el.com>,
linux-renesas-soc@...r.kernel.org,
Prabhakar <prabhakar.csengg@...il.com>,
Lad Prabhakar <prabhakar.mahadev-lad.rj@...renesas.com>,
alsa-devel@...a-project.org, linux-kernel@...r.kernel.org
Subject: [PATCH v2 4/5] ASoC: sh: rz-ssi: Change return type of rz_ssi_stream_is_valid() to bool
rz_ssi_stream_is_valid() never returns an int, it returns the result of
a condition which is either true or false.
While at it, drop "!!" as the expression is boolean.
Reported-by: Pavel Machek <pavel@...x.de>
Signed-off-by: Lad Prabhakar <prabhakar.mahadev-lad.rj@...renesas.com>
Reviewed-by: Biju Das <biju.das.jz@...renesas.com>
---
v1->v2
* No change
---
sound/soc/sh/rz-ssi.c | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/sound/soc/sh/rz-ssi.c b/sound/soc/sh/rz-ssi.c
index 50699e94772b..2da43eecfb3e 100644
--- a/sound/soc/sh/rz-ssi.c
+++ b/sound/soc/sh/rz-ssi.c
@@ -188,14 +188,14 @@ static inline bool rz_ssi_is_dma_enabled(struct rz_ssi_priv *ssi)
return (ssi->playback.dma_ch && (ssi->dma_rt || ssi->capture.dma_ch));
}
-static int rz_ssi_stream_is_valid(struct rz_ssi_priv *ssi,
- struct rz_ssi_stream *strm)
+static bool rz_ssi_stream_is_valid(struct rz_ssi_priv *ssi,
+ struct rz_ssi_stream *strm)
{
unsigned long flags;
- int ret;
+ bool ret;
spin_lock_irqsave(&ssi->lock, flags);
- ret = !!(strm->substream && strm->substream->runtime);
+ ret = strm->substream && strm->substream->runtime;
spin_unlock_irqrestore(&ssi->lock, flags);
return ret;
--
2.17.1
Powered by blists - more mailing lists