On Mon, 27 Oct 2025 11:05:09 +0800
Yumei Huang
On Thu, Oct 23, 2025 at 10:28 AM Stefano Brivio
wrote: On Thu, 23 Oct 2025 11:40:10 +1100 David Gibson
wrote: On Wed, Oct 22, 2025 at 12:30:54PM +0800, Yumei Huang wrote:
Also fix the copyright line.
Suggested-by: Stefano Brivio
Signed-off-by: Yumei Huang Stefano, do we actually encourage that style for any "list of similar items"? Or just for local variable declarations?
Just for local variable declarations, thanks for noticing.
I was rather focusing on the fact (https://lwn.net/Articles/758552/) that it's actually called "Reverse Christmas tree", not pyramid style.
I can't find a convenient reference right now, maybe it's hidden somewhere in https://lore.kernel.org/netdev/?q=reverse+christmas+tree, ...or maybe it's actually "documented" in checkpatch.pl?
I found it in Documentation/process/maintainer-kvm-x86.rst as below:
" Using reverse fir tree, a.k.a. reverse Christmas tree or reverse XMAS tree, for variable declarations isn't strictly required, though it is still preferred. "
I will update the name and make it only for local variable declarations.
Ah, thanks.
Do I need to update the reference link as well? The name would be different from the current pyramids link (https://hisham.hm/2018/06/16/when-listing-repeated-things-make-pyramids/). Not sure if it would be a little bit confusing if not.
The "pyramid" link explains the reason why, it just uses a different name. Maybe we should mention both: the kernel link calls it that way, and the pyramid link explains the rationale why it's used / preferred. -- Stefano