Re: [PATCH][next] hpilo: Replace one-element array with flexible-array member

From: Gustavo A. R. Silva
Date: Tue Jul 14 2020 - 14:00:42 EST


On Tue, Jul 14, 2020 at 06:19:48PM +0200, Greg Kroah-Hartman wrote:
> On Tue, Jul 14, 2020 at 10:44:49AM -0500, Gustavo A. R. Silva wrote:
> > There is a regular need in the kernel to provide a way to declare
> > having a dynamically sized set of trailing elements in a structure.
> > Kernel code should always use âflexible array membersâ[1] for these
> > cases. The older style of one-element or zero-length arrays should
> > no longer be used[2].
> >
> > For this particular case, it is important to notice that the cachelines
> > change from 7 to 6 after the flexible-array conversion:
>
> That's really funny to see. Nice work, I'll go queue this up. I doubt
> anyone will notice as this is a very old driver :)
>

Yep; by the way, notice the link to the Kernel CI test results:

https://github.com/GustavoARSilva/linux-hardening/blob/master/cii/kernel-ci/hpilo-20200714.md

I plan to add the generation --and inclusion in the changelog text-- of
such links to my workflow, whenever possible.

When Kernel CI reports 'SUCCESS', they don't send the report to any mailing
list; they only send those reports to the maintainers/developers. So. I'm
going to store the ones I get in this github repository:

https://github.com/GustavoARSilva/linux-hardening/tree/master/cii/kernel-ci/

Thanks
--
Gustavo