* [PATCH] net: ethernet: ti: davinci_mdio: Drop commas after match table sentinels
@ 2026-09-03 12:06 Geert Uytterhoeven
2026-09-03 12:30 ` Siddharth Vadapalli
2026-09-03 14:38 ` Andrew Lunn
0 siblings, 2 replies; 7+ messages in thread
From: Geert Uytterhoeven @ 2026-09-03 12:06 UTC (permalink / raw)
To: Siddharth Vadapalli, Roger Quadros, Andrew Lunn, David S . Miller,
Eric Dumazet, Jakub Kicinski, Paolo Abeni
Cc: linux-omap, netdev, linux-kernel, Geert Uytterhoeven
It does not make sense to have a comma after a sentinel, as any new
elements must be added before the sentinel.
Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
---
drivers/net/ethernet/ti/davinci_mdio.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/net/ethernet/ti/davinci_mdio.c b/drivers/net/ethernet/ti/davinci_mdio.c
index 48f85a3649b26548..5bec72f2f51dc548 100644
--- a/drivers/net/ethernet/ti/davinci_mdio.c
+++ b/drivers/net/ethernet/ti/davinci_mdio.c
@@ -510,7 +510,7 @@ static const struct soc_device_attribute k3_mdio_socinfo[] = {
{ .family = "J7200", .data = &am65_mdio_soc_data },
{ .family = "J721E", .data = &am65_mdio_soc_data },
{ .family = "J721S2", .data = &am65_mdio_soc_data },
- { /* sentinel */ },
+ { /* sentinel */ }
};
#if IS_ENABLED(CONFIG_OF)
@@ -521,7 +521,7 @@ static const struct davinci_mdio_of_param of_cpsw_mdio_data = {
static const struct of_device_id davinci_mdio_of_mtable[] = {
{ .compatible = "ti,davinci_mdio", },
{ .compatible = "ti,cpsw-mdio", .data = &of_cpsw_mdio_data},
- { /* sentinel */ },
+ { /* sentinel */ }
};
MODULE_DEVICE_TABLE(of, davinci_mdio_of_mtable);
#endif
--
2.43.0
^ permalink raw reply related [flat|nested] 7+ messages in thread* Re: [PATCH] net: ethernet: ti: davinci_mdio: Drop commas after match table sentinels
2026-09-03 12:06 [PATCH] net: ethernet: ti: davinci_mdio: Drop commas after match table sentinels Geert Uytterhoeven
@ 2026-09-03 12:30 ` Siddharth Vadapalli
2026-09-04 4:47 ` Siddharth Vadapalli
2026-09-03 14:38 ` Andrew Lunn
1 sibling, 1 reply; 7+ messages in thread
From: Siddharth Vadapalli @ 2026-09-03 12:30 UTC (permalink / raw)
To: Geert Uytterhoeven
Cc: Roger Quadros, Andrew Lunn, David S . Miller, Eric Dumazet,
Jakub Kicinski, Paolo Abeni, linux-omap, netdev, linux-kernel,
s-vadapalli
On 03/09/26 17:36, Geert Uytterhoeven wrote:
> It does not make sense to have a comma after a sentinel, as any new
> elements must be added before the sentinel.
While I agree with it, this seems to require a 'cleanup-series' rather than
an individual patch, given the following statistics:
As of [0], running
git grep "sentinel.*}" drivers/net/ | wc -l
gives
84
and looking for the ones that terminate in a comma by running
git grep "sentinel.*}," drivers/net/ | wc -l
gives
38
So there are '37' other instances (apart from davinci_mdio.c) in
drivers/net alone that require a cleanup.
Looking at Linux overall by running
git grep "sentinel.*}," | wc -l
gives
396
Since this isn't a functional change, I am not sure why a specific change
is required in davinci_mdio.c, unless you plan to cleanup the remaining
'395' occurrences in the remaining code as well. I am not against the
patch, but the reason for picking just davinci_mdio.c for cleanup isn't
clear to me based on the commit message.
[0]: commit 940de590b839 Merge tag 'hardening-v7.3-rc2' of
git://git.kernel.org/pub/scm/linux/kernel/git/kees/linux
>
> Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
> ---
> drivers/net/ethernet/ti/davinci_mdio.c | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/net/ethernet/ti/davinci_mdio.c b/drivers/net/ethernet/ti/davinci_mdio.c
> index 48f85a3649b26548..5bec72f2f51dc548 100644
> --- a/drivers/net/ethernet/ti/davinci_mdio.c
> +++ b/drivers/net/ethernet/ti/davinci_mdio.c
> @@ -510,7 +510,7 @@ static const struct soc_device_attribute k3_mdio_socinfo[] = {
> { .family = "J7200", .data = &am65_mdio_soc_data },
> { .family = "J721E", .data = &am65_mdio_soc_data },
> { .family = "J721S2", .data = &am65_mdio_soc_data },
> - { /* sentinel */ },
> + { /* sentinel */ }
> };
>
> #if IS_ENABLED(CONFIG_OF)
> @@ -521,7 +521,7 @@ static const struct davinci_mdio_of_param of_cpsw_mdio_data = {
> static const struct of_device_id davinci_mdio_of_mtable[] = {
> { .compatible = "ti,davinci_mdio", },
> { .compatible = "ti,cpsw-mdio", .data = &of_cpsw_mdio_data},
> - { /* sentinel */ },
> + { /* sentinel */ }
> };
> MODULE_DEVICE_TABLE(of, davinci_mdio_of_mtable);
> #endif
Regards,
Siddharth.
^ permalink raw reply [flat|nested] 7+ messages in thread* Re: [PATCH] net: ethernet: ti: davinci_mdio: Drop commas after match table sentinels
2026-09-03 12:30 ` Siddharth Vadapalli
@ 2026-09-04 4:47 ` Siddharth Vadapalli
2026-09-04 7:20 ` Geert Uytterhoeven
0 siblings, 1 reply; 7+ messages in thread
From: Siddharth Vadapalli @ 2026-09-04 4:47 UTC (permalink / raw)
To: Geert Uytterhoeven
Cc: Roger Quadros, Andrew Lunn, David S . Miller, Eric Dumazet,
Jakub Kicinski, Paolo Abeni, linux-omap, netdev, linux-kernel,
s-vadapalli
On 03/09/26 18:00, Siddharth Vadapalli wrote:
> On 03/09/26 17:36, Geert Uytterhoeven wrote:
>> It does not make sense to have a comma after a sentinel, as any new
>> elements must be added before the sentinel.
>
> While I agree with it, this seems to require a 'cleanup-series' rather than
> an individual patch, given the following statistics:
>
> As of [0], running
> git grep "sentinel.*}" drivers/net/ | wc -l
> gives
> 84
> and looking for the ones that terminate in a comma by running
> git grep "sentinel.*}," drivers/net/ | wc -l
> gives
> 38
>
> So there are '37' other instances (apart from davinci_mdio.c) in
> drivers/net alone that require a cleanup.
I have posted the following series to cleanup all networking drivers
(excluding davinci_mdio.c since that is done by your patch) at:
https://lore.kernel.org/r/20260904043724.2955444-1-s-vadapalli@ti.com/
Regards,
Siddharth.
>
> Looking at Linux overall by running
> git grep "sentinel.*}," | wc -l
> gives
> 396
>
> Since this isn't a functional change, I am not sure why a specific change
> is required in davinci_mdio.c, unless you plan to cleanup the remaining
> '395' occurrences in the remaining code as well. I am not against the
> patch, but the reason for picking just davinci_mdio.c for cleanup isn't
> clear to me based on the commit message.
>
>
> [0]: commit 940de590b839 Merge tag 'hardening-v7.3-rc2' of git://
> git.kernel.org/pub/scm/linux/kernel/git/kees/linux
>
>>
>> Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
>> ---
>> drivers/net/ethernet/ti/davinci_mdio.c | 4 ++--
>> 1 file changed, 2 insertions(+), 2 deletions(-)
>>
>> diff --git a/drivers/net/ethernet/ti/davinci_mdio.c b/drivers/net/
>> ethernet/ti/davinci_mdio.c
>> index 48f85a3649b26548..5bec72f2f51dc548 100644
>> --- a/drivers/net/ethernet/ti/davinci_mdio.c
>> +++ b/drivers/net/ethernet/ti/davinci_mdio.c
>> @@ -510,7 +510,7 @@ static const struct soc_device_attribute
>> k3_mdio_socinfo[] = {
>> { .family = "J7200", .data = &am65_mdio_soc_data },
>> { .family = "J721E", .data = &am65_mdio_soc_data },
>> { .family = "J721S2", .data = &am65_mdio_soc_data },
>> - { /* sentinel */ },
>> + { /* sentinel */ }
>> };
>> #if IS_ENABLED(CONFIG_OF)
>> @@ -521,7 +521,7 @@ static const struct davinci_mdio_of_param
>> of_cpsw_mdio_data = {
>> static const struct of_device_id davinci_mdio_of_mtable[] = {
>> { .compatible = "ti,davinci_mdio", },
>> { .compatible = "ti,cpsw-mdio", .data = &of_cpsw_mdio_data},
>> - { /* sentinel */ },
>> + { /* sentinel */ }
>> };
>> MODULE_DEVICE_TABLE(of, davinci_mdio_of_mtable);
>> #endif
>
> Regards,
> Siddharth.
^ permalink raw reply [flat|nested] 7+ messages in thread* Re: [PATCH] net: ethernet: ti: davinci_mdio: Drop commas after match table sentinels
2026-09-04 4:47 ` Siddharth Vadapalli
@ 2026-09-04 7:20 ` Geert Uytterhoeven
2026-09-04 7:28 ` Siddharth Vadapalli
0 siblings, 1 reply; 7+ messages in thread
From: Geert Uytterhoeven @ 2026-09-04 7:20 UTC (permalink / raw)
To: Siddharth Vadapalli, Roger Quadros
Cc: Andrew Lunn, David S . Miller, Eric Dumazet, Jakub Kicinski,
Paolo Abeni, linux-omap, netdev, linux-kernel
On Fri, 4 Sept 2026 at 06:44, Siddharth Vadapalli <s-vadapalli@ti.com> wrote:
> On 03/09/26 18:00, Siddharth Vadapalli wrote:
> > On 03/09/26 17:36, Geert Uytterhoeven wrote:
> >> It does not make sense to have a comma after a sentinel, as any new
> >> elements must be added before the sentinel.
> >
> > While I agree with it, this seems to require a 'cleanup-series' rather than
> > an individual patch, given the following statistics:
> >
> > As of [0], running
> > git grep "sentinel.*}" drivers/net/ | wc -l
> > gives
> > 84
> > and looking for the ones that terminate in a comma by running
> > git grep "sentinel.*}," drivers/net/ | wc -l
> > gives
> > 38
> >
> > So there are '37' other instances (apart from davinci_mdio.c) in
> > drivers/net alone that require a cleanup.
[...]
> > Since this isn't a functional change, I am not sure why a specific change
> > is required in davinci_mdio.c, unless you plan to cleanup the remaining
> > '395' occurrences in the remaining code as well. I am not against the
> > patch, but the reason for picking just davinci_mdio.c for cleanup isn't
> > clear to me based on the commit message.
I know. Over the past few years, I fixed several of them I encountered,
but never got to fixing all of them. After rc1, I flushed a few patches
that could be sent independently, so there it was!
> I have posted the following series to cleanup all networking drivers
> (excluding davinci_mdio.c since that is done by your patch) at:
> https://lore.kernel.org/r/20260904043724.2955444-1-s-vadapalli@ti.com/
Happy to see my single patch triggered your great response!
Thanks!
Gr{oetje,eeting}s,
Geert
--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org
In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
-- Linus Torvalds
^ permalink raw reply [flat|nested] 7+ messages in thread* Re: [PATCH] net: ethernet: ti: davinci_mdio: Drop commas after match table sentinels
2026-09-04 7:20 ` Geert Uytterhoeven
@ 2026-09-04 7:28 ` Siddharth Vadapalli
0 siblings, 0 replies; 7+ messages in thread
From: Siddharth Vadapalli @ 2026-09-04 7:28 UTC (permalink / raw)
To: Geert Uytterhoeven
Cc: Roger Quadros, Andrew Lunn, David S . Miller, Eric Dumazet,
Jakub Kicinski, Paolo Abeni, linux-omap, netdev, linux-kernel,
s-vadapalli
On 04/09/26 12:50, Geert Uytterhoeven wrote:
> On Fri, 4 Sept 2026 at 06:44, Siddharth Vadapalli <s-vadapalli@ti.com> wrote:
>> On 03/09/26 18:00, Siddharth Vadapalli wrote:
>>> On 03/09/26 17:36, Geert Uytterhoeven wrote:
>>>> It does not make sense to have a comma after a sentinel, as any new
>>>> elements must be added before the sentinel.
>>>
>>> While I agree with it, this seems to require a 'cleanup-series' rather than
>>> an individual patch, given the following statistics:
>>>
>>> As of [0], running
>>> git grep "sentinel.*}" drivers/net/ | wc -l
>>> gives
>>> 84
>>> and looking for the ones that terminate in a comma by running
>>> git grep "sentinel.*}," drivers/net/ | wc -l
>>> gives
>>> 38
>>>
>>> So there are '37' other instances (apart from davinci_mdio.c) in
>>> drivers/net alone that require a cleanup.
>
> [...]
>
>>> Since this isn't a functional change, I am not sure why a specific change
>>> is required in davinci_mdio.c, unless you plan to cleanup the remaining
>>> '395' occurrences in the remaining code as well. I am not against the
>>> patch, but the reason for picking just davinci_mdio.c for cleanup isn't
>>> clear to me based on the commit message.
>
> I know. Over the past few years, I fixed several of them I encountered,
> but never got to fixing all of them. After rc1, I flushed a few patches
> that could be sent independently, so there it was!
Thank you for providing the context for the current patch.
>
>> I have posted the following series to cleanup all networking drivers
>> (excluding davinci_mdio.c since that is done by your patch) at:
>> https://lore.kernel.org/r/20260904043724.2955444-1-s-vadapalli@ti.com/
>
> Happy to see my single patch triggered your great response!
> Thanks!
:)
Regards,
Siddharth.
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH] net: ethernet: ti: davinci_mdio: Drop commas after match table sentinels
2026-09-03 12:06 [PATCH] net: ethernet: ti: davinci_mdio: Drop commas after match table sentinels Geert Uytterhoeven
2026-09-03 12:30 ` Siddharth Vadapalli
@ 2026-09-03 14:38 ` Andrew Lunn
2026-09-03 15:00 ` Geert Uytterhoeven
1 sibling, 1 reply; 7+ messages in thread
From: Andrew Lunn @ 2026-09-03 14:38 UTC (permalink / raw)
To: Geert Uytterhoeven
Cc: Siddharth Vadapalli, Roger Quadros, Andrew Lunn, David S . Miller,
Eric Dumazet, Jakub Kicinski, Paolo Abeni, linux-omap, netdev,
linux-kernel
On Thu, Sep 03, 2026 at 02:06:47PM +0200, Geert Uytterhoeven wrote:
> It does not make sense to have a comma after a sentinel, as any new
> elements must be added before the sentinel.
>
> Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
net-next.
Reviewed-by: Andrew Lunn <andrew@lunn.ch>
Andrew
^ permalink raw reply [flat|nested] 7+ messages in thread* Re: [PATCH] net: ethernet: ti: davinci_mdio: Drop commas after match table sentinels
2026-09-03 14:38 ` Andrew Lunn
@ 2026-09-03 15:00 ` Geert Uytterhoeven
0 siblings, 0 replies; 7+ messages in thread
From: Geert Uytterhoeven @ 2026-09-03 15:00 UTC (permalink / raw)
To: Andrew Lunn
Cc: Siddharth Vadapalli, Roger Quadros, Andrew Lunn, David S . Miller,
Eric Dumazet, Jakub Kicinski, Paolo Abeni, linux-omap, netdev,
linux-kernel
Hi Andrew,
On Thu, 3 Sept 2026 at 16:38, Andrew Lunn <andrew@lunn.ch> wrote:
> On Thu, Sep 03, 2026 at 02:06:47PM +0200, Geert Uytterhoeven wrote:
> > It does not make sense to have a comma after a sentinel, as any new
> > elements must be added before the sentinel.
> >
> > Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
>
> net-next.
Bummer. I have added a check to my checkpatch wrapper script,
so hopefully this was the last time I made that mistake ;-)
> Reviewed-by: Andrew Lunn <andrew@lunn.ch>
Thanks!
Gr{oetje,eeting}s,
Geert
--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org
In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
-- Linus Torvalds
^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2026-09-04 7:26 UTC | newest]
Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-09-03 12:06 [PATCH] net: ethernet: ti: davinci_mdio: Drop commas after match table sentinels Geert Uytterhoeven
2026-09-03 12:30 ` Siddharth Vadapalli
2026-09-04 4:47 ` Siddharth Vadapalli
2026-09-04 7:20 ` Geert Uytterhoeven
2026-09-04 7:28 ` Siddharth Vadapalli
2026-09-03 14:38 ` Andrew Lunn
2026-09-03 15:00 ` Geert Uytterhoeven
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox