qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Paolo Bonzini <pbonzini@redhat.com>
To: KONRAD Frederic <frederic.konrad@adacore.com>, qemu-devel@nongnu.org
Cc: qemu-trivial@nongnu.org
Subject: Re: [Qemu-devel] [PATCH] memory: avoid a name clash with access macro
Date: Thu, 21 Sep 2017 14:08:23 +0200	[thread overview]
Message-ID: <7a95c1d0-908b-121b-aaf7-df0f859b30b5@redhat.com> (raw)
In-Reply-To: <1505988260-8483-1-git-send-email-frederic.konrad@adacore.com>

On 21/09/2017 12:04, KONRAD Frederic wrote:
> This avoids a name clash with the access macro on windows 64:
> 
> make
> 	CHK version_gen.h
>   CC      aarch64-softmmu/memory.o
> /home/konrad/qemu/memory.c: In function 'access_with_adjusted_size':
> /home/konrad/qemu/memory.c:591:73: error: macro "access" passed 7 arguments, \
>                          but takes just 2
>                          (size - access_size - i) * 8, access_mask, attrs);
>                                                                          ^
> 
> Signed-off-by: KONRAD Frederic <frederic.konrad@adacore.com>
> ---
>  memory.c | 19 ++++++++++---------
>  1 file changed, 10 insertions(+), 9 deletions(-)
> 
> diff --git a/memory.c b/memory.c
> index b9920a6..2b90117 100644
> --- a/memory.c
> +++ b/memory.c
> @@ -560,13 +560,14 @@ static MemTxResult access_with_adjusted_size(hwaddr addr,
>                                        unsigned size,
>                                        unsigned access_size_min,
>                                        unsigned access_size_max,
> -                                      MemTxResult (*access)(MemoryRegion *mr,
> -                                                            hwaddr addr,
> -                                                            uint64_t *value,
> -                                                            unsigned size,
> -                                                            unsigned shift,
> -                                                            uint64_t mask,
> -                                                            MemTxAttrs attrs),
> +                                      MemTxResult (*access_fn)
> +                                                  (MemoryRegion *mr,
> +                                                   hwaddr addr,
> +                                                   uint64_t *value,
> +                                                   unsigned size,
> +                                                   unsigned shift,
> +                                                   uint64_t mask,
> +                                                   MemTxAttrs attrs),
>                                        MemoryRegion *mr,
>                                        MemTxAttrs attrs)
>  {
> @@ -587,12 +588,12 @@ static MemTxResult access_with_adjusted_size(hwaddr addr,
>      access_mask = -1ULL >> (64 - access_size * 8);
>      if (memory_region_big_endian(mr)) {
>          for (i = 0; i < size; i += access_size) {
> -            r |= access(mr, addr + i, value, access_size,
> +            r |= access_fn(mr, addr + i, value, access_size,
>                          (size - access_size - i) * 8, access_mask, attrs);
>          }
>      } else {
>          for (i = 0; i < size; i += access_size) {
> -            r |= access(mr, addr + i, value, access_size, i * 8,
> +            r |= access_fn(mr, addr + i, value, access_size, i * 8,
>                          access_mask, attrs);
>          }
>      }
> 

Queued, thanks.

Paolo

      reply	other threads:[~2017-09-21 12:08 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-09-21 10:04 [Qemu-devel] [PATCH] memory: avoid a name clash with access macro KONRAD Frederic
2017-09-21 12:08 ` Paolo Bonzini [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=7a95c1d0-908b-121b-aaf7-df0f859b30b5@redhat.com \
    --to=pbonzini@redhat.com \
    --cc=frederic.konrad@adacore.com \
    --cc=qemu-devel@nongnu.org \
    --cc=qemu-trivial@nongnu.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).