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]
Date: Mon, 18 Dec 2023 13:23:35 -0700
From: Mark Hasemeyer <markhas@...omium.org>
To: Andy Shevchenko <andriy.shevchenko@...el.com>
Cc: LKML <linux-kernel@...r.kernel.org>, Raul Rangel <rrangel@...omium.org>, 
	David Gow <davidgow@...gle.com>, Greg Kroah-Hartman <gregkh@...uxfoundation.org>, 
	Mark Brown <broonie@...nel.org>, "Rafael J. Wysocki" <rafael@...nel.org>, Takashi Iwai <tiwai@...e.de>, 
	Uwe Kleine-König <u.kleine-koenig@...gutronix.de>
Subject: Re: [PATCH v1 5/6] platform: Modify platform_get_irq_optional() to
 use resource

> > +             *r = (struct resource)DEFINE_RES_IRQ(ret);
>
> Why is the annotation needed?

It's not needed anymore. I'll remove it.

> > -     struct resource *r;
> > +     struct resource *platform_res;
> >
> >       if (IS_ENABLED(CONFIG_OF_IRQ) && dev->dev.of_node) {
> > -             ret = of_irq_get(dev->dev.of_node, num);
> > +             ret = of_irq_to_resource(dev->dev.of_node, num, r);
> >               if (ret > 0 || ret == -EPROBE_DEFER)
> >                       goto out;
> >       }
>
>
> > +     if (has_acpi_companion(&dev->dev)) {
> > +             ret = acpi_irq_get(ACPI_HANDLE(&dev->dev), num, r);
> > +             if (!ret || ret == -EPROBE_DEFER) {
> > +                     ret = ret ?: r->start;
> > +                     goto out;
> > +             }
> > +     }
>
> Consider combine the above to use fwnode_irq_get() in the separate prerequisite
> change.

I like the idea. It doesn't look like 'struct fwnode_operations'
provides a way to retrieve information in a 'struct resource' format.
Perhaps this could be followed up on in a separate patch train?

>
> > +                     irqd_set_trigger_type(irqd, r->flags & IORESOURCE_BITS);
>
> NIH resource_type().
>
> > +     }
> >       return ret;

Does NIH mean "not invented here"? resource_type() masks
IORESOURCE_TYPE_BITS, not IORESOURCE_BITS. I'm not quite sure what you
mean here.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ