Re: [PATCH 06/13] media: davinci: vpif: Use platform_get_irq_optional() to get the interrupt

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi Andy,

On Thu, Jan 6, 2022 at 4:02 PM Andy Shevchenko
<andy.shevchenko@xxxxxxxxx> wrote:
>
> On Thu, Jan 6, 2022 at 5:27 PM Lad, Prabhakar
> <prabhakar.csengg@xxxxxxxxx> wrote:
> > On Thu, Jan 6, 2022 at 2:15 PM Andy Shevchenko
> > <andy.shevchenko@xxxxxxxxx> wrote:
> > > On Thu, Jan 6, 2022 at 3:43 PM Andy Shevchenko
> > > <andy.shevchenko@xxxxxxxxx> wrote:
> > > > On Wed, Jan 5, 2022 at 7:41 PM Lad, Prabhakar
> > > > <prabhakar.csengg@xxxxxxxxx> wrote:
> > > > > On Wed, Jan 5, 2022 at 9:43 AM Andy Shevchenko
>
> ...
>
> > > > >  #define DEFINE_RES_NAMED(_start, _size, _name, _flags)                 \
> > > > > -       {                                                               \
> > > > > +       (struct resource) {                                     \
> > > >
> > > > Yep, that's it.
> > > >
> > > > >                 .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?
> > > >
> > > > Nice! That's exactly my point and you can sell it to the community
> > > > because there are already users of it like this.
> > > >
> > > > Yes, I'm fine, but it seems it needs to be done treewide in one patch.
> > > > Btw, how many of those already in use?
> > >
> > > Actually you don't need to change that. It's an array of resources and
> > > everything should be kept as is there.
> > >
> > I do get below build failures, with the above literal change for
> > vexpress-sysreg.c.
> >
> > drivers/mfd/vexpress-sysreg.c: At top level:
> > drivers/mfd/vexpress-sysreg.c:64:37: error: initialiser element is not constant
> >    64 |   .resources = (struct resource []) {
> >       |                                     ^
> > drivers/mfd/vexpress-sysreg.c:64:37: note: (near initialisation for
> > ‘vexpress_sysreg_cells[0]’)
> > drivers/mfd/vexpress-sysreg.c:73:37: error: initialiser element is not constant
> >    73 |   .resources = (struct resource []) {
> >       |                                     ^
> > drivers/mfd/vexpress-sysreg.c:73:37: note: (near initialisation for
> > ‘vexpress_sysreg_cells[1]’)
> > drivers/mfd/vexpress-sysreg.c:82:37: error: initialiser element is not constant
> >    82 |   .resources = (struct resource []) {
> >       |                                     ^
> > drivers/mfd/vexpress-sysreg.c:82:37: note: (near initialisation for
> > ‘vexpress_sysreg_cells[2]’)
> > drivers/mfd/vexpress-sysreg.c:90:37: error: initialiser element is not constant
> >    90 |   .resources = (struct resource []) {
> >       |                                     ^
> > drivers/mfd/vexpress-sysreg.c:90:37: note: (near initialisation for
> > ‘vexpress_sysreg_cells[3]’)
> > drivers/mfd/vexpress-sysreg.c:93:2: warning: missing initialiser for
> > field ‘ignore_resource_conflicts’ of ‘struct mfd_cell’
> > [-Wmissing-field-initializers]
> >    93 |  }
>
> Hmm... Interesting, so I suppose the fix is to drop (struct resource
> []) parts from the driver?
>
A bit more than that like something below:

diff --git a/drivers/mfd/vexpress-sysreg.c b/drivers/mfd/vexpress-sysreg.c
index aaf24af287dd..eab82619ec31 100644
--- a/drivers/mfd/vexpress-sysreg.c
+++ b/drivers/mfd/vexpress-sysreg.c
@@ -61,35 +61,27 @@ static struct mfd_cell vexpress_sysreg_cells[] = {
  .name = "basic-mmio-gpio",
  .of_compatible = "arm,vexpress-sysreg,sys_led",
  .num_resources = 1,
- .resources = (struct resource []) {
- DEFINE_RES_MEM_NAMED(SYS_LED, 0x4, "dat"),
- },
+ .resources = &DEFINE_RES_MEM_NAMED(SYS_LED, 0x4, "dat"),
  .platform_data = &vexpress_sysreg_sys_led_pdata,
  .pdata_size = sizeof(vexpress_sysreg_sys_led_pdata),
  }, {
  .name = "basic-mmio-gpio",
  .of_compatible = "arm,vexpress-sysreg,sys_mci",
  .num_resources = 1,
- .resources = (struct resource []) {
- DEFINE_RES_MEM_NAMED(SYS_MCI, 0x4, "dat"),
- },
+ .resources = &DEFINE_RES_MEM_NAMED(SYS_MCI, 0x4, "dat"),
  .platform_data = &vexpress_sysreg_sys_mci_pdata,
  .pdata_size = sizeof(vexpress_sysreg_sys_mci_pdata),
  }, {
  .name = "basic-mmio-gpio",
  .of_compatible = "arm,vexpress-sysreg,sys_flash",
  .num_resources = 1,
- .resources = (struct resource []) {
- DEFINE_RES_MEM_NAMED(SYS_FLASH, 0x4, "dat"),
- },
+ .resources = &DEFINE_RES_MEM_NAMED(SYS_FLASH, 0x4, "dat"),
  .platform_data = &vexpress_sysreg_sys_flash_pdata,
  .pdata_size = sizeof(vexpress_sysreg_sys_flash_pdata),
  }, {
  .name = "vexpress-syscfg",
  .num_resources = 1,
- .resources = (struct resource []) {
- DEFINE_RES_MEM(SYS_MISC, 0x4c),
- },
+ .resources = &DEFINE_RES_MEM(SYS_MISC, 0x4c),
  }
 };

Cheers,
Prabhakar




[Index of Archives]     [Linux Samsung SOC]     [Linux Wireless]     [Linux Kernel]     [ATH6KL]     [Linux Bluetooth]     [Linux Netdev]     [Kernel Newbies]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Samba]     [Device Mapper]

  Powered by Linux