Re: [PATCH] staging: rtl8192e, rtl8192u: use correct notation to define pointer

From: Luc Van Oostenryck
Date: Wed Oct 28 2020 - 19:23:16 EST


On Tue, Oct 27, 2020 at 12:23:03PM +0100, Greg KH wrote:
>
> Are you sure these changes are correct? This isn't just a list of
> structures after this at the end of the structure?
>
> Please look at commit 5979afa2c4d1 ("staging: Replace zero-length array
> with flexible-array member") which made most of these flexible arrays.
>
> This is not a pointer, it really is an array, I think sparse is really
> wrong here, be careful.

Sparse's warning is not about changing the definition of this member
as if it was the argument of a function. It's about how can you use
an array of structure when this structure has a flexible member.
It's a recent warning, added purposely to catch this.
See https://lore.kernel.org/r/CAHk-=wgJZ05ap8VQdzWDWJVWVtZiOYTc6cnNB8gNeQzEnfm-tw@xxxxxxxxxxxxxx

-- Luc