2023-05-24 13:19:25

by Henning Schild

[permalink] [raw]
Subject: [PATCH v4 1/4] leds: simatic-ipc-leds-gpio: add terminating entries to gpio tables

The entries do not seem to be stricly needed when the number of entries
is given via the number of LEDs. But adding them is a safeguard should
anyone ever iterate over the tables to their end, it also gets us in
line with other drivers that register "leds-gpio" tables.

Signed-off-by: Henning Schild <[email protected]>
---
drivers/leds/simple/simatic-ipc-leds-gpio.c | 2 ++
1 file changed, 2 insertions(+)

diff --git a/drivers/leds/simple/simatic-ipc-leds-gpio.c b/drivers/leds/simple/simatic-ipc-leds-gpio.c
index e8d329b5a68c..1a1cfdad6218 100644
--- a/drivers/leds/simple/simatic-ipc-leds-gpio.c
+++ b/drivers/leds/simple/simatic-ipc-leds-gpio.c
@@ -28,6 +28,7 @@ static struct gpiod_lookup_table simatic_ipc_led_gpio_table_127e = {
GPIO_LOOKUP_IDX("apollolake-pinctrl.0", 51, NULL, 5, GPIO_ACTIVE_LOW),
GPIO_LOOKUP_IDX("apollolake-pinctrl.0", 56, NULL, 6, GPIO_ACTIVE_LOW),
GPIO_LOOKUP_IDX("apollolake-pinctrl.0", 59, NULL, 7, GPIO_ACTIVE_HIGH),
+ {} /* Terminating entry */
},
};

@@ -42,6 +43,7 @@ static struct gpiod_lookup_table simatic_ipc_led_gpio_table_227g = {
GPIO_LOOKUP_IDX("gpio-f7188x-2", 5, NULL, 5, GPIO_ACTIVE_LOW),
GPIO_LOOKUP_IDX("gpio-f7188x-3", 6, NULL, 6, GPIO_ACTIVE_HIGH),
GPIO_LOOKUP_IDX("gpio-f7188x-3", 7, NULL, 7, GPIO_ACTIVE_HIGH),
+ {} /* Terminating entry */
}
};

--
2.39.3



2023-05-27 09:22:26

by Andy Shevchenko

[permalink] [raw]
Subject: Re: [PATCH v4 1/4] leds: simatic-ipc-leds-gpio: add terminating entries to gpio tables

On Wed, May 24, 2023 at 02:46:25PM +0200, Henning Schild wrote:
> The entries do not seem to be stricly needed when the number of entries
> is given via the number of LEDs. But adding them is a safeguard should
> anyone ever iterate over the tables to their end, it also gets us in
> line with other drivers that register "leds-gpio" tables.

Reported-by?
Reviewed-by: Andy Shevchenko <[email protected]>

> Signed-off-by: Henning Schild <[email protected]>
> ---
> drivers/leds/simple/simatic-ipc-leds-gpio.c | 2 ++
> 1 file changed, 2 insertions(+)
>
> diff --git a/drivers/leds/simple/simatic-ipc-leds-gpio.c b/drivers/leds/simple/simatic-ipc-leds-gpio.c
> index e8d329b5a68c..1a1cfdad6218 100644
> --- a/drivers/leds/simple/simatic-ipc-leds-gpio.c
> +++ b/drivers/leds/simple/simatic-ipc-leds-gpio.c
> @@ -28,6 +28,7 @@ static struct gpiod_lookup_table simatic_ipc_led_gpio_table_127e = {
> GPIO_LOOKUP_IDX("apollolake-pinctrl.0", 51, NULL, 5, GPIO_ACTIVE_LOW),
> GPIO_LOOKUP_IDX("apollolake-pinctrl.0", 56, NULL, 6, GPIO_ACTIVE_LOW),
> GPIO_LOOKUP_IDX("apollolake-pinctrl.0", 59, NULL, 7, GPIO_ACTIVE_HIGH),
> + {} /* Terminating entry */
> },
> };
>
> @@ -42,6 +43,7 @@ static struct gpiod_lookup_table simatic_ipc_led_gpio_table_227g = {
> GPIO_LOOKUP_IDX("gpio-f7188x-2", 5, NULL, 5, GPIO_ACTIVE_LOW),
> GPIO_LOOKUP_IDX("gpio-f7188x-3", 6, NULL, 6, GPIO_ACTIVE_HIGH),
> GPIO_LOOKUP_IDX("gpio-f7188x-3", 7, NULL, 7, GPIO_ACTIVE_HIGH),
> + {} /* Terminating entry */
> }
> };
>
> --
> 2.39.3
>

--
With Best Regards,
Andy Shevchenko



2023-05-30 15:28:42

by Henning Schild

[permalink] [raw]
Subject: Re: [PATCH v4 1/4] leds: simatic-ipc-leds-gpio: add terminating entries to gpio tables

Am Sat, 27 May 2023 11:54:08 +0300
schrieb Andy Shevchenko <[email protected]>:

> On Wed, May 24, 2023 at 02:46:25PM +0200, Henning Schild wrote:
> > The entries do not seem to be stricly needed when the number of
> > entries is given via the number of LEDs. But adding them is a
> > safeguard should anyone ever iterate over the tables to their end,
> > it also gets us in line with other drivers that register
> > "leds-gpio" tables.
>
> Reported-by?
> Reviewed-by: Andy Shevchenko <[email protected]>

I think we could do

Reported-by: Andy Shevchenko <[email protected]>

on merge. But i would not want to send the whole series again for that
one line.

Thanks!
Henning

> > Signed-off-by: Henning Schild <[email protected]>
> > ---
> > drivers/leds/simple/simatic-ipc-leds-gpio.c | 2 ++
> > 1 file changed, 2 insertions(+)
> >
> > diff --git a/drivers/leds/simple/simatic-ipc-leds-gpio.c
> > b/drivers/leds/simple/simatic-ipc-leds-gpio.c index
> > e8d329b5a68c..1a1cfdad6218 100644 ---
> > a/drivers/leds/simple/simatic-ipc-leds-gpio.c +++
> > b/drivers/leds/simple/simatic-ipc-leds-gpio.c @@ -28,6 +28,7 @@
> > static struct gpiod_lookup_table simatic_ipc_led_gpio_table_127e =
> > { GPIO_LOOKUP_IDX("apollolake-pinctrl.0", 51, NULL, 5,
> > GPIO_ACTIVE_LOW), GPIO_LOOKUP_IDX("apollolake-pinctrl.0", 56, NULL,
> > 6, GPIO_ACTIVE_LOW), GPIO_LOOKUP_IDX("apollolake-pinctrl.0", 59,
> > NULL, 7, GPIO_ACTIVE_HIGH),
> > + {} /* Terminating entry */
> > },
> > };
> >
> > @@ -42,6 +43,7 @@ static struct gpiod_lookup_table
> > simatic_ipc_led_gpio_table_227g = {
> > GPIO_LOOKUP_IDX("gpio-f7188x-2", 5, NULL, 5, GPIO_ACTIVE_LOW),
> > GPIO_LOOKUP_IDX("gpio-f7188x-3", 6, NULL, 6, GPIO_ACTIVE_HIGH),
> > GPIO_LOOKUP_IDX("gpio-f7188x-3", 7, NULL, 7, GPIO_ACTIVE_HIGH),
> > + {} /* Terminating entry */
> > }
> > };
> >
> > --
> > 2.39.3
> >
>


2023-06-01 16:52:41

by Andy Shevchenko

[permalink] [raw]
Subject: Re: [PATCH v4 1/4] leds: simatic-ipc-leds-gpio: add terminating entries to gpio tables

On Tue, May 30, 2023 at 05:11:00PM +0200, Henning Schild wrote:
> Am Sat, 27 May 2023 11:54:08 +0300
> schrieb Andy Shevchenko <[email protected]>:
>
> > On Wed, May 24, 2023 at 02:46:25PM +0200, Henning Schild wrote:
> > > The entries do not seem to be stricly needed when the number of
> > > entries is given via the number of LEDs. But adding them is a
> > > safeguard should anyone ever iterate over the tables to their end,
> > > it also gets us in line with other drivers that register
> > > "leds-gpio" tables.
> >
> > Reported-by?
> > Reviewed-by: Andy Shevchenko <[email protected]>
>
> I think we could do
>
> Reported-by: Andy Shevchenko <[email protected]>
>
> on merge. But i would not want to send the whole series again for that
> one line.

Since you added it, `b4` will happily take it, I believe no manual work even
needed for that, thank you!

--
With Best Regards,
Andy Shevchenko



2023-06-08 17:33:03

by Lee Jones

[permalink] [raw]
Subject: Re: [PATCH v4 1/4] leds: simatic-ipc-leds-gpio: add terminating entries to gpio tables

On Wed, 24 May 2023, Henning Schild wrote:

> The entries do not seem to be stricly needed when the number of entries
> is given via the number of LEDs. But adding them is a safeguard should
> anyone ever iterate over the tables to their end, it also gets us in
> line with other drivers that register "leds-gpio" tables.
>
> Signed-off-by: Henning Schild <[email protected]>
> ---
> drivers/leds/simple/simatic-ipc-leds-gpio.c | 2 ++
> 1 file changed, 2 insertions(+)

Applied, thanks

--
Lee Jones [李琼斯]

2023-06-08 17:53:46

by Lee Jones

[permalink] [raw]
Subject: Re: [PATCH v4 1/4] leds: simatic-ipc-leds-gpio: add terminating entries to gpio tables

On Thu, 01 Jun 2023, Andy Shevchenko wrote:

> On Tue, May 30, 2023 at 05:11:00PM +0200, Henning Schild wrote:
> > Am Sat, 27 May 2023 11:54:08 +0300
> > schrieb Andy Shevchenko <[email protected]>:
> >
> > > On Wed, May 24, 2023 at 02:46:25PM +0200, Henning Schild wrote:
> > > > The entries do not seem to be stricly needed when the number of
> > > > entries is given via the number of LEDs. But adding them is a
> > > > safeguard should anyone ever iterate over the tables to their end,
> > > > it also gets us in line with other drivers that register
> > > > "leds-gpio" tables.
> > >
> > > Reported-by?
> > > Reviewed-by: Andy Shevchenko <[email protected]>
> >
> > I think we could do
> >
> > Reported-by: Andy Shevchenko <[email protected]>
> >
> > on merge. But i would not want to send the whole series again for that
> > one line.
>
> Since you added it, `b4` will happily take it, I believe no manual work even
> needed for that, thank you!

b4 didn't pick this up. Nor the whole-series Ack provided by Hans.

I added both manually.

--
Lee Jones [李琼斯]

2023-06-09 14:30:41

by Andy Shevchenko

[permalink] [raw]
Subject: Re: [PATCH v4 1/4] leds: simatic-ipc-leds-gpio: add terminating entries to gpio tables

On Thu, Jun 08, 2023 at 06:30:27PM +0100, Lee Jones wrote:
> On Thu, 01 Jun 2023, Andy Shevchenko wrote:
> > On Tue, May 30, 2023 at 05:11:00PM +0200, Henning Schild wrote:
> > > Am Sat, 27 May 2023 11:54:08 +0300
> > > schrieb Andy Shevchenko <[email protected]>:
> > >
> > > > On Wed, May 24, 2023 at 02:46:25PM +0200, Henning Schild wrote:
> > > > > The entries do not seem to be stricly needed when the number of
> > > > > entries is given via the number of LEDs. But adding them is a
> > > > > safeguard should anyone ever iterate over the tables to their end,
> > > > > it also gets us in line with other drivers that register
> > > > > "leds-gpio" tables.
> > > >
> > > > Reported-by?
> > > > Reviewed-by: Andy Shevchenko <[email protected]>
> > >
> > > I think we could do
> > >
> > > Reported-by: Andy Shevchenko <[email protected]>
> > >
> > > on merge. But i would not want to send the whole series again for that
> > > one line.
> >
> > Since you added it, `b4` will happily take it, I believe no manual work even
> > needed for that, thank you!
>
> b4 didn't pick this up. Nor the whole-series Ack provided by Hans.
>
> I added both manually.

There is an option to take this

-t, --apply-cover-trailers
Apply trailers sent to the cover letter to all patches

have you tried it?

--
With Best Regards,
Andy Shevchenko



2023-06-12 11:41:20

by Lee Jones

[permalink] [raw]
Subject: Re: [PATCH v4 1/4] leds: simatic-ipc-leds-gpio: add terminating entries to gpio tables

On Mon, 12 Jun 2023, Lee Jones wrote:

> On Fri, 09 Jun 2023, Andy Shevchenko wrote:
>
> > On Thu, Jun 08, 2023 at 06:30:27PM +0100, Lee Jones wrote:
> > > On Thu, 01 Jun 2023, Andy Shevchenko wrote:
> > > > On Tue, May 30, 2023 at 05:11:00PM +0200, Henning Schild wrote:
> > > > > Am Sat, 27 May 2023 11:54:08 +0300
> > > > > schrieb Andy Shevchenko <[email protected]>:
> > > > >
> > > > > > On Wed, May 24, 2023 at 02:46:25PM +0200, Henning Schild wrote:
> > > > > > > The entries do not seem to be stricly needed when the number of
> > > > > > > entries is given via the number of LEDs. But adding them is a
> > > > > > > safeguard should anyone ever iterate over the tables to their end,
> > > > > > > it also gets us in line with other drivers that register
> > > > > > > "leds-gpio" tables.
> > > > > >
> > > > > > Reported-by?
> > > > > > Reviewed-by: Andy Shevchenko <[email protected]>
> > > > >
> > > > > I think we could do
> > > > >
> > > > > Reported-by: Andy Shevchenko <[email protected]>
> > > > >
> > > > > on merge. But i would not want to send the whole series again for that
> > > > > one line.
> > > >
> > > > Since you added it, `b4` will happily take it, I believe no manual work even
> > > > needed for that, thank you!
> > >
> > > b4 didn't pick this up. Nor the whole-series Ack provided by Hans.
> > >
> > > I added both manually.
> >
> > There is an option to take this
> >
> > -t, --apply-cover-trailers
> > Apply trailers sent to the cover letter to all patches
> >
> > have you tried it?
>
> Doesn't look like it:
>
> b4 am -3 -slt -P_ -o - ${id} | git am -3 --reject

No wait - it's there.

> Can't remember if I had it before then removed it, or never had it.
>
> I'll attempt to add it now and see what happens.

--
Lee Jones [李琼斯]

2023-06-12 11:41:45

by Lee Jones

[permalink] [raw]
Subject: Re: [PATCH v4 1/4] leds: simatic-ipc-leds-gpio: add terminating entries to gpio tables

On Fri, 09 Jun 2023, Andy Shevchenko wrote:

> On Thu, Jun 08, 2023 at 06:30:27PM +0100, Lee Jones wrote:
> > On Thu, 01 Jun 2023, Andy Shevchenko wrote:
> > > On Tue, May 30, 2023 at 05:11:00PM +0200, Henning Schild wrote:
> > > > Am Sat, 27 May 2023 11:54:08 +0300
> > > > schrieb Andy Shevchenko <[email protected]>:
> > > >
> > > > > On Wed, May 24, 2023 at 02:46:25PM +0200, Henning Schild wrote:
> > > > > > The entries do not seem to be stricly needed when the number of
> > > > > > entries is given via the number of LEDs. But adding them is a
> > > > > > safeguard should anyone ever iterate over the tables to their end,
> > > > > > it also gets us in line with other drivers that register
> > > > > > "leds-gpio" tables.
> > > > >
> > > > > Reported-by?
> > > > > Reviewed-by: Andy Shevchenko <[email protected]>
> > > >
> > > > I think we could do
> > > >
> > > > Reported-by: Andy Shevchenko <[email protected]>
> > > >
> > > > on merge. But i would not want to send the whole series again for that
> > > > one line.
> > >
> > > Since you added it, `b4` will happily take it, I believe no manual work even
> > > needed for that, thank you!
> >
> > b4 didn't pick this up. Nor the whole-series Ack provided by Hans.
> >
> > I added both manually.
>
> There is an option to take this
>
> -t, --apply-cover-trailers
> Apply trailers sent to the cover letter to all patches
>
> have you tried it?

Doesn't look like it:

b4 am -3 -slt -P_ -o - ${id} | git am -3 --reject

Can't remember if I had it before then removed it, or never had it.

I'll attempt to add it now and see what happens.

--
Lee Jones [李琼斯]