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: <154653191998.15366.14229484132412159772@swboyd.mtv.corp.google.com>
Date:   Thu, 03 Jan 2019 08:11:59 -0800
From:   Stephen Boyd <swboyd@...omium.org>
To:     "Rafael J. Wysocki" <rafael@...nel.org>
Cc:     Rob Herring <robh@...nel.org>, Andrzej Hajda <a.hajda@...sung.com>,
        Andy Shevchenko <andy.shevchenko@...il.com>,
        Bartlomiej Zolnierkiewicz <b.zolnierkie@...sung.com>,
        Mark Brown <broonie@...nel.org>,
        Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
        javierm@...hat.com,
        Linux ARM <linux-arm-kernel@...ts.infradead.org>,
        Linux Kernel Mailing List <linux-kernel@...r.kernel.org>,
        Russell King - ARM Linux <linux@...linux.org.uk>,
        Marek Szyprowski <m.szyprowski@...sung.com>,
        "Rafael J. Wysocki" <rafael@...nel.org>
Subject: Re: [PATCH v3] driver core: platform: Add an error message to platform_get_irq*()

Quoting Rafael J. Wysocki (2019-01-03 01:40:26)
> On Wed, Jan 2, 2019 at 7:51 PM Stephen Boyd <swboyd@...omium.org> wrote:
> > @@ -130,6 +125,22 @@ int platform_get_irq(struct platform_device *dev, unsigned int num)
> >         return r ? r->start : -ENXIO;
> >  #endif
> >  }
> > +
> > +/**
> > + * platform_get_irq - get an IRQ for a device
> > + * @dev: platform device
> > + * @num: IRQ number index
> > + */
> > +int platform_get_irq(struct platform_device *dev, unsigned int num)
> > +{
> > +       int ret;
> > +
> > +       ret = __platform_get_irq(dev, num);
> > +       if (ret < 0 && ret != -EPROBE_DEFER)
> > +               dev_err(&dev->dev, "IRQ index %u not found\n", num);
> 
> Why don't you log the error code too?
> 

I don't see much benefit to seeing -ENXIO or -EINVAL printed here, so I
left out the error code.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ