On Mon, Nov 24, 2025 at 01:35:12PM -0800, Linus Torvalds wrote:
> Those macros are illegible. And 99% of all users DO NOT WANT ANY OF
> THAT COMPLEXITY.
Okay, I think you're saying "I don't want the common helpers to include
the infrastructure for supporting the ..._sz() variants"?
> So no. We're not doing *any* of that. You make it simple and targeted
> to the *common* case, of you don't do this at all. Because that
> over-designed mess that actually turned some users *less* readable,
> but one line shorter, was bad.
Fair enough. Looking at the treewide change I prepared[1], it's less
than 1% of those mechanical replacements:
$ git show f79ee96ad6a3 | grep -E 'k.*alloc_(objs?|flex)\(' | wc -l
17473
$ git show f79ee96ad6a3 | grep '_sz(' | wc -l
114
I'll respin without the _sz variants, and try to improve the flex stuff.
-Kees
[1]
https://git.kernel.org/pub/scm/linux/kernel/git/kees/linux.git/commit/?h=dev/v6.18-rc6/alloc_obj/v5
--
Kees Cook