qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Alistair Francis <alistair.francis@xilinx.com>
To: Peter Maydell <peter.maydell@linaro.org>
Cc: Alistair Francis <alistair.francis@xilinx.com>,
	QEMU Developers <qemu-devel@nongnu.org>,
	Max Filippov <jcmvbkbc@gmail.com>
Subject: Re: [Qemu-devel] [PATCH v1 1/1] target/xtensa: Use the pre-defined MEMTXATTRS_UNSPECIFIED macro
Date: Thu, 31 Aug 2017 10:21:23 -0700	[thread overview]
Message-ID: <CAKmqyKN1YL_gi7+sQ2mzHKKB+ZDPZA6HER1ReAtVCynfxJZiAA@mail.gmail.com> (raw)
In-Reply-To: <CAFEAcA9N2dx6feVbw0BJ_xbs9czjJvmOCZfoOjf4ddpVk4ikbQ@mail.gmail.com>

On Wed, Aug 30, 2017 at 3:12 PM, Peter Maydell <peter.maydell@linaro.org> wrote:
> On 30 August 2017 at 19:02, Alistair Francis
> <alistair.francis@xilinx.com> wrote:
>> Instead of using the hardcoded (MemTxAttrs){0} for no memory attributes
>> let's use the already defined MEMTXATTRS_UNSPECIFIED macro instead.
>>
>> Signed-off-by: Alistair Francis <alistair.francis@xilinx.com>
>> ---
>>
>>  target/xtensa/op_helper.c | 4 ++--
>>  1 file changed, 2 insertions(+), 2 deletions(-)
>>
>> diff --git a/target/xtensa/op_helper.c b/target/xtensa/op_helper.c
>> index 519fbeddd6..3d990c0caa 100644
>> --- a/target/xtensa/op_helper.c
>> +++ b/target/xtensa/op_helper.c
>> @@ -1025,11 +1025,11 @@ void HELPER(ule_s)(CPUXtensaState *env, uint32_t br, float32 a, float32 b)
>>  uint32_t HELPER(rer)(CPUXtensaState *env, uint32_t addr)
>>  {
>>      return address_space_ldl(env->address_space_er, addr,
>> -                             (MemTxAttrs){0}, NULL);
>> +                             MEMTXATTRS_UNSPECIFIED, NULL);
>>  }
>>
>>  void HELPER(wer)(CPUXtensaState *env, uint32_t data, uint32_t addr)
>>  {
>>      address_space_stl(env->address_space_er, addr, data,
>> -                      (MemTxAttrs){0}, NULL);
>> +                      MEMTXATTRS_UNSPECIFIED, NULL);
>>  }
>
> Might be worth noting in the commit that this is technically
> a change of behaviour, because MEMTXATTRS_UNSPECIFIED
> sets the 'unspecified' field to 1 whereas {0} doesn't.
> I don't think anything actually checks that field, though.

Good point, I have added something to the commit message to indicate
that. It'll be included in v2.

Thanks,
Alistair

>
> thanks
> -- PMM

      reply	other threads:[~2017-08-31 17:21 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-08-30 18:02 [Qemu-devel] [PATCH v1 1/1] target/xtensa: Use the pre-defined MEMTXATTRS_UNSPECIFIED macro Alistair Francis
2017-08-30 22:12 ` Peter Maydell
2017-08-31 17:21   ` Alistair Francis [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=CAKmqyKN1YL_gi7+sQ2mzHKKB+ZDPZA6HER1ReAtVCynfxJZiAA@mail.gmail.com \
    --to=alistair.francis@xilinx.com \
    --cc=jcmvbkbc@gmail.com \
    --cc=peter.maydell@linaro.org \
    --cc=qemu-devel@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).