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: 26965 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:adf:f944:0:0:0:0:0 with SMTP id q4csp5974092wrr; Mon, 28 Nov 2022 14:13:44 -0800 (PST) X-Google-Smtp-Source: AA0mqf7b3bmEJex+rIuY3PqmuQB3cqdCW50MlYxCwbqqN9fJkUcpiPMR+0Vnqp1Q+qpECUzjV0EG X-Received: by 2002:aa7:9195:0:b0:574:7558:9bd6 with SMTP id x21-20020aa79195000000b0057475589bd6mr25877263pfa.80.1669673623766; Mon, 28 Nov 2022 14:13:43 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1669673623; cv=none; d=google.com; s=arc-20160816; b=tZYGzlUzSnR4IPsn5h+ysi+6CwkzS9MoIibeZdxqViAkcmQVkDOv+/hbrUJ/uM3+RR fTzXU7HLh3n8fDjINVIcElFEcf6qnsf/UqmuzKS7Rot/Wt1BvRPqmiRcqgdHLRbeIpkW ELNHDB5HV3isfshW8BfYo4od5V2Dmxfr8upRrr9Y85v24nnbOrPNNn1vl4h25hw0DkK8 m+ArP2/2IOpRR09fw5kb+dSOsH6Y+ZboNoaqp/V1l3WhbuizkGaibuLeuuIIkRjRMPup ZCIH3jKFz5whuEQ+bBB86IWeYbYxVbmkA6AvscCvkH0qXF0NtpPf8K0fBttBuU7Sq1Ux YqKA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from:dkim-signature; bh=+K0jgOSLksPF0t4oO6z2n4LjWuWuN8YIQgfQeuzMRF0=; b=J+qYdn+zcZRsEWcNBJFEzD/IEhwCBUS9zkRbNRoHNDP0rA+HwyytZV0TczuUIsu12t Pler5KUJSfCT7CD0Zk5ciSmz2KfNVFkdR6D008pCXcpQIq81wnDLBq7H5Uv3Jmnjxr21 LWbbpZn2rErqCcgfzBG+bPEw6agNYVIDyHQY9H7zoP5gyAgvqMc5O5HX4fo+JN3NjGTv vS59iCob97kdCe3aVzyWnWrIMLxFkAHLsFbiVr3a5VphjfFbquKXDk7+KbtFJvH0mwya 6aVVEvJPwVTWlfWLe3ZrAX7lHR9Vp7guqxJtBtxrPLQAf59blbaW4GVl/Gw/BO4tCToM p9tA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@chromium.org header.s=google header.b=Aq1EGgv7; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=chromium.org Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id r10-20020a63d90a000000b00476921cfe9esi14078149pgg.3.2022.11.28.14.13.29; Mon, 28 Nov 2022 14:13:43 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@chromium.org header.s=google header.b=Aq1EGgv7; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=chromium.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234454AbiK1WMG (ORCPT + 99 others); Mon, 28 Nov 2022 17:12:06 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:52494 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234443AbiK1WL7 (ORCPT ); Mon, 28 Nov 2022 17:11:59 -0500 Received: from mail-il1-x130.google.com (mail-il1-x130.google.com [IPv6:2607:f8b0:4864:20::130]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 9B2D130F46 for ; Mon, 28 Nov 2022 14:11:58 -0800 (PST) Received: by mail-il1-x130.google.com with SMTP id o13so5735768ilc.7 for ; Mon, 28 Nov 2022 14:11:58 -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=ws15KKznjlhF8m5gBVrV7cFtF6qdFHfqs7vGXp4Ru3OtChFnfrGrnJfk/vcdZvW4zc LBipq/Ctz0P0kcQ0yuiFtVdv+hD9kO92IfoNojKJieF06iuOoevmb0VYVtGc1bq4xZrf 6gipFKk26XQMpFntCIFNthRaXtlD+96crbr0JGfi7zmJJffDTN7IurhhMwQtOO+ANntk vV1/qjAuTcCMNeO9zKjKMLdCyxZqvf8DCAfMbmZXsJc6Sm23Y26R+Q3kLZq4yHQSAPG/ 3snQr/IigdQjiIlls+OEit6xjsaN+zvXTY54sWKifnsVbOLDaEx5GGeacrFdIK1alMcC wzbg== X-Gm-Message-State: ANoB5pleu1I2BGk+9GVaIq/lqZ1GLe1DbmePK+rRKJF0GLUtxE/L5Zge 9QX0MRq0jT0gcyqDbdDnserldgobG4qI7g== 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 Cc: alsa-devel@alsa-project.org, Douglas Anderson , Srinivasa Rao Mandadapu , linux-kernel@vger.kernel.org, Judy Hsiao , Matthias Kaehlcke 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 X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_NONE, SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1750779689870870913?= X-GMAIL-MSGID: =?utf-8?q?1750779689870870913?= 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: 26964 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:adf:f944:0:0:0:0:0 with SMTP id q4csp5973871wrr; Mon, 28 Nov 2022 14:13:13 -0800 (PST) X-Google-Smtp-Source: AA0mqf5vuBNivTypQAQ69Oq0nG+AYXp5iCG0w7biJi1TPnBBybzUU3yugrznPsSfk6+8oBMUkWL1 X-Received: by 2002:a17:902:ccc3:b0:189:808b:c659 with SMTP id z3-20020a170902ccc300b00189808bc659mr10507982ple.13.1669673593520; Mon, 28 Nov 2022 14:13:13 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1669673593; cv=none; d=google.com; s=arc-20160816; b=c2G7b6A+qIDhceijgzsiG0zRZ8U6Mji/wK7uO3hsI1+Ze0o7fewmnWOXYyvq2aBIVu qCHVSJdmPfLEfHJQ3VofcYv3l8SvWvTAX0cyFLNXR215I/9E8/4jm3TXStAPg2QxpP6w de218f6/J7fQX8vurUDkYj4aFJQsxY53SKDEO13TqmGOB75uZ1YEgfIRKa8+2w38TQPY iLfLBIYsAHFHx0hW7iWCy1mPjTi9WySUDBFQXkTmgoQxI+h15crjMM7IBz+2yXjgwqWN rY0TVyLSkGgBYPLZXQaGhVDXNdQa3/sMH/bB2Y8wAeY3DfTLDtxq3VyDZBFCTcYXLHfV dCrw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=Sqj31xD4hPaFJyMRspnZtLV/GdibyQshhKJftkXPTVY=; b=G2v6huOFp2Q0tr/flayoaM9Wh0vFHJxptVN0bir1TizZElT+WP24SyUjCpNVd+Mga8 64PdMjoT4qugOQYff9taJztZqwaOnmZ4USEW2HGW2yxqLrQYuNAo+NQeXCkGWMor6G5K fhSgdlyYeGefPtafFRy58IFELxL/dp4g5G+yPLrYAPLUdhed6ko0hUur8y66s1//EczJ FH80cfD1CwOqnp3NrmSaXO1XH+N9SU/Nhz+p4DZPC89hu03LjhNRcdNXzK/UUcTb598o SCzRkprq5/zbX7ziZ51/j9gHgWrbWuFdEpifFXauOzZ7a3p2zl0AqensD+FVKSI9oq9X wNLQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@chromium.org header.s=google header.b=LX1I5X2T; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=chromium.org Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id e13-20020a17090301cd00b0018862b8c9a2si12797525plh.12.2022.11.28.14.13.00; Mon, 28 Nov 2022 14:13:13 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@chromium.org header.s=google header.b=LX1I5X2T; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=chromium.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234148AbiK1WMC (ORCPT + 99 others); Mon, 28 Nov 2022 17:12:02 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:52494 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234455AbiK1WMA (ORCPT ); Mon, 28 Nov 2022 17:12:00 -0500 Received: from mail-io1-xd2b.google.com (mail-io1-xd2b.google.com [IPv6:2607:f8b0:4864:20::d2b]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 586B930F60 for ; Mon, 28 Nov 2022 14:11:59 -0800 (PST) Received: by mail-io1-xd2b.google.com with SMTP id b2so8719068iof.12 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: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=7j/h6fHsfEzXVOG9MHEk47tW3PlkBGMnZaXcpwk/lCXogWDjGmGkiyx8W5Z/u1IE+P 0qbihT4eErESE/r6dQSARPlpqeuhk8WRIo5Gl4wqN6g1gULDqo89j13GNUo4Q2kxsIPg Y36MAxX9rU3x5rTuSYtUyCHspkVjlxC5KcsNHYLe5TUVDPW6q9MiUjm5ABvVy0nEmW5I VDWHuDvPz/fJRGnsf/ATFugKSZFHbSiz9HNUm5eGYHMyox745NacBB4zkQwYwmj3AdO1 sSEC8xk/TME71iqutRx60FLAddBPpfDKH02r0wPgKjAFyVKdl1aCk9Cl2AtcKWb1POoS 10sw== X-Gm-Message-State: ANoB5pnXOGPs4WJHXwCQgu0naoG8wteEGqWvQEAFFuFBC3EB/oGj4Y3T IBlGAUU3mdb06IMTu6AODASS6w== 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 Cc: alsa-devel@alsa-project.org, Douglas Anderson , Srinivasa Rao Mandadapu , linux-kernel@vger.kernel.org, Judy Hsiao , Matthias Kaehlcke 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 X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_NONE, SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1750779657828053486?= X-GMAIL-MSGID: =?utf-8?q?1750779657828053486?= 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)