On Mon, Mar 9, 2026 at 2:27 AM Rosen Penev <[email protected]> wrote: > > On Sun, Mar 8, 2026 at 5:06 PM Linus Walleij <[email protected]> wrote: > > > > On Sun, Mar 8, 2026 at 3:15 AM Rosen Penev <[email protected]> wrote: > > > > > Use a flexible array member to combine kzalloc and kcalloc. > > > > > > Signed-off-by: Rosen Penev <[email protected]> > > (...) > > > struct msc313_gpio { > > > void __iomem *base; > > > const struct msc313_gpio_data *gpio_data; > > > > Do you wanna add: > > > > const unsigned int saved_size; > So in the code there's > > for (i = 0; i < gpio->gpio_data->num; i++) > > which is equivalent to match->num. > > __counted_by doesn't support pointers AFAIK. > >
This is a regular flexible array of u8. It should work fine with __counted_by and I too am in favor of using it as it has become standard for flexible arrays. Bart

