Received: from eggs.gnu.org ([2001:4830:134:3::10]:55093) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Xnt0z-0005e2-9C for qemu-devel@nongnu.org; Mon, 10 Nov 2014 12:44:39 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Xnt0p-0000ie-MH for qemu-devel@nongnu.org; Mon, 10 Nov 2014 12:44:33 -0500 Received: from cantor2.suse.de ([195.135.220.15]:42904 helo=mx2.suse.de) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Xnt0p-0000iK-Fl for qemu-devel@nongnu.org; Mon, 10 Nov 2014 12:44:23 -0500 From: Alexander Graf Date: Mon, 10 Nov 2014 18:44:22 +0100 Message-Id: <1415641462-52468-4-git-send-email-agraf@suse.de> In-Reply-To: <1415641462-52468-1-git-send-email-agraf@suse.de> References: <1415641462-52468-1-git-send-email-agraf@suse.de> Subject: [Qemu-devel] [PATCH 2.2 v2 3/3] linux-user: Use target_timer_t type for timer parameters List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Cc: tommusta@gmail.com, riku.voipio@iki.fi, peter.maydell@linaro.org The timer_gettime and timer_settime syscalls get a timer_t parameter. Since we now have an internal wrapper type for it, let's make use of it. We do not need to check for signed < 0 overflows, because we already mask out the upper bits of the value, rendering the number always unsigned. Signed-off-by: Alexander Graf --- linux-user/syscall.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/linux-user/syscall.c b/linux-user/syscall.c index b7f12b6..96d74df 100644 --- a/linux-user/syscall.c +++ b/linux-user/syscall.c @@ -9617,7 +9617,7 @@ abi_long do_syscall(void *cpu_env, int num, abi_long arg1, { /* args: timer_t timerid, int flags, const struct itimerspec *new_value, * struct itimerspec * old_value */ - target_ulong timerid = arg1; + target_timer_t timerid = arg1; /* Convert QEMU provided timer ID back to internal 16bit index format */ if ((timerid & TIMER_MAGIC_MASK) == TIMER_MAGIC) { @@ -9646,7 +9646,7 @@ abi_long do_syscall(void *cpu_env, int num, abi_long arg1, case TARGET_NR_timer_gettime: { /* args: timer_t timerid, struct itimerspec *curr_value */ - target_ulong timerid = arg1; + target_timer_t timerid = arg1; /* Convert QEMU provided timer ID back to internal 16bit index format */ if ((timerid & TIMER_MAGIC_MASK) == TIMER_MAGIC) { -- 1.7.12.4