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:   Wed, 5 Jan 2022 11:42:43 +0200
From:   Andy Shevchenko <andy.shevchenko@...il.com>
To:     "Lad, Prabhakar" <prabhakar.csengg@...il.com>
Cc:     Lad Prabhakar <prabhakar.mahadev-lad.rj@...renesas.com>,
        Linux Media Mailing List <linux-media@...r.kernel.org>,
        Mauro Carvalho Chehab <mchehab@...nel.org>,
        Hans Verkuil <hverkuil-cisco@...all.nl>,
        Rob Herring <robh+dt@...nel.org>,
        Linux Kernel Mailing List <linux-kernel@...r.kernel.org>,
        Linux-Renesas <linux-renesas-soc@...r.kernel.org>
Subject: Re: [PATCH 06/13] media: davinci: vpif: Use platform_get_irq_optional()
 to get the interrupt

On Tue, Jan 4, 2022 at 7:23 PM Lad, Prabhakar
<prabhakar.csengg@...il.com> wrote:
> On Sat, Dec 25, 2021 at 5:32 PM Andy Shevchenko
> <andy.shevchenko@...il.com> wrote:
> > On Sat, Dec 25, 2021 at 3:04 AM Lad Prabhakar
> > <prabhakar.mahadev-lad.rj@...renesas.com> wrote:

...

> > > +       res_irq->flags = IORESOURCE_IRQ | irq_get_trigger_type(irq);
> > > +       res_irq->start = irq;
> > > +       res_irq->end = irq;
> > > +       res_irq->name = dev_of_node(&pdev->dev) ? of_node_full_name(pdev->dev.of_node) : NULL;
> >
> > If you convert DEFINE_RES_NAMED() to return a compound literal, then
> > you may use it here like
> >
> > res_irq = DEFINE_RES_NAMED(...);
> >
> > or even do like this
> >
> > if (dev_of_node(...))
> >   res_irq = DEFINE_RES_IRQ_NAMED(...)
> > else
> >   res_irq = DEFINE_RES_IRQ(...);
> > res_irq->flags |= irq_get_trigger_type(irq);
> >
> There are quite a few users of DEFINE_RES_IRQ_NAMED()/DEFINE_RES_IRQ()
> changing this macos just for this single user tree wide doesn't make
> sense. Let me know if you think otherwise.

Converting them to produce compound literal is straightforward and
does not require changes in the users. But on the other hand it allows
you to use it and convert existing users to use that form directly.
You may conduct research on how macros in the property.h were morphing
towards that.

> > I'm not sure why you can't simply use the NAMED variant in both cases
> > (yes, I see that of_node_full_name() will return something, not NULL).

-- 
With Best Regards,
Andy Shevchenko

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ