lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAMuHMdXdNyTcwb4Tdg4r-QKkLewEDmHj8qovtL1Z_2_hOr4ZLw@mail.gmail.com>
Date: Mon, 16 Dec 2024 16:56:18 +0100
From: Geert Uytterhoeven <geert@...ux-m68k.org>
To: Prabhakar <prabhakar.csengg@...il.com>
Cc: Chris Brandt <chris.brandt@...esas.com>, Andi Shyti <andi.shyti@...nel.org>, 
	Philipp Zabel <p.zabel@...gutronix.de>, Wolfram Sang <wsa@...nel.org>, 
	linux-renesas-soc@...r.kernel.org, linux-i2c@...r.kernel.org, 
	linux-kernel@...r.kernel.org, Biju Das <biju.das.jz@...renesas.com>, 
	Fabrizio Castro <fabrizio.castro.jz@...esas.com>, 
	Lad Prabhakar <prabhakar.mahadev-lad.rj@...renesas.com>
Subject: Re: [PATCH 5/9] i2c: riic: Make use of devres helper to request
 deasserted reset line

Hi Prabhakar,

On Fri, Dec 13, 2024 at 6:58 PM Prabhakar <prabhakar.csengg@...il.com> wrote:
> From: Lad Prabhakar <prabhakar.mahadev-lad.rj@...renesas.com>
>
> Simplify the `riic_i2c_probe()` function by using the
> `devm_reset_control_get_optional_exclusive_deasserted()` API to request a
> deasserted reset line. This eliminates the need to manually deassert the
> reset control and the additional cleanup.
>
> Signed-off-by: Lad Prabhakar <prabhakar.mahadev-lad.rj@...renesas.com>

Thanks for your patch!

> --- a/drivers/i2c/busses/i2c-riic.c
> +++ b/drivers/i2c/busses/i2c-riic.c
> @@ -447,18 +442,10 @@ static int riic_i2c_probe(struct platform_device *pdev)
>                 return dev_err_probe(dev, PTR_ERR(riic->clk),
>                                      "missing controller clock");
>
> -       riic->rstc = devm_reset_control_get_optional_exclusive(dev, NULL);
> +       riic->rstc = devm_reset_control_get_optional_exclusive_deasserted(dev, NULL);
>         if (IS_ERR(riic->rstc))
>                 return dev_err_probe(dev, PTR_ERR(riic->rstc),
> -                                    "Error: missing reset ctrl\n");
> -
> -       ret = reset_control_deassert(riic->rstc);
> -       if (ret)
> -               return ret;
> -
> -       ret = devm_add_action_or_reset(dev, riic_reset_control_assert, riic->rstc);
> -       if (ret)
> -               return ret;
> +                                    "Failed to acquire deasserted reset control\n");

"failed", as all other error messages start with a lower-case character.
Perhaps drop the " control" from the message?

>
>         for (i = 0; i < ARRAY_SIZE(riic_irqs); i++) {
>                 ret = platform_get_irq(pdev, riic_irqs[i].res_num);

Gr{oetje,eeting}s,

                        Geert

-- 
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@...ux-m68k.org

In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
                                -- Linus Torvalds

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ