I think cpumask[0] would be more clear and consistent with the rest of the kernel.It's a visual helper: it matches up with how we do these 'zero size array means dynamic structure continuation' tricks generally.That cpumask[] should probably be cpumask[0], to document theIf the comment wasn't sufficient documentation, I don't think that would help :(
aliasing to ->span and ->cpus properly.
I first mis-parsed the code for a second when seeing cpumask[]. cpumask[0] stands out like a sore thumb. And we dont read comments anyway ;-)
Jeff, i suspect you found this because you are working on something rather interesting? :) If yes, would it help your project if we did the cpumask[0] cleanup and pushed it upstream immediately?
But unfortunately for the twin projects of (a) static analysis and checking with 'sparse', and (b) compiling under another compiler, VLA-in-middle-of-struct is a killer in either case.
even if at the end of the struct?