Re: [PATCH] input: ipaq-micro-keys: simplify allocation

From: Dmitry Torokhov

Date: Tue Jun 09 2026 - 01:27:03 EST


On Mon, Jun 08, 2026 at 01:20:36PM -0700, Rosen Penev wrote:
> On Mon, Jun 8, 2026 at 9:49 AM Dmitry Torokhov
> <dmitry.torokhov@xxxxxxxxx> wrote:
> >
> > Hi Rosen,
> >
> > On Sun, Jun 07, 2026 at 09:50:41PM -0700, Rosen Penev wrote:
> > > Use a flexible array member to have a single allocation.
> >
> > Why does it have to be flexible? The size is known.
> From a quick glance, that would be a compilation error. micro_keycodes
> gets declared after ipaq_micro_keys

We could swap them around, no big deal.
>
> From looking at a bunch of struct definitions, [ARRAY_SIZE(foo)] seems
> to be atypical.

There are a lot of "#define BLAH_SIZE ARRAY_SIZE(blah)" that later
used in array definitions.

Thanks.

--
Dmitry