All of lore.kernel.org
 help / color / mirror / Atom feed
From: Michael Tokarev <mjt@tls.msk.ru>
To: Thomas Huth <thuth@redhat.com>,
	qemu-devel@nongnu.org,  qemu-trivial@nongnu.org
Subject: Re: [Qemu-trivial] [PATCH v2 0/4] Small optimizations for code using g_malloc0 + memset/memcpy
Date: Thu, 29 Oct 2015 10:53:41 +0300	[thread overview]
Message-ID: <5631D085.30604@msgid.tls.msk.ru> (raw)
In-Reply-To: <1444406198-6521-1-git-send-email-thuth@redhat.com>

09.10.2015 18:56, Thomas Huth wrote:
> There are a couple of spots in the QEMU code which use g_malloc0,
> directly followed by a memset or memcpy which fill the whole
> allocated buffer. In this case it either does not make sense to
> zero the buffer via g_malloc0 first (so g_malloc should be used
> instead), or if the second command is a memset(..., 0, ...), then
> the memset does not make much sense, of course, since the buffer
> has already been zeroed by the g_malloc0.

Applied to -trivial, thanks!
The 4/4 patch has been picked up by Riku.

/mjt


WARNING: multiple messages have this Message-ID (diff)
From: Michael Tokarev <mjt@tls.msk.ru>
To: Thomas Huth <thuth@redhat.com>,
	qemu-devel@nongnu.org, qemu-trivial@nongnu.org
Subject: Re: [Qemu-devel] [PATCH v2 0/4] Small optimizations for code using g_malloc0 + memset/memcpy
Date: Thu, 29 Oct 2015 10:53:41 +0300	[thread overview]
Message-ID: <5631D085.30604@msgid.tls.msk.ru> (raw)
In-Reply-To: <1444406198-6521-1-git-send-email-thuth@redhat.com>

09.10.2015 18:56, Thomas Huth wrote:
> There are a couple of spots in the QEMU code which use g_malloc0,
> directly followed by a memset or memcpy which fill the whole
> allocated buffer. In this case it either does not make sense to
> zero the buffer via g_malloc0 first (so g_malloc should be used
> instead), or if the second command is a memset(..., 0, ...), then
> the memset does not make much sense, of course, since the buffer
> has already been zeroed by the g_malloc0.

Applied to -trivial, thanks!
The 4/4 patch has been picked up by Riku.

/mjt

  parent reply	other threads:[~2015-10-29  7:53 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-10-09 15:56 [Qemu-trivial] [PATCH v2 0/4] Small optimizations for code using g_malloc0 + memset/memcpy Thomas Huth
2015-10-09 15:56 ` [Qemu-devel] " Thomas Huth
2015-10-09 15:56 ` [Qemu-trivial] [PATCH v2 1/4] hw/dma/pxa2xx: Remove superfluous memset Thomas Huth
2015-10-09 15:56   ` [Qemu-devel] " Thomas Huth
2015-10-09 22:58   ` [Qemu-trivial] " Eric Blake
2015-10-09 22:58     ` Eric Blake
2015-10-09 15:56 ` [Qemu-trivial] [PATCH v2 2/4] hw/input/tsc210x: " Thomas Huth
2015-10-09 15:56   ` [Qemu-devel] " Thomas Huth
2015-10-09 19:13   ` [Qemu-trivial] " Eric Blake
2015-10-09 19:13     ` Eric Blake
2015-10-09 15:56 ` [Qemu-trivial] [PATCH v2 3/4] tests/i44fx-test: No need for zeroing memory before memset Thomas Huth
2015-10-09 15:56   ` [Qemu-devel] " Thomas Huth
2015-10-09 15:56 ` [Qemu-trivial] [PATCH v2 4/4] linux-user/syscall: Replace g_malloc0 + memcpy with g_memdup Thomas Huth
2015-10-09 15:56   ` [Qemu-devel] " Thomas Huth
2015-10-12 13:23   ` [Qemu-trivial] " Riku Voipio
2015-10-12 13:23     ` Riku Voipio
2015-10-29  7:53 ` Michael Tokarev [this message]
2015-10-29  7:53   ` [Qemu-devel] [PATCH v2 0/4] Small optimizations for code using g_malloc0 + memset/memcpy 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=5631D085.30604@msgid.tls.msk.ru \
    --to=mjt@tls.msk.ru \
    --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.