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] [day] [month] [year] [list]
Date:   Wed, 2 Oct 2019 11:20:07 +0200
From:   Geert Uytterhoeven <geert@...ux-m68k.org>
To:     Sergei Shtylyov <sergei.shtylyov@...entembedded.com>
Cc:     Geert Uytterhoeven <geert+renesas@...der.be>,
        Ulf Hansson <ulf.hansson@...aro.org>,
        Wolfram Sang <wsa+renesas@...g-engineering.com>,
        Stephen Boyd <swboyd@...omium.org>,
        Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
        Linux-Renesas <linux-renesas-soc@...r.kernel.org>,
        Linux MMC List <linux-mmc@...r.kernel.org>,
        Linux Kernel Mailing List <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH] mmc: renesas_sdhi: Do not use platform_get_irq() to count interrupts

Hi Sergei,

On Wed, Oct 2, 2019 at 11:11 AM Sergei Shtylyov
<sergei.shtylyov@...entembedded.com> wrote:
> On 01.10.2019 21:07, Geert Uytterhoeven wrote:
> > As platform_get_irq() now prints an error when the interrupt does not
> > exist, counting interrupts by looping until failure causes the printing
>
>    s/the//?

I believe "the printing" is correct.
Any native English speakers to comment?

> > of scary messages like:
> >
> >      renesas_sdhi_internal_dmac ee140000.sd: IRQ index 1 not found
> >
> > Fix this by using the platform_irq_count() helper to avoid touching
> > non-existent interrupts.
> >
> > Fixes: 7723f4c5ecdb8d83 ("driver core: platform: Add an error message to platform_get_irq*()")
> > Signed-off-by: Geert Uytterhoeven <geert+renesas@...der.be>

> > --- a/drivers/mmc/host/renesas_sdhi_core.c
> > +++ b/drivers/mmc/host/renesas_sdhi_core.c
> [...]
> > @@ -825,24 +825,26 @@ int renesas_sdhi_probe(struct platform_device *pdev,
> >               host->hs400_complete = renesas_sdhi_hs400_complete;
> >       }
> >
> > -     i = 0;
> > -     while (1) {
> > +     /* There must be at least one IRQ source */
> > +     num_irqs = platform_irq_count(pdev);
> > +     if (num_irqs < 1) {
> > +             ret = num_irqs;
> > +             goto eirq;
>
>     This will return 0 with failed probe if 'num_irqs' is 0, I don't think you
> want this...

Thanks, will fix.

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