qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Stefan Hajnoczi <stefanha@gmail.com>
To: Stefan Hajnoczi <stefanha@redhat.com>
Cc: 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: Mon, 18 Jun 2018 14:53:59 +0100	[thread overview]
Message-ID: <20180618135359.GA29670@stefanha-x1.localdomain> (raw)
In-Reply-To: <20180614164431.29305-1-stefanha@redhat.com>

[-- Attachment #1: Type: text/plain, Size: 947 bytes --]

On Thu, Jun 14, 2018 at 05:44:31PM +0100, 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>
> ---
>  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(-)

Thanks, applied to my block tree:
https://github.com/stefanha/qemu/commits/block

Stefan

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 455 bytes --]

      parent reply	other threads:[~2018-06-18 13:54 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é
2018-06-15  7:59     ` Stefan Hajnoczi
2018-06-18 13:53 ` Stefan Hajnoczi [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=20180618135359.GA29670@stefanha-x1.localdomain \
    --to=stefanha@gmail.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).