qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: "Daniel P. Berrangé" <berrange@redhat.com>
To: Richard Henderson <richard.henderson@linaro.org>
Cc: Roman Kiryanov <rkir@google.com>,
	qemu-devel@nongnu.org, jansene@google.com, mett@google.com,
	jpcottin@google.com
Subject: Re: [PATCH 3/3] exec: use char* for pointer arithmetic
Date: Wed, 19 Jun 2024 09:05:02 +0100	[thread overview]
Message-ID: <ZnKRLj3usYxmAIOE@redhat.com> (raw)
In-Reply-To: <495d3ddc-ce73-4ef5-badd-16ed61f9a5aa@linaro.org>

On Tue, Jun 18, 2024 at 04:05:36PM -0700, Richard Henderson wrote:
> On 6/18/24 15:46, Roman Kiryanov wrote:
> > @@ -2839,7 +2839,7 @@ static inline uint8_t address_space_ldub_cached(MemoryRegionCache *cache,
> >   {
> >       assert(addr < cache->len);
> >       if (likely(cache->ptr)) {
> > -        return ldub_p(cache->ptr + addr);
> > +        return ldub_p((char*)cache->ptr + addr);
> 
> We require "char *" with a space.
> 
> With all of those fixed,
> Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
> 
> PS: I'm annoyed that standards never adopted arithmetic on void *.

NB, QEMU is explicitly *NOT* targetting the C standard, we are
targetting the C dialect supported by GCC and CLang only. IOW,
if they have well defined behaviour for arithmetic on void *,
then we are free to use it.

With regards,
Daniel
-- 
|: https://berrange.com      -o-    https://www.flickr.com/photos/dberrange :|
|: https://libvirt.org         -o-            https://fstop138.berrange.com :|
|: https://entangle-photo.org    -o-    https://www.instagram.com/dberrange :|



  parent reply	other threads:[~2024-06-19  8:06 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-06-18 22:46 [PATCH 3/3] exec: use char* for pointer arithmetic Roman Kiryanov
2024-06-18 23:05 ` Richard Henderson
2024-06-19  0:09   ` Roman Kiryanov
2024-06-19  8:05   ` Daniel P. Berrangé [this message]
2024-06-20 15:10     ` Alex Bennée
2024-06-20 16:23       ` Roman Kiryanov
2024-06-20 19:09         ` Peter Maydell
2024-06-20 20:23           ` Roman Kiryanov
2024-06-20 18:06 ` Paolo Bonzini
2024-06-20 18:14   ` Richard Henderson
2024-06-20 18:16     ` Paolo Bonzini
2024-06-20 18:27       ` Roman Kiryanov

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=ZnKRLj3usYxmAIOE@redhat.com \
    --to=berrange@redhat.com \
    --cc=jansene@google.com \
    --cc=jpcottin@google.com \
    --cc=mett@google.com \
    --cc=qemu-devel@nongnu.org \
    --cc=richard.henderson@linaro.org \
    --cc=rkir@google.com \
    /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).