Thread (59 messages) flat view 59 messages, 12 authors, 2h ago

Re: [PATCH net-next 00/33] Remove comma after sentinel entries in match table

From: Jakub Kicinski <kuba@kernel.org>
Date: 2026-09-05 18:03:02
Also in: linux-can, linux-mediatek, linux-omap, linux-renesas-soc, linux-riscv, lkml, spacemit

On Sat, 5 Sep 2026 11:09:54 +0530 Siddharth Vadapalli wrote:
quoted
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?
Is it polite to answer a question with a question? 🧐️

Please be mindful of maintainer's time going forward.
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.
  
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help