[lkml]   [2019]   [Jun]   [11]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
SubjectRe: [PATCH] i2c: mux: pinctrl: use flexible-array member and struct_size() helper
On 2019-06-03 16:53, 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.
> Also, make use of the struct_size() helper instead of an open-coded
> version in order to avoid any potential type mistakes, in particular
> in the context in which this code is being used.
> So, replace the following form:
> sizeof(*mux) + num_names * sizeof(*mux->states)
> with:
> struct_size(mux, states, num_names)
> This code was detected with the help of Coccinelle.
> Signed-off-by: Gustavo A. R. Silva <>

Thanks, patch applied to i2c-mux/for-next


 \ /
  Last update: 2019-06-11 09:21    [W:0.053 / U:2.388 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site