From patchwork Fri Apr 1 12:01:57 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Amadeusz_S=C5=82awi=C5=84ski?= X-Patchwork-Id: 12798225 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 alsa0.perex.cz (alsa0.perex.cz [77.48.224.243]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 934B1C433F5 for ; Fri, 1 Apr 2022 12:04:42 +0000 (UTC) Received: from alsa1.perex.cz (alsa1.perex.cz [207.180.221.201]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by alsa0.perex.cz (Postfix) with ESMTPS id D459A1AE7; Fri, 1 Apr 2022 14:03:50 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz D459A1AE7 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1648814680; bh=N6NfxZHXxXFFv18aQesiaGnM/IbG+3X5X0YYB9JhCOU=; h=From:To:Subject:Date:In-Reply-To:References:Cc:List-Id: List-Unsubscribe:List-Archive:List-Post:List-Help:List-Subscribe: From; b=ZD63avhHXABG2VPxcBKxYAGXAo/D62+ia63NZpuegu6r/G50Q34Jm17bMw+Lh599Z sOxeGa311NhrL8D4u27G7MpnL+nFNQ+hquPf+Xct4tlSm+ZFFA1rxa4NMWVw1y06ru bOWNnFIgt+GCUuE59mcbBZyci8ymFqQ0kY4Z3tcY= Received: from alsa1.perex.cz (localhost.localdomain [127.0.0.1]) by alsa1.perex.cz (Postfix) with ESMTP id DF0D7F8052F; Fri, 1 Apr 2022 14:02:33 +0200 (CEST) Received: by alsa1.perex.cz (Postfix, from userid 50401) id 49601F8047D; Fri, 1 Apr 2022 14:02:30 +0200 (CEST) Received: from mga04.intel.com (mga04.intel.com [192.55.52.120]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by alsa1.perex.cz (Postfix) with ESMTPS id 94E63F80518 for ; Fri, 1 Apr 2022 14:02:21 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz 94E63F80518 Authentication-Results: alsa1.perex.cz; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.b="kS5bx2Z9" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1648814543; x=1680350543; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=N6NfxZHXxXFFv18aQesiaGnM/IbG+3X5X0YYB9JhCOU=; b=kS5bx2Z9d0TMd/daz/of8cT0hwUIrcoHcNWUzh71r8pu6slKPCmdypZu pkjakpMUOMkNvADgh1NATOv9HDgpdWkgthAXoDel2OyBuhIlKrFJTnMCQ 4yeqXI1j71TdDpbnYpCn7hLJ6sSI0IazBBa3VaHh2dNYd38HzK4x5cFja SPCABnmwOSIJhTzjR0D33CxjxbU/gpqcL1hptz+5WogynG+wSIZ07lv0N U/XrE3SR2Ev5BITEwOUUNOOFNN93Nq3zPsUmcvs6GVZ17LdtBGHsIjVu/ ZTzFVMI361ey7/PEATiV++JNT/cMaqsSB7+aLbgx5JQ/gOiKxECVDU/gV A==; X-IronPort-AV: E=McAfee;i="6200,9189,10303"; a="258945863" X-IronPort-AV: E=Sophos;i="5.90,227,1643702400"; d="scan'208";a="258945863" Received: from orsmga008.jf.intel.com ([10.7.209.65]) by fmsmga104.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 01 Apr 2022 05:02:14 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.90,227,1643702400"; d="scan'208";a="567432020" Received: from dev2 (HELO DEV2.igk.intel.com) ([10.237.148.94]) by orsmga008.jf.intel.com with ESMTP; 01 Apr 2022 05:02:12 -0700 From: =?utf-8?q?Amadeusz_S=C5=82awi=C5=84ski?= To: Liam Girdwood , Mark Brown Subject: [PATCH 3/6] ASoC: topology: Return bool instead of int Date: Fri, 1 Apr 2022 14:01:57 +0200 Message-Id: <20220401120200.4047867-4-amadeuszx.slawinski@linux.intel.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20220401120200.4047867-1-amadeuszx.slawinski@linux.intel.com> References: <20220401120200.4047867-1-amadeuszx.slawinski@linux.intel.com> MIME-Version: 1.0 Cc: Pierre-Louis Bossart , Cezary Rojewski , alsa-devel@alsa-project.org, Takashi Iwai , =?utf-8?q?Amadeusz_S=C5=82awi=C5=84ski?= X-BeenThere: alsa-devel@alsa-project.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: "Alsa-devel mailing list for ALSA developers - http://www.alsa-project.org" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: alsa-devel-bounces@alsa-project.org Sender: "Alsa-devel" In practice soc_tplg_is_eof() returns boolean value and caller uses the return value in such way, so convert the function to really do it. Signed-off-by: Amadeusz Sławiński --- sound/soc/soc-topology.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/sound/soc/soc-topology.c b/sound/soc/soc-topology.c index f5446aac8ac6..f8e482d616fb 100644 --- a/sound/soc/soc-topology.c +++ b/sound/soc/soc-topology.c @@ -104,13 +104,13 @@ static int soc_tplg_check_elem_count(struct soc_tplg *tplg, size_t elem_size, return 0; } -static inline int soc_tplg_is_eof(struct soc_tplg *tplg) +static inline bool soc_tplg_is_eof(struct soc_tplg *tplg) { const u8 *end = tplg->hdr_pos; if (end >= tplg->fw->data + tplg->fw->size) - return 1; - return 0; + return true; + return false; } static inline unsigned long soc_tplg_get_hdr_offset(struct soc_tplg *tplg)