Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 873FDC433F5 for ; Mon, 10 Jan 2022 09:48:41 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S243499AbiAJJsj (ORCPT ); Mon, 10 Jan 2022 04:48:39 -0500 Received: from relmlor1.renesas.com ([210.160.252.171]:30206 "EHLO relmlie5.idc.renesas.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S243273AbiAJJsB (ORCPT ); Mon, 10 Jan 2022 04:48:01 -0500 X-IronPort-AV: E=Sophos;i="5.88,276,1635174000"; d="scan'208";a="106003032" Received: from unknown (HELO relmlir6.idc.renesas.com) ([10.200.68.152]) by relmlie5.idc.renesas.com with ESMTP; 10 Jan 2022 18:48:00 +0900 Received: from localhost.localdomain (unknown [10.226.36.204]) by relmlir6.idc.renesas.com (Postfix) with ESMTP id 160774238CA4; Mon, 10 Jan 2022 18:47:57 +0900 (JST) From: Lad Prabhakar To: Liam Girdwood , Mark Brown , Jaroslav Kysela , Takashi Iwai Cc: Biju Das , Pavel Machek , linux-renesas-soc@vger.kernel.org, Prabhakar , Lad Prabhakar , alsa-devel@alsa-project.org, linux-kernel@vger.kernel.org Subject: [PATCH 4/5] ASoC: sh: rz-ssi: Make return type of rz_ssi_stream_is_valid() to bool Date: Mon, 10 Jan 2022 09:47:10 +0000 Message-Id: <20220110094711.8574-5-prabhakar.mahadev-lad.rj@bp.renesas.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20220110094711.8574-1-prabhakar.mahadev-lad.rj@bp.renesas.com> References: <20220110094711.8574-1-prabhakar.mahadev-lad.rj@bp.renesas.com> Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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 Signed-off-by: Lad Prabhakar Reviewed-by: Biju Das --- 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 fa68d3a0bd62..aabd15e9d515 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