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 for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAD=FV=U6Yiv5i4PdDFqNhp0STqAvVi_=F_iuKyonx=MsOQFABQ@mail.gmail.com>
Date:   Tue, 4 Feb 2020 13:07:56 -0800
From:   Doug Anderson <dianders@...omium.org>
To:     Stephen Boyd <swboyd@...omium.org>
Cc:     Mark Brown <broonie@...nel.org>,
        LKML <linux-kernel@...r.kernel.org>,
        Andy Gross <agross@...nel.org>,
        Bjorn Andersson <bjorn.andersson@...aro.org>,
        linux-spi <linux-spi@...r.kernel.org>,
        Girish Mahadevan <girishm@...eaurora.org>,
        Dilip Kota <dkota@...eaurora.org>,
        Alok Chauhan <alokc@...eaurora.org>
Subject: Re: [PATCH 2/3] spi: spi-geni-qcom: Grow a dev pointer to simplify code

Hi,

On Tue, Feb 4, 2020 at 11:12 AM Stephen Boyd <swboyd@...omium.org> wrote:
>
> Some lines are long here. Use a struct dev pointer to shorten lines and
> simplify code. The clk_get() call can fail because of EPROBE_DEFER
> problems too, so just remove the error print message because it isn't
> useful.
>
> Cc: Girish Mahadevan <girishm@...eaurora.org>
> Cc: Dilip Kota <dkota@...eaurora.org>
> Cc: Alok Chauhan <alokc@...eaurora.org>
> Cc: Douglas Anderson <dianders@...omium.org>
> Signed-off-by: Stephen Boyd <swboyd@...omium.org>
> ---
>  drivers/spi/spi-geni-qcom.c | 24 +++++++++++-------------
>  1 file changed, 11 insertions(+), 13 deletions(-)
>
> diff --git a/drivers/spi/spi-geni-qcom.c b/drivers/spi/spi-geni-qcom.c
> index 46e501fc87f3..f0ca7f5ae714 100644
> --- a/drivers/spi/spi-geni-qcom.c
> +++ b/drivers/spi/spi-geni-qcom.c
> @@ -536,6 +536,7 @@ static int spi_geni_probe(struct platform_device *pdev)
>         struct spi_geni_master *mas;
>         void __iomem *base;
>         struct clk *clk;
> +       struct device *dev = &pdev->dev;
>
>         irq = platform_get_irq(pdev, 0);
>         if (irq < 0)
> @@ -545,28 +546,25 @@ static int spi_geni_probe(struct platform_device *pdev)
>         if (IS_ERR(base))
>                 return PTR_ERR(base);
>
> -       clk = devm_clk_get(&pdev->dev, "se");
> -       if (IS_ERR(clk)) {
> -               dev_err(&pdev->dev, "Err getting SE Core clk %ld\n",
> -                                               PTR_ERR(clk));
> +       clk = devm_clk_get(dev, "se");
> +       if (IS_ERR(clk))

There could be other errors besides -EPROBE_DEFER and devm_clk_get()
won't have printed in all cases.  ...but I agree that it seems highly
unlikely we'd ever hit any of those but highly likely we _would_ print
out a needless shout about -EPROBE_DEFER, so this is fine:

Reviewed-by: Douglas Anderson <dianders@...omium.org>

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ