[PATCH net-next 00/33] Remove comma after sentinel entries in match table
Siddharth Vadapalli
s-vadapalli at ti.com
Fri Sep 4 22:39:54 PDT 2026
On 04/09/26 9:28 PM, Jakub Kicinski wrote:
> On Fri, 4 Sep 2026 10:06:06 +0530 Siddharth Vadapalli wrote:
>> This series removes the comma present after sentinel entries in the match
>> tables across all networking subsystem drivers, with the exception of the
>> davinci_mdio.c driver, for which, the patch posted by Geert at:
>> https://lore.kernel.org/r/e481b6de46cecc6ea604ae165272c667274cc621.1788437140.git.geert+renesas@glider.be/
>> does the same.
>>
>> Since I inquired about a cleanup across the entire networking subsystem but
>> didn't get a response:
>> https://lore.kernel.org/r/b3d19098-eccd-4619-b667-ad3b7e0a4422@ti.com/
>> I decided to post this series. Given that Andrew Lunn acknowledged the
>> cleanup of the davinci_mdio driver:
>> https://lore.kernel.org/r/abec6831-d344-489d-b70c-1e5dd4d43c2d@lunn.ch/
>> and I don't see why the cleanup is specific to davinci_mdio driver alone,
>> I am hoping that this series is treated identically to the patch that
>> Geert had posted for the davinci_mdio driver.
>>
>> Series is based on commit
>> 6ebcf5074cff net: openvswitch: don't schedule rebalancing if there are no datapaths
>> of the 'main' branch of the net-next tree.
>
> You failed to specify why this "cleanup" makes a difference.
> have you ever seen the sentinel not be the last entry?
The 'cleanup' in a way 'guarantees'/'enforces' sentinel being the last
entry, by catching 'copy-paste' errors at compile-time rather than being
a silent bug that shows up at runtime. If a new entry were to be
accidentally added after the sentinel entry in the current drivers, it
will not cause any compile-time error, but will fail silently at
runtime. This series 'cleans up' the drivers by making it a compile-time
error going forward (adding a new entry below sentinel will cause a
build error with the comma removed after the sentinel entry). I do not
doubt the review process on the mailing lists where such errors will
certainly be caught, but isn't it better if they are caught at
build-time instead, thereby saving reviewers the trouble of pointing out
such trivial mistakes?
Trailing commas are an indication of 'scope-for-extension' in the
future, which holds true for 'enums' or other structures where newer
entires are added towards the end rather than being inserted in the
middle. Since that isn't the case here, this series makes it clear by
removing the trailing comma.
More information about the linux-riscv
mailing list