Re: [PATCH] drivers/clk: convert VL struct to struct_size

From: Stephen Kitt
Date: Fri Nov 08 2019 - 09:58:46 EST


On Thu, 07 Nov 2019 14:50:01 -0800, Stephen Boyd <sboyd@xxxxxxxxxx> wrote:
> Quoting Gustavo A. R. Silva (2019-10-02 12:20:28)
> > On 9/27/19 13:51, Stephen Kitt wrote:
> > > There are a few manually-calculated variable-length struct allocations
> > > left, this converts them to use struct_size.
> >
> > How did you find this?
> >
> > Please, mention the tool you used to find this in the commit log. With
> > that you can add my
> >
> > Acked-by: Gustavo A. R. Silva <gustavo@xxxxxxxxxxxxxx>
>
> Any answer? I'm tempted to just apply the patch anyway.

Sorry, I hadnât seen Gustavoâs email!

I didnât use anything particularly fancy to find these, my history says

git grep -A1 'kzalloc.*sizeof[^_].*+'

and manual review. I noticed that clk/ had a number of hits, but also commits
to switch to struct_size so I reckoned it was worth pursuing the exercise
there.

Is it worth adding that to the commit message?

Regards,

Stephen

Attachment: pgpnwJpbz2bzI.pgp
Description: OpenPGP digital signature