Re: [PATCH -next] sched: Use struct_size() helper in task_numa_group()

From: Steven Rostedt
Date: Mon Jan 10 2022 - 11:11:49 EST


On Mon, 10 Jan 2022 17:06:30 +0100
Peter Zijlstra <peterz@xxxxxxxxxxxxx> wrote:

> On Fri, Jan 07, 2022 at 10:52:12AM +0800, Xiu Jianfeng wrote:
> > Make use of struct_size() helper instead of an open-coded calculation.
> > There is no functional change in this patch.
>
> Why ?!? This makes something that was trivial to read into something
> weird.

Please take his last patch (which only modifies the update to size) and
makes it more robust.

https://lore.kernel.org/all/20220110012354.144394-1-xiujianfeng@xxxxxxxxxx/

Which is much easier to read.

We should really replace all open coded struct_size() code.

-- Steve