All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Lad, Prabhakar" <prabhakar.csengg@gmail.com>
To: Andy Shevchenko <andy.shevchenko@gmail.com>
Cc: Lad Prabhakar <prabhakar.mahadev-lad.rj@bp.renesas.com>,
	Linux Media Mailing List <linux-media@vger.kernel.org>,
	Mauro Carvalho Chehab <mchehab@kernel.org>,
	Hans Verkuil <hverkuil-cisco@xs4all.nl>,
	Rob Herring <robh+dt@kernel.org>,
	Linux Kernel Mailing List <linux-kernel@vger.kernel.org>,
	Linux-Renesas <linux-renesas-soc@vger.kernel.org>
Subject: Re: [PATCH 06/13] media: davinci: vpif: Use platform_get_irq_optional() to get the interrupt
Date: Wed, 5 Jan 2022 17:41:04 +0000	[thread overview]
Message-ID: <CA+V-a8uRqfs2h82_y6yk7MZnt8K5iKii5DZZpFgDDy0Hw2ieXA@mail.gmail.com> (raw)
In-Reply-To: <CAHp75Vck43wj650k70MsUNvmb+_-PUCd5mSy=dvmuX7MaAwr2w@mail.gmail.com>

Hi Andy,

On Wed, Jan 5, 2022 at 9:43 AM Andy Shevchenko
<andy.shevchenko@gmail.com> wrote:
>
> On Tue, Jan 4, 2022 at 7:23 PM Lad, Prabhakar
> <prabhakar.csengg@gmail.com> wrote:
> > On Sat, Dec 25, 2021 at 5:32 PM Andy Shevchenko
> > <andy.shevchenko@gmail.com> wrote:
> > > On Sat, Dec 25, 2021 at 3:04 AM Lad Prabhakar
> > > <prabhakar.mahadev-lad.rj@bp.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.
>
Thank you for the pointer. I did the below change for this.

diff --git a/include/linux/ioport.h b/include/linux/ioport.h
index 8359c50f9988..da1208e8f164 100644
--- a/include/linux/ioport.h
+++ b/include/linux/ioport.h
@@ -153,7 +153,7 @@ enum {

 /* helpers to define resources */
 #define DEFINE_RES_NAMED(_start, _size, _name, _flags)                 \
-       {                                                               \
+       (struct resource) {                                     \
                .start = (_start),                                      \
                .end = (_start) + (_size) - 1,                          \
                .name = (_name),                                        \

But there are some instances which need to be touched, for example
vexpress-sysreg.c [1]. Are you OK with files to be changed?

[1] https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/drivers/mfd/vexpress-sysreg.c?h=v5.16-rc8#n65

Cheers,
Prabhakar

  reply	other threads:[~2022-01-05 17:41 UTC|newest]

Thread overview: 40+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-12-23 17:30 [PATCH 00/13] media: Use platform_get_irq*() variants to fetch IRQ's Lad Prabhakar
2021-12-23 17:30 ` [PATCH 01/13] media: vsp1: Use platform_get_irq() to get the interrupt Lad Prabhakar
2021-12-30  0:06   ` Laurent Pinchart
2021-12-30 12:32     ` Lad, Prabhakar
2021-12-23 17:30 ` [PATCH 02/13] media: camss: Use platform_get_irq_byname() " Lad Prabhakar
2021-12-23 18:06   ` Bjorn Andersson
2021-12-23 17:30 ` [PATCH 03/13] media: bdisp: Use platform_get_irq() " Lad Prabhakar
2021-12-23 17:30 ` [PATCH 04/13] media: s5p-mfc: " Lad Prabhakar
2021-12-23 17:30   ` Lad Prabhakar
2021-12-28  8:42   ` Andrzej Hajda
2021-12-28  8:42     ` Andrzej Hajda
2021-12-23 17:30 ` [PATCH 05/13] media: stm32-dma2d: " Lad Prabhakar
2021-12-23 17:30   ` Lad Prabhakar
2021-12-23 17:30 ` [PATCH 06/13] media: davinci: vpif: Use platform_get_irq_optional() " Lad Prabhakar
2021-12-25 17:32   ` Andy Shevchenko
2022-01-04 17:22     ` Lad, Prabhakar
2022-01-05  9:42       ` Andy Shevchenko
2022-01-05 17:41         ` Lad, Prabhakar [this message]
2022-01-06 13:43           ` Andy Shevchenko
2022-01-06 14:14             ` Andy Shevchenko
2022-01-06 15:27               ` Lad, Prabhakar
2022-01-06 16:01                 ` Andy Shevchenko
2022-01-06 16:10                   ` Lad, Prabhakar
2022-01-06 16:28                     ` Andy Shevchenko
2022-01-06 16:46                       ` Lad, Prabhakar
2021-12-23 17:30 ` [PATCH 07/13] media: exynos-gsc: Use platform_get_irq() " Lad Prabhakar
2021-12-23 17:30   ` Lad Prabhakar
2021-12-23 17:30 ` [PATCH 08/13] media: marvell-ccic: " Lad Prabhakar
2021-12-23 17:30 ` [PATCH 09/13] media: mtk-vcodec: Drop unnecessary call to platform_get_resource() Lad Prabhakar
2021-12-23 17:30   ` Lad Prabhakar
2021-12-23 17:30   ` Lad Prabhakar
2021-12-23 17:30 ` [PATCH 10/13] media: exynos4-is: Use platform_get_irq() to get the interrupt Lad Prabhakar
2021-12-23 17:30   ` Lad Prabhakar
2021-12-23 17:30 ` [PATCH 11/13] media: s5p-g2d: " Lad Prabhakar
2021-12-23 17:30   ` Lad Prabhakar
2021-12-23 17:30 ` [PATCH 12/13] media: mtk-vpu: Drop unnecessary call to platform_get_resource() Lad Prabhakar
2021-12-23 17:30   ` Lad Prabhakar
2021-12-23 17:30   ` Lad Prabhakar
2021-12-23 17:30 ` [PATCH 13/13] media: coda: Use platform_get_irq() to get the interrupt Lad Prabhakar
2021-12-23 17:30   ` Lad Prabhakar

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=CA+V-a8uRqfs2h82_y6yk7MZnt8K5iKii5DZZpFgDDy0Hw2ieXA@mail.gmail.com \
    --to=prabhakar.csengg@gmail.com \
    --cc=andy.shevchenko@gmail.com \
    --cc=hverkuil-cisco@xs4all.nl \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-media@vger.kernel.org \
    --cc=linux-renesas-soc@vger.kernel.org \
    --cc=mchehab@kernel.org \
    --cc=prabhakar.mahadev-lad.rj@bp.renesas.com \
    --cc=robh+dt@kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.