From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:36347) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dnTAC-0007zz-Gz for qemu-devel@nongnu.org; Thu, 31 Aug 2017 13:21:57 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1dnTAB-0008DL-Ei for qemu-devel@nongnu.org; Thu, 31 Aug 2017 13:21:56 -0400 Received: from mail-io0-x243.google.com ([2607:f8b0:4001:c06::243]:33476) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1dnTAB-0008Ck-9P for qemu-devel@nongnu.org; Thu, 31 Aug 2017 13:21:55 -0400 Received: by mail-io0-x243.google.com with SMTP id f99so326198ioi.0 for ; Thu, 31 Aug 2017 10:21:55 -0700 (PDT) MIME-Version: 1.0 Sender: alistair23@gmail.com In-Reply-To: References: From: Alistair Francis Date: Thu, 31 Aug 2017 10:21:23 -0700 Message-ID: Content-Type: text/plain; charset="UTF-8" Subject: Re: [Qemu-devel] [PATCH v1 1/1] target/xtensa: Use the pre-defined MEMTXATTRS_UNSPECIFIED macro List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Peter Maydell Cc: Alistair Francis , QEMU Developers , Max Filippov On Wed, Aug 30, 2017 at 3:12 PM, Peter Maydell wrote: > On 30 August 2017 at 19:02, Alistair Francis > 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 >> --- >> >> 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