All of lore.kernel.org
 help / color / mirror / Atom feed
From: Stefan Hajnoczi <stefanha@gmail.com>
To: "Philippe Mathieu-Daudé" <f4bug@amsat.org>
Cc: John Snow <jsnow@redhat.com>,
	xen-devel@lists.xenproject.org, qemu-s390x@nongnu.org,
	"qemu-ppc@nongnu.org list:PowerPC" <qemu-ppc@nongnu.org>,
	qemu-devel <qemu-devel@nongnu.org>,
	Stefan Hajnoczi <stefanha@redhat.com>
Subject: Re: [Qemu-devel] [PATCH] compiler: add a sizeof_field() macro
Date: Fri, 15 Jun 2018 08:59:34 +0100	[thread overview]
Message-ID: <CAJSP0QU2BLvBVgtwSmNzip-7Kf=LzsrvbBjv87D9FLiswH=o0g@mail.gmail.com> (raw)
In-Reply-To: <c5c1f362-d51d-df1e-c1dd-f57b64c3f1a1@amsat.org>

On Thu, Jun 14, 2018 at 9:33 PM, Philippe Mathieu-Daudé <f4bug@amsat.org> 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 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)->'

Yes, I used a similar grep command-line.

I also checked for "sizeof.*)NULL" but nothing uses that syntax.

Stefan

WARNING: multiple messages have this Message-ID (diff)
From: Stefan Hajnoczi <stefanha@gmail.com>
To: "Philippe Mathieu-Daudé" <f4bug@amsat.org>
Cc: qemu-devel <qemu-devel@nongnu.org>,
	qemu-s390x@nongnu.org,
	"qemu-ppc@nongnu.org list:PowerPC" <qemu-ppc@nongnu.org>,
	Stefan Hajnoczi <stefanha@redhat.com>,
	xen-devel@lists.xenproject.org, John Snow <jsnow@redhat.com>
Subject: Re: [Qemu-devel] [PATCH] compiler: add a sizeof_field() macro
Date: Fri, 15 Jun 2018 08:59:34 +0100	[thread overview]
Message-ID: <CAJSP0QU2BLvBVgtwSmNzip-7Kf=LzsrvbBjv87D9FLiswH=o0g@mail.gmail.com> (raw)
In-Reply-To: <c5c1f362-d51d-df1e-c1dd-f57b64c3f1a1@amsat.org>

On Thu, Jun 14, 2018 at 9:33 PM, Philippe Mathieu-Daudé <f4bug@amsat.org> 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 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)->'

Yes, I used a similar grep command-line.

I also checked for "sizeof.*)NULL" but nothing uses that syntax.

Stefan

_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xenproject.org
https://lists.xenproject.org/mailman/listinfo/xen-devel

  reply	other threads:[~2018-06-15  7:59 UTC|newest]

Thread overview: 9+ 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 19:17   ` John Snow
2018-06-14 20:33   ` Philippe Mathieu-Daudé
2018-06-14 20:33     ` Philippe Mathieu-Daudé
2018-06-15  7:59     ` Stefan Hajnoczi [this message]
2018-06-15  7:59       ` Stefan Hajnoczi
2018-06-18 13:53 ` 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='CAJSP0QU2BLvBVgtwSmNzip-7Kf=LzsrvbBjv87D9FLiswH=o0g@mail.gmail.com' \
    --to=stefanha@gmail.com \
    --cc=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 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.