[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH v4] linux-user: fix preadv/pwritev offsets
From: |
Richard Henderson |
Subject: |
Re: [Qemu-devel] [PATCH v4] linux-user: fix preadv/pwritev offsets |
Date: |
Tue, 10 Apr 2018 10:23:40 +1000 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.7.0 |
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 <address@hidden>
r~