All of lore.kernel.org
 help / color / mirror / Atom feed
From: Michael Tokarev <mjt@tls.msk.ru>
To: Thomas Huth <thuth@redhat.com>
Cc: qemu-trivial@nongnu.org, Paolo Bonzini <pbonzini@redhat.com>,
	qemu-devel@nongnu.org
Subject: Re: [Qemu-trivial] [PATCH] kvm: Silence warning from valgrind
Date: Wed, 29 Apr 2015 09:50:40 +0300	[thread overview]
Message-ID: <55407F40.3050608@msgid.tls.msk.ru> (raw)
In-Reply-To: <20150429084335.24fbeb31@thh440s>

29.04.2015 09:43, Thomas Huth wrote:
> On Wed, 29 Apr 2015 09:34:51 +0300
> Michael Tokarev <mjt@tls.msk.ru> wrote:
[]
>> Hm.  So, what's the difference?  The same fields are assigned the same
>> values, why in first case we have some uninitialized data and in second
>> case everything is initialized?  Does struct initializer zero-fills all
>> other places (alignments, missing fields etc) ?
> 
> Right, the struct initializer fills the remaining fields with zeros.

Okay, point taken.  I just didn't know.

>> If yes, there's no need to assign zero to flags, btw ;)
> 
> True. Shall I sent a patch without that line?

I think it is better for readability to have it in.

Applied to -trivial, thank you!

/mjt


WARNING: multiple messages have this Message-ID (diff)
From: Michael Tokarev <mjt@tls.msk.ru>
To: Thomas Huth <thuth@redhat.com>
Cc: qemu-trivial@nongnu.org, Paolo Bonzini <pbonzini@redhat.com>,
	qemu-devel@nongnu.org
Subject: Re: [Qemu-devel] [PATCH] kvm: Silence warning from valgrind
Date: Wed, 29 Apr 2015 09:50:40 +0300	[thread overview]
Message-ID: <55407F40.3050608@msgid.tls.msk.ru> (raw)
In-Reply-To: <20150429084335.24fbeb31@thh440s>

29.04.2015 09:43, Thomas Huth wrote:
> On Wed, 29 Apr 2015 09:34:51 +0300
> Michael Tokarev <mjt@tls.msk.ru> wrote:
[]
>> Hm.  So, what's the difference?  The same fields are assigned the same
>> values, why in first case we have some uninitialized data and in second
>> case everything is initialized?  Does struct initializer zero-fills all
>> other places (alignments, missing fields etc) ?
> 
> Right, the struct initializer fills the remaining fields with zeros.

Okay, point taken.  I just didn't know.

>> If yes, there's no need to assign zero to flags, btw ;)
> 
> True. Shall I sent a patch without that line?

I think it is better for readability to have it in.

Applied to -trivial, thank you!

/mjt

  reply	other threads:[~2015-04-29  6:50 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-04-27 16:59 [Qemu-trivial] [PATCH] kvm: Silence warning from valgrind Thomas Huth
2015-04-27 16:59 ` [Qemu-devel] " Thomas Huth
2015-04-29  6:34 ` [Qemu-trivial] " Michael Tokarev
2015-04-29  6:34   ` [Qemu-devel] " Michael Tokarev
2015-04-29  6:43   ` Thomas Huth
2015-04-29  6:43     ` [Qemu-devel] " Thomas Huth
2015-04-29  6:50     ` Michael Tokarev [this message]
2015-04-29  6:50       ` [Qemu-devel] " Michael Tokarev

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=55407F40.3050608@msgid.tls.msk.ru \
    --to=mjt@tls.msk.ru \
    --cc=pbonzini@redhat.com \
    --cc=qemu-devel@nongnu.org \
    --cc=qemu-trivial@nongnu.org \
    --cc=thuth@redhat.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.