2023-03-24 02:18:44

by ye.xingchen

[permalink] [raw]
Subject: [PATCH] soc: amlogic: meson-pwrc: Use dev_err_probe()

From: Ye Xingchen <[email protected]>

Replace the open-code with dev_err_probe() to simplify the code.

Signed-off-by: Ye Xingchen <[email protected]>
---
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)) {
--
2.25.1


2023-03-24 10:17:09

by Neil Armstrong

[permalink] [raw]
Subject: Re: [PATCH] soc: amlogic: meson-pwrc: Use dev_err_probe()

On 24/03/2023 03:16, [email protected] wrote:
> From: Ye Xingchen <[email protected]>
>
> Replace the open-code with dev_err_probe() to simplify the code.
>
> Signed-off-by: Ye Xingchen <[email protected]>
> ---
> 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 <[email protected]>

2023-03-25 13:28:16

by Martin Blumenstingl

[permalink] [raw]
Subject: Re: [PATCH] soc: amlogic: meson-pwrc: Use dev_err_probe()

On Fri, Mar 24, 2023 at 3:16 AM <[email protected]> wrote:
>
> From: Ye Xingchen <[email protected]>
>
> Replace the open-code with dev_err_probe() to simplify the code.
>
> Signed-off-by: Ye Xingchen <[email protected]>
Reviewed-by: Martin Blumenstingl <[email protected]>

2023-03-27 07:56:43

by Neil Armstrong

[permalink] [raw]
Subject: Re: [PATCH] soc: amlogic: meson-pwrc: Use dev_err_probe()

Hi,

On Fri, 24 Mar 2023 10:16:26 +0800, [email protected] 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

--
Neil