qemu-trivial.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Thomas Huth <thuth@redhat.com>
To: Peter Maydell <peter.maydell@linaro.org>,
	qemu-devel@nongnu.org, qemu-trivial@nongnu.org
Cc: "Paolo Bonzini" <pbonzini@redhat.com>,
	"Philippe Mathieu-Daudé" <f4bug@amsat.org>
Subject: Re: [Qemu-trivial] [Qemu-devel] [PATCH] vl.c: Don't zero-initialize statics for serial_hds
Date: Thu, 26 Apr 2018 16:19:39 +0200	[thread overview]
Message-ID: <4f0eec20-64a6-fb8f-58ae-1fab9ef34f53@redhat.com> (raw)
In-Reply-To: <20180426140253.3918-1-peter.maydell@linaro.org>

On 26.04.2018 16:02, Peter Maydell wrote:
> checkpatch reminds us that statics shouldn't be zero-initialized:
> 
> ERROR: do not initialise statics to 0 or NULL
> #35: FILE: vl.c:157:
> +static int num_serial_hds = 0;
> 
> ERROR: do not initialise statics to 0 or NULL
> #36: FILE: vl.c:158:
> +static Chardev **serial_hds = NULL;
> 
> I forgot to fix this in 6af2692e86f9fdfb3d; do so now.
> 
> Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
> ---
> I wouldn't bother with this except that I forgot to fold
> it in when applying the serial-limits patchset.
> 
>  vl.c | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/vl.c b/vl.c
> index 616956adf1..6d8b869dad 100644
> --- a/vl.c
> +++ b/vl.c
> @@ -154,8 +154,8 @@ QEMUClockType rtc_clock;
>  int vga_interface_type = VGA_NONE;
>  static DisplayOptions dpy;
>  int no_frame;
> -static int num_serial_hds = 0;
> -static Chardev **serial_hds = NULL;
> +static int num_serial_hds;
> +static Chardev **serial_hds;
>  Chardev *parallel_hds[MAX_PARALLEL_PORTS];
>  Chardev *virtcon_hds[MAX_VIRTIO_CONSOLES];
>  Chardev *sclp_hds[MAX_SCLP_CONSOLES];
> 

Reviewed-by: Thomas Huth <thuth@redhat.com>


  reply	other threads:[~2018-04-26 14:20 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-04-26 14:02 [Qemu-trivial] [PATCH] vl.c: Don't zero-initialize statics for serial_hds Peter Maydell
2018-04-26 14:19 ` Thomas Huth [this message]
2018-05-29 15:25   ` [Qemu-trivial] [Qemu-devel] " Peter Maydell
2018-06-11 13:56     ` Peter Maydell
2018-06-22 12:58       ` Peter Maydell

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=4f0eec20-64a6-fb8f-58ae-1fab9ef34f53@redhat.com \
    --to=thuth@redhat.com \
    --cc=f4bug@amsat.org \
    --cc=pbonzini@redhat.com \
    --cc=peter.maydell@linaro.org \
    --cc=qemu-devel@nongnu.org \
    --cc=qemu-trivial@nongnu.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;
as well as URLs for NNTP newsgroup(s).