From: Paolo Bonzini <pbonzini@redhat.com>
To: "Philippe Mathieu-Daudé" <f4bug@amsat.org>,
"Stefan Weil" <sw@weilnetz.de>,
"Richard Henderson" <richard.henderson@linaro.org>
Cc: qemu-devel@nongnu.org, Stefan Hajnoczi <stefanha@redhat.com>
Subject: Re: [Qemu-devel] [PATCH v2] oslib-posix: Fix compiler warning and some data types
Date: Sun, 15 Oct 2017 17:32:49 +0200 [thread overview]
Message-ID: <4028eece-c9ff-113a-3cab-1a95c9ce79cc@redhat.com> (raw)
In-Reply-To: <dacdf7e7-0b16-99a0-ab50-ea7a458e0ec6@amsat.org>
On 14/10/2017 18:53, Philippe Mathieu-Daudé wrote:
>> @@ -328,7 +328,7 @@ static void *do_touch_pages(void *arg)
>> * don't need to write at all so we don't cause
>> * wear on the storage backing the region...
>> */
>> - *(volatile char *)addr = *addr;
>> + *addr = *addr;
> I personally prefer the other form which is mostly self-explicit when
> reviewing this code.
>
> Declaring addr non volatile and using volatile cast here:
> Reviewed-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
>
I agree with Philippe; in genereal, volatile is more of a property of
the access rather than the variable.
Paolo
next prev parent reply other threads:[~2017-10-15 15:33 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-10-13 5:48 [Qemu-devel] [PATCH v2] oslib-posix: Fix compiler warning and some data types Stefan Weil
2017-10-13 6:25 ` no-reply
2017-10-14 16:53 ` Philippe Mathieu-Daudé
2017-10-15 15:32 ` Paolo Bonzini [this message]
2017-10-15 17:46 ` Stefan Weil
2017-10-15 17:53 ` Stefan Weil
2017-10-16 12:22 ` Paolo Bonzini
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=4028eece-c9ff-113a-3cab-1a95c9ce79cc@redhat.com \
--to=pbonzini@redhat.com \
--cc=f4bug@amsat.org \
--cc=qemu-devel@nongnu.org \
--cc=richard.henderson@linaro.org \
--cc=stefanha@redhat.com \
--cc=sw@weilnetz.de \
/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).