From: "Philippe Mathieu-Daudé" <f4bug@amsat.org>
To: John Snow <jsnow@redhat.com>
Cc: Stefan Hajnoczi <stefanha@redhat.com>,
qemu-devel@nongnu.org, xen-devel@lists.xenproject.org,
qemu-s390x@nongnu.org, qemu-ppc@nongnu.org
Subject: Re: [Qemu-devel] [PATCH] compiler: add a sizeof_field() macro
Date: Thu, 14 Jun 2018 17:33:04 -0300 [thread overview]
Message-ID: <c5c1f362-d51d-df1e-c1dd-f57b64c3f1a1@amsat.org> (raw)
In-Reply-To: <5768e8f3-eae5-30ef-888a-5e62692c238d@redhat.com>
On 06/14/2018 04:17 PM, John Snow wrote:
> On 06/14/2018 12:44 PM, Stefan Hajnoczi wrote:
>> Determining the size of a field is useful when you don't have a struct
>> variable handy. Open-coding this is ugly.
>>
>> This patch adds the sizeof_field() macro, which is similar to
>> typeof_field(). Existing instances are updated to use the macro.
>>
>> Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
>
> How'd you find all the existing instances?
This works:
$ git grep -E 'sizeof.*)0)->'
>
> Reviewed-by: John Snow <jsnow@redhat.com>
>
>> ---
>> include/hw/xen/io/ring.h | 2 +-
>> include/qemu/compiler.h | 2 ++
>> accel/tcg/translate-all.c | 2 +-
>> hw/display/xenfb.c | 4 ++--
>> hw/net/rocker/rocker_of_dpa.c | 2 +-
>> hw/net/virtio-net.c | 2 +-
>> target/i386/kvm.c | 2 +-
>> target/ppc/arch_dump.c | 10 +++++-----
>> target/s390x/arch_dump.c | 20 ++++++++++----------
>> 9 files changed, 24 insertions(+), 22 deletions(-)
next prev parent reply other threads:[~2018-06-14 20:33 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-06-14 16:44 [Qemu-devel] [PATCH] compiler: add a sizeof_field() macro Stefan Hajnoczi
2018-06-14 19:17 ` John Snow
2018-06-14 20:33 ` Philippe Mathieu-Daudé [this message]
2018-06-15 7:59 ` Stefan Hajnoczi
2018-06-18 13:53 ` Stefan Hajnoczi
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=c5c1f362-d51d-df1e-c1dd-f57b64c3f1a1@amsat.org \
--to=f4bug@amsat.org \
--cc=jsnow@redhat.com \
--cc=qemu-devel@nongnu.org \
--cc=qemu-ppc@nongnu.org \
--cc=qemu-s390x@nongnu.org \
--cc=stefanha@redhat.com \
--cc=xen-devel@lists.xenproject.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).