From patchwork Fri Aug 23 12:51:09 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Krzysztof Kozlowski X-Patchwork-Id: 13775155 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 bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (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 D0663C52D7C for ; Fri, 23 Aug 2024 12:56:18 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender:List-Subscribe:List-Help :List-Post:List-Archive:List-Unsubscribe:List-Id:Cc:To:In-Reply-To:References :Message-Id:Content-Transfer-Encoding:Content-Type:MIME-Version:Subject:Date: From:Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=Sa/KHRgT6a9iG3/ETlQHPI59tAN0SqbzEBXVbMy78Ls=; b=t8YV1E3HVTvP9i/7Vzi7DsyDc3 6oyGxGwWMOe1voHFCjUTaycUTY59ekySB42fBYsm4OF4A/trIpbWmTpGEjD0kGmWUx57BXrhhZ8vV cgtL0ockD6q7MPyOHb+dLyrSgLytgnepsaFgLZJ0USG455ZiL3jVzcB9l5bC92YO2TJaO41Gz5dAU SoPkL3ezUsldtF6usuXq+QrgXBbZGd+0sOavQpBi6Buo1Izvo5WJUosdVtbWJ4WWWa+ONXC77lma6 ovYUVKLgL9F6lxsyEf8mrmmB8aH5fQ09G99V5VmQ00DcUJXhP39owII6Ki33wylmZStU5lqIVkMFH /v1S6UmQ==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1shTpl-0000000GmGq-3OPS; Fri, 23 Aug 2024 12:56:05 +0000 Received: from mail-ej1-x636.google.com ([2a00:1450:4864:20::636]) by bombadil.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1shTlR-0000000GlBA-1uFW for linux-arm-kernel@lists.infradead.org; Fri, 23 Aug 2024 12:51:39 +0000 Received: by mail-ej1-x636.google.com with SMTP id a640c23a62f3a-a86753ac89bso11417666b.0 for ; Fri, 23 Aug 2024 05:51:37 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1724417496; x=1725022296; darn=lists.infradead.org; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:from:to:cc:subject:date:message-id :reply-to; bh=Sa/KHRgT6a9iG3/ETlQHPI59tAN0SqbzEBXVbMy78Ls=; b=mkE6bvSMRJ0ubAQzg8rWS39MpNG5xhj81wtBdseamqDlGrjfVrupKZAA8fQqT4ZBam OzsZJGocZ4lLTswO+2wJ5jUW89isUrOB9uWpkPbPervSR4bLCK5wkisZdYp/CYIqkxwk JAD0RgVaolk1BB/hUgGcbK5xK6Y4IjDQ4Dwah6BiVD/HaylFIJnJagV/zl4N3oQDajct 8CxiucgVSjwLMEPulva2yaJbWNox1DLPo6KKwHnSAaN6n6sX15nFu+hpVWjmpbvd4hBs f+NeINwy4x/KE2C1htuAZF0wxSxFTx+B2HuFjLIqgDc9Azzw6NXzKbbhpFv+kguDuAEV OP+w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1724417496; x=1725022296; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=Sa/KHRgT6a9iG3/ETlQHPI59tAN0SqbzEBXVbMy78Ls=; b=Xvbgc4lr2kJjOPtXkDpkHYpKXDRjTrTmGN51fuMiqKBP+5CBPMJk+gHB2Fl6C+AZJm g3r63T5e7dCtTqntSw4GYO19vWyb3+cDee3g/DWmuoEO4rH8USxGgtEfC3VFQMpVxNWZ mwO/w5rh3T/MNte2sX43kkL5euwvck2DQQROlpaSgpkY4uFUythEGdutv+50pSsV7Kq8 GPl6KNVkWQbT6to5NEw4LC5Gv0npIxvG9NEL4vJ0OxRpN6rF5tx57Nlgc3H6oEf/Y+iN 5x0Fu838NCiz0jAR/iSleYuqCQt1/Fd3bhoCZahPTUjrvh6oyDz6a0w1uf1kVznmXR3V IdTQ== X-Forwarded-Encrypted: i=1; AJvYcCUFJv9agM1oibRTLodIv+4AdN29DHffeQmpWjsDJ9xoDgd/jVyxYDDIk+JT4fYx3gulbh+6Si7mHF+tVrxdhwi5@lists.infradead.org X-Gm-Message-State: AOJu0YzvT6j/1ectpx+SvrvdcDqwbzarxCLMAsjpInk/wKOw/U5gPhzb mGAsrFz/Vva9trk207VBY78PU7/ibbfcK8ZVo9fFb+QNS/90HwVj3Z9Y+ySuoo0= X-Google-Smtp-Source: AGHT+IEdA/oEZ97C2qOqfjgHLdf7GZtFRbhRivaHzioPPap69e5acBh4T0xkHuu904RyEID7S6Zhew== X-Received: by 2002:a17:907:968c:b0:a7a:a2e3:3736 with SMTP id a640c23a62f3a-a86a5489a72mr92536566b.5.1724417495945; Fri, 23 Aug 2024 05:51:35 -0700 (PDT) Received: from [127.0.1.1] ([178.197.222.82]) by smtp.gmail.com with ESMTPSA id a640c23a62f3a-a868f4f384bsm255931666b.192.2024.08.23.05.51.34 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 23 Aug 2024 05:51:35 -0700 (PDT) From: Krzysztof Kozlowski Date: Fri, 23 Aug 2024 14:51:09 +0200 Subject: [PATCH 05/10] pmdomain: qcom: cpr: Simplify with dev_err_probe() MIME-Version: 1.0 Message-Id: <20240823-cleanup-h-guard-pm-domain-v1-5-8320722eaf39@linaro.org> References: <20240823-cleanup-h-guard-pm-domain-v1-0-8320722eaf39@linaro.org> In-Reply-To: <20240823-cleanup-h-guard-pm-domain-v1-0-8320722eaf39@linaro.org> To: Ulf Hansson , Heiko Stuebner , Shawn Guo , Sascha Hauer , Pengutronix Kernel Team , Fabio Estevam , Bjorn Andersson , Konrad Dybcio , Geert Uytterhoeven , Magnus Damm Cc: linux-pm@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-rockchip@lists.infradead.org, linux-kernel@vger.kernel.org, imx@lists.linux.dev, linux-arm-msm@vger.kernel.org, linux-renesas-soc@vger.kernel.org, Krzysztof Kozlowski X-Mailer: b4 0.14.1 X-Developer-Signature: v=1; a=openpgp-sha256; l=863; i=krzysztof.kozlowski@linaro.org; h=from:subject:message-id; bh=SsKn+XKGNdg5Lu4TYJpa1Z5yeroNI9GQomQEQv1kKlo=; b=owEBbQKS/ZANAwAKAcE3ZuaGi4PXAcsmYgBmyIXIAE/UDGNyaNfdauaVBO6LIu+O/X2S8PcEz tOZoQCDU0SJAjMEAAEKAB0WIQTd0mIoPREbIztuuKjBN2bmhouD1wUCZsiFyAAKCRDBN2bmhouD 1z9AD/0SCxM4givKRDsROWCOR5j/+4VWWxQLgTTNLssfQNDBH81XPQ0y6u5DXPpwX6GDZuFE0KG AGCPQbxe50w0leYIkSfhdQcmHV5GegOp93DcIhTKAThLFFJJfNFoNYm6NLqFo+2/JngjpIWosI/ jumqWnbvSxujOR/S5APTM6m2LisQte5FJFkVfp0fy7rTJNPjWBea8nhcre0gRoU+ECZ6hnDuogv Rc/ncG5TXQntXUbni/M98iXqDOMb79XVVsYwRMW0h2ZI5ATxcP+xF/BMpXSO4tSwAtuvaScNZrA +lOW8wz53KFD3F7iaOVpgEQ4vgqzNaWaBeh6g/8kgAwcWZZroJsPA/HGbulpkzCgvujAc8yIe4Y L3N7+1BRdGP1/+0DkFhr6q7hC6IoetUMtK8/S/OlnoZU6tIZCzL3dsFEGvIjlAGSJFV/eHSY5Ui X3BsRg5nI5eL5F5bwKuXxXzGX5IEu8uwLYdvRQfITeluiSylB/x5sDeQffM/PHtDoDQIddbd/D1 eTzAs/GUBiAJiWE5lLNx1Wa65YWa3olzZhJCbZtGbt3XKLVv+gxrwcCCtFCJt8KpW5X5kcMIFNq RbIza/sGz8mkdHAj5bG4X5zTXQ8cabGsaE2qdP9UWVpiyzj4Jv+c8oDlCZ5WWwUlU5Z9cnpnkrW xm+1Jwl7sUAchbA== X-Developer-Key: i=krzysztof.kozlowski@linaro.org; a=openpgp; fpr=9BD07E0E0C51F8D59677B7541B93437D3B41629B X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240823_055137_540590_EC6F099C X-CRM114-Status: GOOD ( 12.58 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org Use dev_err_probe() to make defer code handling simpler. Signed-off-by: Krzysztof Kozlowski Reviewed-by: Konrad Dybcio --- drivers/pmdomain/qcom/cpr.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/drivers/pmdomain/qcom/cpr.c b/drivers/pmdomain/qcom/cpr.c index c64e84a27cc7..1bef89712188 100644 --- a/drivers/pmdomain/qcom/cpr.c +++ b/drivers/pmdomain/qcom/cpr.c @@ -1470,9 +1470,8 @@ static int cpr_pd_attach_dev(struct generic_pm_domain *domain, */ drv->cpu_clk = devm_clk_get(dev, NULL); if (IS_ERR(drv->cpu_clk)) { - ret = PTR_ERR(drv->cpu_clk); - if (ret != -EPROBE_DEFER) - dev_err(drv->dev, "could not get cpu clk: %d\n", ret); + ret = dev_err_probe(drv->dev, PTR_ERR(drv->cpu_clk), + "could not get cpu clk\n"); goto unlock; } drv->attached_cpu_dev = dev;