Message ID | 202303241016261854322@zte.com.cn |
---|---|
State | New |
Headers |
Return-Path: <linux-kernel-owner@vger.kernel.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:604a:0:0:0:0:0 with SMTP id j10csp96745wrt; Thu, 23 Mar 2023 19:26:49 -0700 (PDT) X-Google-Smtp-Source: AKy350b8FmXFBDGWBt1huSTG6dYItA1zvVuay0GwYPMnCVaJ9hJ9+lJT7p5zCramhxyZ+9/uMSAh X-Received: by 2002:a17:906:9512:b0:92f:1418:27f0 with SMTP id u18-20020a170906951200b0092f141827f0mr1043909ejx.34.1679624809160; Thu, 23 Mar 2023 19:26:49 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1679624809; cv=none; d=google.com; s=arc-20160816; b=mTzc0xu51BgHH/J68n8NHpdwBRB0V2IEVrIGh7bG53BtjXcDl5TtGNVCzElCvF5esi MR8tygonIFOopu8iXHNlcYZlXeeFa6KaX2Ps3gJHuK5MvjX0Zty5XDbpfcHH2XYWIYCg mPgHmgIyEOj9assqK5qzVwEs1wxbnJ3iRhjjiZmZRmNIH0lL8NHsHqleDL+XrxSxVjQ7 ByWkseT1oh2UAh4lbSPdDZ0UQc6DXLCTeL1H5a35fw+4et91fFMMddQkLTeM0YD4vx5r /03Fp0y1l/wHzSxgnyuV99GzW0OiyoEvZpch9MZlRNUhPxW2egvtFFM7Gun4C+IXtjhL rIUA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:subject:cc:to:from:mime-version:message-id:date; bh=kGSUr/n64lkh06PuTT8qZoF7dqmSKXf7r6sd7hyd0wE=; b=Jssro2B6uubrPHyPyttA/fOtSxEExYE0SoeAYevOIjcyNyS/qmOZpQE1OciKeHMQ20 ZInIDF8I1CviTTUZsm6cSbKNegV5VKvxDPKhwGAYdJZaOlPn5C40g25nzcMTSTY8ogH7 pX3OQvo6Kc3q1tMIW6N7BoxqvIvKJ62JeBA8Vnwl1eehItvokLtOjR14witVWWRw+ukI eCE4cCJ3TxcDje1Z5zkercY11j8Ik3ETDlK08MRRzDKD4y/v92+MU3k7haFPPiPJhCNn BfvdnDSg9/FDtzELvtPSpphjVwBJk2sOT5l061AfZaKm+3WLdDg7c8bRV5mxMkexWOFx dJtg== ARC-Authentication-Results: i=1; mx.google.com; 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=fail (p=NONE sp=NONE dis=NONE) header.from=zte.com.cn Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id s10-20020a170906454a00b0093244ae0d63si15635133ejq.179.2023.03.23.19.26.25; Thu, 23 Mar 2023 19:26:49 -0700 (PDT) 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; 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=fail (p=NONE sp=NONE dis=NONE) header.from=zte.com.cn Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230350AbjCXCRM (ORCPT <rfc822;ezelljr.billy@gmail.com> + 99 others); Thu, 23 Mar 2023 22:17:12 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:50972 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230011AbjCXCRK (ORCPT <rfc822;linux-kernel@vger.kernel.org>); Thu, 23 Mar 2023 22:17:10 -0400 Received: from mxhk.zte.com.cn (mxhk.zte.com.cn [63.216.63.35]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id C85E6298D5 for <linux-kernel@vger.kernel.org>; Thu, 23 Mar 2023 19:16:50 -0700 (PDT) Received: from mse-fl2.zte.com.cn (unknown [10.5.228.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mxhk.zte.com.cn (FangMail) with ESMTPS id 4PjQnY1q1bz6FK2f; Fri, 24 Mar 2023 10:16:49 +0800 (CST) Received: from xaxapp02.zte.com.cn ([10.88.97.241]) by mse-fl2.zte.com.cn with SMTP id 32O2GPNH097835; Fri, 24 Mar 2023 10:16:25 +0800 (+08) (envelope-from ye.xingchen@zte.com.cn) Received: from mapi (xaxapp02[null]) by mapi (Zmail) with MAPI id mid31; Fri, 24 Mar 2023 10:16:26 +0800 (CST) Date: Fri, 24 Mar 2023 10:16:26 +0800 (CST) X-Zmail-TransId: 2afa641d07faffffffffde9-a08c6 X-Mailer: Zmail v1.0 Message-ID: <202303241016261854322@zte.com.cn> Mime-Version: 1.0 From: <ye.xingchen@zte.com.cn> To: <neil.armstrong@linaro.org> Cc: <khilman@baylibre.com>, <jbrunet@baylibre.com>, <martin.blumenstingl@googlemail.com>, <linux-arm-kernel@lists.infradead.org>, <linux-amlogic@lists.infradead.org>, <linux-kernel@vger.kernel.org> Subject: =?utf-8?q?=5BPATCH=5D_soc=3A_amlogic=3A_meson-pwrc=3A_Use_dev=5Ferr?= =?utf-8?q?=5Fprobe=28=29?= Content-Type: text/plain; charset="UTF-8" X-MAIL: mse-fl2.zte.com.cn 32O2GPNH097835 X-Fangmail-Gw-Spam-Type: 0 X-Fangmail-Anti-Spam-Filtered: true X-Fangmail-MID-QID: 641D0811.000/4PjQnY1q1bz6FK2f X-Spam-Status: No, score=0.0 required=5.0 tests=SPF_HELO_NONE,SPF_PASS, UNPARSEABLE_RELAY autolearn=unavailable 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: <linux-kernel.vger.kernel.org> X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1761214263749695636?= X-GMAIL-MSGID: =?utf-8?q?1761214263749695636?= |
Series |
soc: amlogic: meson-pwrc: Use dev_err_probe()
|
|
Commit Message
ye.xingchen@zte.com.cn
March 24, 2023, 2:16 a.m. UTC
From: Ye Xingchen <ye.xingchen@zte.com.cn> Replace the open-code with dev_err_probe() to simplify the code. Signed-off-by: Ye Xingchen <ye.xingchen@zte.com.cn> --- drivers/soc/amlogic/meson-gx-pwrc-vpu.c | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-)
Comments
On 24/03/2023 03:16, ye.xingchen@zte.com.cn wrote: > From: Ye Xingchen <ye.xingchen@zte.com.cn> > > Replace the open-code with dev_err_probe() to simplify the code. > > Signed-off-by: Ye Xingchen <ye.xingchen@zte.com.cn> > --- > drivers/soc/amlogic/meson-gx-pwrc-vpu.c | 8 +++----- > 1 file changed, 3 insertions(+), 5 deletions(-) > > diff --git a/drivers/soc/amlogic/meson-gx-pwrc-vpu.c b/drivers/soc/amlogic/meson-gx-pwrc-vpu.c > index 312fd9afccb0..5d4f12800d93 100644 > --- a/drivers/soc/amlogic/meson-gx-pwrc-vpu.c > +++ b/drivers/soc/amlogic/meson-gx-pwrc-vpu.c > @@ -308,11 +308,9 @@ static int meson_gx_pwrc_vpu_probe(struct platform_device *pdev) > } > > rstc = devm_reset_control_array_get_exclusive(&pdev->dev); > - if (IS_ERR(rstc)) { > - if (PTR_ERR(rstc) != -EPROBE_DEFER) > - dev_err(&pdev->dev, "failed to get reset lines\n"); > - return PTR_ERR(rstc); > - } > + if (IS_ERR(rstc)) > + return dev_err_probe(&pdev->dev, PTR_ERR(rstc), > + "failed to get reset lines\n"); > > vpu_clk = devm_clk_get(&pdev->dev, "vpu"); > if (IS_ERR(vpu_clk)) { Reviewed-by: Neil Armstrong <neil.armstrong@linaro.org>
On Fri, Mar 24, 2023 at 3:16 AM <ye.xingchen@zte.com.cn> wrote: > > From: Ye Xingchen <ye.xingchen@zte.com.cn> > > Replace the open-code with dev_err_probe() to simplify the code. > > Signed-off-by: Ye Xingchen <ye.xingchen@zte.com.cn> Reviewed-by: Martin Blumenstingl <martin.blumenstingl@googlemail.com>
Hi, On Fri, 24 Mar 2023 10:16:26 +0800, ye.xingchen@zte.com.cn wrote: > Replace the open-code with dev_err_probe() to simplify the code. > > Thanks, Applied to https://git.kernel.org/pub/scm/linux/kernel/git/amlogic/linux.git (v6.4/drivers) [1/1] soc: amlogic: meson-pwrc: Use dev_err_probe() https://git.kernel.org/amlogic/c/78e812f0406c765fc5623b1d68e3c6e86cb32e5a These changes has been applied on the intermediate git tree [1]. The v6.4/drivers branch will then be sent via a formal Pull Request to the Linux SoC maintainers for inclusion in their intermediate git branches in order to be sent to Linus during the next merge window, or sooner if it's a set of fixes. In the cases of fixes, those will be merged in the current release candidate kernel and as soon they appear on the Linux master branch they will be backported to the previous Stable and Long-Stable kernels [2]. The intermediate git branches are merged daily in the linux-next tree [3], people are encouraged testing these pre-release kernels and report issues on the relevant mailing-lists. If problems are discovered on those changes, please submit a signed-off-by revert patch followed by a corrective changeset. [1] https://git.kernel.org/pub/scm/linux/kernel/git/amlogic/linux.git [2] https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git [3] https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git
diff --git a/drivers/soc/amlogic/meson-gx-pwrc-vpu.c b/drivers/soc/amlogic/meson-gx-pwrc-vpu.c index 312fd9afccb0..5d4f12800d93 100644 --- a/drivers/soc/amlogic/meson-gx-pwrc-vpu.c +++ b/drivers/soc/amlogic/meson-gx-pwrc-vpu.c @@ -308,11 +308,9 @@ static int meson_gx_pwrc_vpu_probe(struct platform_device *pdev) } rstc = devm_reset_control_array_get_exclusive(&pdev->dev); - if (IS_ERR(rstc)) { - if (PTR_ERR(rstc) != -EPROBE_DEFER) - dev_err(&pdev->dev, "failed to get reset lines\n"); - return PTR_ERR(rstc); - } + if (IS_ERR(rstc)) + return dev_err_probe(&pdev->dev, PTR_ERR(rstc), + "failed to get reset lines\n"); vpu_clk = devm_clk_get(&pdev->dev, "vpu"); if (IS_ERR(vpu_clk)) {