Re: [PATCH] pinctrl: tb10x: Use flexible-array member and struct_size() helper

2019-06-06 Thread Kees Cook
On Thu, Jun 06, 2019 at 10:12:32AM -0500, Gustavo A. R. Silva wrote: > Update the code to use a flexible array member instead of a pointer in > structure i2c_mux_pinctrl and use the struct_size() helper: > > struct tb10x_pinctrl { > ... > struct tb10x_of_pinfunc pinfuncs[]; > }; > >

[PATCH] pinctrl: tb10x: Use flexible-array member and struct_size() helper

2019-06-06 Thread Gustavo A. R. Silva
Update the code to use a flexible array member instead of a pointer in structure i2c_mux_pinctrl and use the struct_size() helper: struct tb10x_pinctrl { ... struct tb10x_of_pinfunc pinfuncs[]; }; Also, make use of the struct_size() helper instead of an open-coded version in order