From: Jiri Slaby <jslaby@suse.cz>
To: "Gustavo A. R. Silva" <gustavoars@kernel.org>,
Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Cc: linux-kernel@vger.kernel.org
Subject: Re: [PATCH] tty: Replace zero-length array with flexible-array
Date: Mon, 11 May 2020 08:07:14 +0200 [thread overview]
Message-ID: <61d8d56e-7235-86bd-a925-47f268a7b367@suse.cz> (raw)
In-Reply-To: <20200507192545.GA16662@embeddedor>
On 07. 05. 20, 21:25, Gustavo A. R. Silva wrote:
> The current codebase makes use of the zero-length array language
> extension to the C90 standard, but the preferred mechanism to declare
> variable-length types such as these ones is a flexible array member[1][2],
> introduced in C99:
>
> struct foo {
> int stuff;
> struct boo array[];
> };
...
Acked-by: Jiri Slaby <jslaby@suse.cz>
> Signed-off-by: Gustavo A. R. Silva <gustavoars@kernel.org>
> ---
> include/linux/tty.h | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/include/linux/tty.h b/include/linux/tty.h
> index bd5fe0e907e8..a99e9b8e4e31 100644
> --- a/include/linux/tty.h
> +++ b/include/linux/tty.h
> @@ -66,7 +66,7 @@ struct tty_buffer {
> int read;
> int flags;
> /* Data points here */
> - unsigned long data[0];
> + unsigned long data[];
> };
>
> /* Values for .flags field of tty_buffer */
>
thanks,
--
js
suse labs
prev parent reply other threads:[~2020-05-11 6:07 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-05-07 19:25 Gustavo A. R. Silva
2020-05-11 6:07 ` Jiri Slaby [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=61d8d56e-7235-86bd-a925-47f268a7b367@suse.cz \
--to=jslaby@suse.cz \
--cc=gregkh@linuxfoundation.org \
--cc=gustavoars@kernel.org \
--cc=linux-kernel@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®