Re: [PATCH 1/4] nvdimm: Add wrapper for IOCTL pass thru.

From: Dan Williams
Date: Tue Nov 10 2015 - 19:49:26 EST


On Tue, Nov 10, 2015 at 4:44 PM, Jerry Hoemann <jerry.hoemann@xxxxxxx> wrote:
> On Tue, Nov 10, 2015 at 03:26:38PM -0500, Jeff Moyer wrote:
[..]
>> I see. I misread that, because you didn't actually make buf a zero
>> length array (see the structure definition quoted above). I guess you
>> meant to write this:
>>
>> unsigned char buf[0];
>>
>
> The ndn_pkg.buf struct uses a flexible array definition. This is in C99.
> An explicit zero length array is a gcc extension that has been around much
> longer. They behave in a similar fashion, but aren't identical. In my
> limited use they behave the same.

"buf[0]" is more idiomatic for Linux. I know I expressed concern
about compiler compatibility for ACPICA, but this path does not have
ACPICA interactions.
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/