Re: [PATCH v2 7/9] gpio: mockup: pass the chip label as device property

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

 



On Mon, Sep 28, 2020 at 04:52:25PM +0200, Bartosz Golaszewski wrote:
> On Mon, Sep 28, 2020 at 4:00 PM Andy Shevchenko
> <andriy.shevchenko@xxxxxxxxxxxxxxx> wrote:
> > On Mon, Sep 28, 2020 at 03:13:53PM +0200, Bartosz Golaszewski wrote:
> > > On Mon, Sep 28, 2020 at 3:00 PM Andy Shevchenko
> > > <andriy.shevchenko@xxxxxxxxxxxxxxx> wrote:
> > > > On Mon, Sep 28, 2020 at 12:41:53PM +0200, Bartosz Golaszewski wrote:

...

> > > > how do you avoid overflow?
> > >
> > > I renamed the property, the previous "chip-name" is no longer used. In
> > > fact it was never used but was accounted for in GPIO_MOCKUP_MAX_PROP.
> >
> > Either I'm missing something or...
> >
> > Current code in linux-next has 3 properties to be possible
> >
> > PROPERTY_ENTRY_U32("gpio-base", base);
> > PROPERTY_ENTRY_U16("nr-gpios", ngpio);
> > PROPERTY_ENTRY_BOOL("named-gpio-lines");
> >
> > You adding here
> > PROPERTY_ENTRY_STRING("chip-label", chip_label);
> >
> > Altogether after this patch is 4 which is maximum, but since array is passed by
> > a solely pointer, the terminator is a must.
> >
> 
> Thanks for explaining my code to me. Yes you're right and I'm not sure
> why I missed this. :)
> 
> I'll fix this in v3.
> 
> Actually this means the code is wrong even before this series - it's
> just that we don't use the "chip-name" property.

Right, you patch just exposed it.

-- 
With Best Regards,
Andy Shevchenko





[Index of Archives]     [Linux SPI]     [Linux Kernel]     [Linux ARM (vger)]     [Linux ARM MSM]     [Linux Omap]     [Linux Arm]     [Linux Tegra]     [Fedora ARM]     [Linux for Samsung SOC]     [eCos]     [Linux Fastboot]     [Gcc Help]     [Git]     [DCCP]     [IETF Announce]     [Security]     [Linux MIPS]     [Yosemite Campsites]

  Powered by Linux