Messages in this thread | | | From | Eric Anholt <> | Subject | Re: [PATCH] staging: vchiq_arm: Clear VLA warning | Date | Fri, 09 Mar 2018 10:11:47 -0800 |
| |
"Tobin C. Harding" <me@tobin.cc> writes:
> The kernel would like to have all stack VLA usage removed[1]. The > array here is fixed (declared with a const variable) but it appears > like VLA to the compiler. We can use a pre-processor define to quiet > the compiler. > > [1]: https://lkml.org/lkml/2018/3/7/621 > > Signed-off-by: Tobin C. Harding <me@tobin.cc> > --- > > The name of this constant may need changing, there is already a > pre-processor constant VCHIQ_MAX_SERVICES
Maybe just use ARRAY_SIZE(local_max_services) and not have the #define? [unhandled content-type:application/pgp-signature] | |