qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Richard Henderson <richard.henderson@linaro.org>
To: Max Filippov <jcmvbkbc@gmail.com>, qemu-devel@nongnu.org
Cc: Peter Maydell <peter.maydell@linaro.org>,
	Riku Voipio <riku.voipio@iki.fi>,
	Laurent Vivier <laurent@vivier.eu>
Subject: Re: [Qemu-devel] [PATCH v4] linux-user: fix preadv/pwritev offsets
Date: Tue, 10 Apr 2018 10:23:40 +1000	[thread overview]
Message-ID: <e48b259d-09b6-cd51-65cb-ded45ecae6c3@linaro.org> (raw)
In-Reply-To: <20180406013628.25900-1-jcmvbkbc@gmail.com>

On 04/06/2018 11:36 AM, Max Filippov wrote:
> +static void target_to_host_low_high(abi_ulong tlow,
> +                                    abi_ulong thigh,
> +                                    unsigned long *hlow,
> +                                    unsigned long *hhigh)
> +{
> +    unsigned long long off = tlow |
> +        ((unsigned long long)thigh << TARGET_LONG_BITS / 2) <<
> +        TARGET_LONG_BITS / 2;

Use uint64_t instead of unsigned long long.

> +
> +    *hlow = (unsigned long)off;
> +    *hhigh = (unsigned long)((off >> HOST_LONG_BITS / 2) >>
> +                             HOST_LONG_BITS / 2);

The casts here are unnecessary and are implied by the assignment.

Otherwise,
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>


r~

  parent reply	other threads:[~2018-04-10  0:23 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-04-06  1:36 [Qemu-devel] [PATCH v4] linux-user: fix preadv/pwritev offsets Max Filippov
2018-04-09  9:42 ` Laurent Vivier
2018-04-10  0:23 ` Richard Henderson [this message]
2018-04-10  2:02   ` Max Filippov

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=e48b259d-09b6-cd51-65cb-ded45ecae6c3@linaro.org \
    --to=richard.henderson@linaro.org \
    --cc=jcmvbkbc@gmail.com \
    --cc=laurent@vivier.eu \
    --cc=peter.maydell@linaro.org \
    --cc=qemu-devel@nongnu.org \
    --cc=riku.voipio@iki.fi \
    /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).