mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Greg KH <gregkh@linuxfoundation.org>
To: Tian Tao <tiantao6@hisilicon.com>
Cc: jirislaby@kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] vt: use flexible-array member instead of zero-length array
Date: Thu, 31 Dec 2020 15:53:10 +0100	[thread overview]
Message-ID: <X+3l1pv89pBW/tKN@kroah.com> (raw)
In-Reply-To: <1609416240-35298-1-git-send-email-tiantao6@hisilicon.com>

On Thu, Dec 31, 2020 at 08:04:00PM +0800, Tian Tao wrote:
> Use flexible-array member introduced in C99 instead of zero-length
> array. Most of zero-length array was already taken care in previous
> patch [1]. Now modified few more cases which were not handled earlier.
> 
> [1]. https://patchwork.kernel.org/patch/11394197/
> 
> Signed-off-by: Tian Tao <tiantao6@hisilicon.com>
> ---
>  drivers/tty/vt/vt.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/tty/vt/vt.c b/drivers/tty/vt/vt.c
> index d04a162..86b4c5f 100644
> --- a/drivers/tty/vt/vt.c
> +++ b/drivers/tty/vt/vt.c
> @@ -332,7 +332,7 @@ typedef uint32_t char32_t;
>   * scrolling only implies some pointer shuffling.
>   */
>  struct uni_screen {
> -	char32_t *lines[0];
> +	char32_t *lines[];

Are you _sure_ you can do this?  What testing did you do?

thanks,

greg k-h

      parent reply	other threads:[~2020-12-31 14:55 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-12-31 12:04 Tian Tao
2020-12-31 14:49 ` kernel test robot
2020-12-31 14:53 ` Greg KH [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=X+3l1pv89pBW/tKN@kroah.com \
    --to=gregkh@linuxfoundation.org \
    --cc=jirislaby@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=tiantao6@hisilicon.com \
    /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®