Re: [PATCH][next] tty: tty_buffer: Avoid hundreds of -Wflex-array-member-not-at-end warnings

From: Gustavo A. R. Silva
Date: Wed Feb 05 2025 - 03:26:06 EST




The problem with this is that then we have to modify a lot of
lines from, let's say, instance->used, instance->size, etc...
to instance->hdr.used, instance->hdr.size, and so on...

Great, let's do that and get it right please.

Deal!


This code churn is avoided if we use the struct_group() helper.

It's not "churn" if it is "fix the code to be correct" :)

As long as those warnings are fixed and we harden the kernel, I'm
really okay with whatever maintainers prefer. :)

Thanks!
-Gustavo