From patchwork Mon Nov 28 22:11:54 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Matthias Kaehlcke X-Patchwork-Id: 13057969 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 42F43C433FE for ; Mon, 28 Nov 2022 22:13:26 +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 3563E1657; Mon, 28 Nov 2022 23:12:34 +0100 (CET) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz 3563E1657 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1669673604; bh=2AQvgU8kXDFUJdr3B6ILvQwJW8mT099+cRO8KpuAd0o=; h=From:To:Subject:Date:Cc:List-Id:List-Unsubscribe:List-Archive: List-Post:List-Help:List-Subscribe:From; b=NV0QAibqXtQqxs+/JIEKlw5Mq9tS8wMHC5daqdwrWdM6cVUBpLn4FH+SG0G4cpq/H ewhF/kmtccnaTXmquYGr9WOTRs9WmBRFbAO5djj/ZEWdeNgQr2Fd6CHJMoGEPwd9Wx PgXH1Ont9zLOjWH+NFY4V/24G7Hol7VFmW/Duls4= Received: from alsa1.perex.cz (localhost.localdomain [127.0.0.1]) by alsa1.perex.cz (Postfix) with ESMTP id 8A148F8024C; Mon, 28 Nov 2022 23:12:10 +0100 (CET) Received: by alsa1.perex.cz (Postfix, from userid 50401) id 39305F8016E; Mon, 28 Nov 2022 23:12:08 +0100 (CET) Received: from mail-il1-x133.google.com (mail-il1-x133.google.com [IPv6:2607:f8b0:4864:20::133]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by alsa1.perex.cz (Postfix) with ESMTPS id 18C6DF8016E for ; Mon, 28 Nov 2022 23:11:59 +0100 (CET) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz 18C6DF8016E Authentication-Results: alsa1.perex.cz; dkim=pass (1024-bit key) header.d=chromium.org header.i=@chromium.org header.b="Aq1EGgv7" Received: by mail-il1-x133.google.com with SMTP id x12so2825643ilg.1 for ; Mon, 28 Nov 2022 14:11:59 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:from:to:cc:subject:date:message-id:reply-to; bh=+K0jgOSLksPF0t4oO6z2n4LjWuWuN8YIQgfQeuzMRF0=; b=Aq1EGgv7Yfv518jIs78L4d+GGgWaxs8TyWPdQf0qndrhr8yITjDwgaLKNfQFqQXrZx nnPeeSK6X5QcqXNK373SSmHPhq1+zsmZHL9YGSNNtsNpYs5i0Xdpw3alKtVy+Px1De0P ZFCNwvc5caUtGJSl+ljr6Hew1e4WTUMRKAaFg= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=+K0jgOSLksPF0t4oO6z2n4LjWuWuN8YIQgfQeuzMRF0=; b=aLckwrnu/tWzY9y3Eo25SDCQ4FS+pll0SuAmpk70t3/SNXYtgVh4awXXkWg5biFtUl PIAF/oroS+qprfp/3FL5A3MlGhX6STR3uj3UET730/fvkDxJLl9PYOnrRtYPc8d1B2bc w8n2Q9Em5Fg7JsjS2bTytal7F7zI/INjBVg98hRW25MmonQbRhUr+Dvnzb72E3ELvsPk dViLCbywAFf2wV52CWb+UTRiHCh5FCRZMk9VIdb2RCT7svm0vREuIO2oUaQSb3Ns2Cns 7+M4IQJki8R1uibek7G+47cnCE+drxuXeBsSKmTlwTd6tQZyaNwUX4Lsge2ZoX2/7GHa vV1g== X-Gm-Message-State: ANoB5plewpVlIDC/tZgQ12nCDBdMmlJRL4mAt1z2a11/mj9pTes0Dl6f SWOYAQh8jiiRg6CBpYRuBs3SqQ== X-Google-Smtp-Source: AA0mqf6Fo8Uf5/CsFnfNGuV1ojrI2ZNykhxAz1ZxrUuYeIfuTr1RKHtapDjLrNo7xXOLi496j/GAgw== X-Received: by 2002:a05:6e02:dc1:b0:302:ecb2:179b with SMTP id l1-20020a056e020dc100b00302ecb2179bmr10840765ilj.223.1669673518004; Mon, 28 Nov 2022 14:11:58 -0800 (PST) Received: from localhost (30.23.70.34.bc.googleusercontent.com. [34.70.23.30]) by smtp.gmail.com with UTF8SMTPSA id i14-20020a056e02054e00b003030e36d9bfsm1480355ils.46.2022.11.28.14.11.57 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Mon, 28 Nov 2022 14:11:57 -0800 (PST) From: Matthias Kaehlcke To: Srinivas Kandagatla , Banajit Goswami , Liam Girdwood , Mark Brown , Jaroslav Kysela , Takashi Iwai Subject: [PATCH 1/2] ASoC: qcom: lpass-sc7180: Drop unnecessary initialization in _resume() Date: Mon, 28 Nov 2022 22:11:54 +0000 Message-Id: <20221128221152.1.Ia805c688ee968fbbec7b93dc10742876fdef8024@changeid> X-Mailer: git-send-email 2.38.1.584.g0f3c55d4c2-goog MIME-Version: 1.0 Cc: Judy Hsiao , alsa-devel@alsa-project.org, linux-kernel@vger.kernel.org, Douglas Anderson , Matthias Kaehlcke , Srinivasa Rao Mandadapu 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" The initialization of the variable 'ret' in sc7180_lpass_dev_resume() is unnecessary, as it is always assigned a few lines below. Drop the initialization. Signed-off-by: Matthias Kaehlcke Reviewed-by: Douglas Anderson --- sound/soc/qcom/lpass-sc7180.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sound/soc/qcom/lpass-sc7180.c b/sound/soc/qcom/lpass-sc7180.c index 9c3365ddc274..7a81e609727c 100644 --- a/sound/soc/qcom/lpass-sc7180.c +++ b/sound/soc/qcom/lpass-sc7180.c @@ -165,7 +165,7 @@ static int sc7180_lpass_exit(struct platform_device *pdev) static int sc7180_lpass_dev_resume(struct device *dev) { - int ret = 0; + int ret; struct lpass_data *drvdata = dev_get_drvdata(dev); ret = clk_bulk_prepare_enable(drvdata->num_clks, drvdata->clks); From patchwork Mon Nov 28 22:11:55 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Matthias Kaehlcke X-Patchwork-Id: 13057968 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 0995CC4321E for ; Mon, 28 Nov 2022 22:13:02 +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 3F4A01662; Mon, 28 Nov 2022 23:12:10 +0100 (CET) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz 3F4A01662 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1669673580; bh=P8/VpZkKG9CCB/Otb8xzBAvztqFP4hUqCHH12NyTPuA=; h=From:To:Subject:Date:In-Reply-To:References:Cc:List-Id: List-Unsubscribe:List-Archive:List-Post:List-Help:List-Subscribe: From; b=Y3IHZ8zRPBF0Dy/kJaV6zl6zNHWVfJNG3ITJN8b1DI7UPpLZ8lNY97ftwc+L0Ttyp cnOFAWzB69mnImki67I6oB7jQQVyMbUdEeuFknt8uJefgJdIFgw42xD33uVF/7J3oz 4+iyUwSL7mfqbN9b+3OBAr59QV8dE2CIGHXRaJig= Received: from alsa1.perex.cz (localhost.localdomain [127.0.0.1]) by alsa1.perex.cz (Postfix) with ESMTP id C65C1F801D8; Mon, 28 Nov 2022 23:12:09 +0100 (CET) Received: by alsa1.perex.cz (Postfix, from userid 50401) id 1E9DEF8027D; Mon, 28 Nov 2022 23:12:08 +0100 (CET) Received: from mail-io1-xd2b.google.com (mail-io1-xd2b.google.com [IPv6:2607:f8b0:4864:20::d2b]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by alsa1.perex.cz (Postfix) with ESMTPS id 1B18AF801D8 for ; Mon, 28 Nov 2022 23:12:00 +0100 (CET) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz 1B18AF801D8 Authentication-Results: alsa1.perex.cz; dkim=pass (1024-bit key) header.d=chromium.org header.i=@chromium.org header.b="LX1I5X2T" Received: by mail-io1-xd2b.google.com with SMTP id q21so8734620iod.4 for ; Mon, 28 Nov 2022 14:12:00 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=Sqj31xD4hPaFJyMRspnZtLV/GdibyQshhKJftkXPTVY=; b=LX1I5X2Tqi3H4osOssCuWhQxDxiOSlkZYdf+xSNNQ5ROewNwQQhCSV6qRABxIV2Bks oYRqoJPX71/O7LWeXlCZXMdXOJYPsyjuD4LOYDUmiqHaJXS34kSPYV3r0aSd22RTBcvD HpGsQZUSAGnCIdx7iCLmqGl1ZVN/RS78RxSwQ= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=Sqj31xD4hPaFJyMRspnZtLV/GdibyQshhKJftkXPTVY=; b=luA2PDZuXks1blK53TnQJAIJaWGCcMscbaGGdXdgW/qvjQjxD3hX2+zF6bS/jPQjE5 EPC1GRVE0MVex6ND3VOTgRR6myoYXUPBywvmAwRdoZJou/LkOt1VkzjlNZoL3RYoATyc cqKZRJsx64h1EIn0+1gSkvzD05n/umM8+WUR+PABEFebM+XPWp+mDodd0SQ/N/Pvy73J 2IxMNp1Wxd6lzpHboh+X5bSDDmAml3dJog2q4DWjBtMVqWNNzxn1mPsgX6uYCBG4i3Yg DtCB2SB0Z2GXMBie0T69n/3abyKKaUVRJp7uuc53Pu3bvly0GEQwXx0BWelEENw5EorA nPQQ== X-Gm-Message-State: ANoB5pnMcAWdMD4cWKRaZ5LIQ5GX/3XxnNoY/E/FLHgu555sO/KVenqR aTMQF4q9m6NOxDfdF8mhLvABlg== X-Google-Smtp-Source: AA0mqf77dcDF5VbAESm+8p/Wms6Z+hD0jVYwI2+aCwtztLs7FD6Hhnbu5FCGv+vyB+kuFVJq+DEo4A== X-Received: by 2002:a05:6602:21c2:b0:6c3:168a:a25e with SMTP id c2-20020a05660221c200b006c3168aa25emr17433231ioc.174.1669673518761; Mon, 28 Nov 2022 14:11:58 -0800 (PST) Received: from localhost (30.23.70.34.bc.googleusercontent.com. [34.70.23.30]) by smtp.gmail.com with UTF8SMTPSA id a15-20020a92ce4f000000b00302bcbad239sm3827937ilr.77.2022.11.28.14.11.58 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Mon, 28 Nov 2022 14:11:58 -0800 (PST) From: Matthias Kaehlcke To: Srinivas Kandagatla , Banajit Goswami , Liam Girdwood , Mark Brown , Jaroslav Kysela , Takashi Iwai Subject: [PATCH 2/2] ASoC: qcom: lpass-sc7180: Return 0 instead of 'ret' at the end of _resume() Date: Mon, 28 Nov 2022 22:11:55 +0000 Message-Id: <20221128221152.2.I8d1993f41f0da1eac0ecba321678ac489f9c0b9b@changeid> X-Mailer: git-send-email 2.38.1.584.g0f3c55d4c2-goog In-Reply-To: <20221128221152.1.Ia805c688ee968fbbec7b93dc10742876fdef8024@changeid> References: <20221128221152.1.Ia805c688ee968fbbec7b93dc10742876fdef8024@changeid> MIME-Version: 1.0 Cc: Judy Hsiao , alsa-devel@alsa-project.org, linux-kernel@vger.kernel.org, Douglas Anderson , Matthias Kaehlcke , Srinivasa Rao Mandadapu 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" sc7180_lpass_dev_resume() returns 'ret' at the end of the function, where 'ret' is always 0. Just return 0 to make it plain obvious that this is always the success path. Also add an empty line between the error handling path and the return. Signed-off-by: Matthias Kaehlcke --- sound/soc/qcom/lpass-sc7180.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/sound/soc/qcom/lpass-sc7180.c b/sound/soc/qcom/lpass-sc7180.c index 7a81e609727c..30a28e3152cb 100644 --- a/sound/soc/qcom/lpass-sc7180.c +++ b/sound/soc/qcom/lpass-sc7180.c @@ -173,7 +173,8 @@ static int sc7180_lpass_dev_resume(struct device *dev) dev_err(dev, "sc7180 clk prepare and enable failed\n"); return ret; } - return ret; + + return 0; } static int sc7180_lpass_dev_suspend(struct device *dev)