lkml.org 
[lkml]   [2022]   [Jan]   [14]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
Subject[PATCH v2 4/5] ASoC: sh: rz-ssi: Change return type of rz_ssi_stream_is_valid() to bool
Date
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@denx.de>
Signed-off-by: Lad Prabhakar <prabhakar.mahadev-lad.rj@bp.renesas.com>
Reviewed-by: Biju Das <biju.das.jz@bp.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
\
 
 \ /
  Last update: 2022-01-15 02:24    [W:0.030 / U:0.208 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site