[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [qemu-s390x] [Qemu-devel] [PATCH] compiler: add a sizeof_field() mac
From: |
Stefan Hajnoczi |
Subject: |
Re: [qemu-s390x] [Qemu-devel] [PATCH] compiler: add a sizeof_field() macro |
Date: |
Mon, 18 Jun 2018 14:53:59 +0100 |
User-agent: |
Mutt/1.10.0 (2018-05-17) |
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 <address@hidden>
> ---
> 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
signature.asc
Description: PGP signature