Re: [Qemu-devel] [PATCH] compiler: add a sizeof_field() macro

2018-06-18 Thread Stefan Hajnoczi
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

Re: [Qemu-devel] [PATCH] compiler: add a sizeof_field() macro

2018-06-15 Thread Stefan Hajnoczi
On Thu, Jun 14, 2018 at 9:33 PM, Philippe Mathieu-Daudé wrote: > 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 a

Re: [Qemu-devel] [PATCH] compiler: add a sizeof_field() macro

2018-06-14 Thread Philippe Mathieu-Daudé
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(). E

Re: [Qemu-devel] [PATCH] compiler: add a sizeof_field() macro

2018-06-14 Thread John Snow
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 mac

[Qemu-devel] [PATCH] compiler: add a sizeof_field() macro

2018-06-14 Thread Stefan Hajnoczi
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 --- include/hw/xen/io/