From patchwork Mon May 24 15:18:20 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Juan Quintela X-Patchwork-Id: 53429 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from lists.gnu.org (lists.gnu.org [199.232.76.165]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by ozlabs.org (Postfix) with ESMTPS id 11622B7D1B for ; Tue, 25 May 2010 01:20:17 +1000 (EST) Received: from localhost ([127.0.0.1]:52822 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1OGZRt-00063G-HI for incoming@patchwork.ozlabs.org; Mon, 24 May 2010 11:20:13 -0400 Received: from [140.186.70.92] (port=41690 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1OGZQO-00061D-Rg for qemu-devel@nongnu.org; Mon, 24 May 2010 11:18:41 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.69) (envelope-from ) id 1OGZQL-00006G-Sx for qemu-devel@nongnu.org; Mon, 24 May 2010 11:18:40 -0400 Received: from mx1.redhat.com ([209.132.183.28]:11293) by eggs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1OGZQH-00005Z-Jo for qemu-devel@nongnu.org; Mon, 24 May 2010 11:18:36 -0400 Received: from int-mx05.intmail.prod.int.phx2.redhat.com (int-mx05.intmail.prod.int.phx2.redhat.com [10.5.11.18]) by mx1.redhat.com (8.13.8/8.13.8) with ESMTP id o4OFIW52019576 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK) for ; Mon, 24 May 2010 11:18:33 -0400 Received: from localhost.localdomain (ovpn01.gateway.prod.ext.phx2.redhat.com [10.5.9.1]) by int-mx05.intmail.prod.int.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id o4OFIMM0009416; Mon, 24 May 2010 11:18:31 -0400 From: Juan Quintela To: qemu-devel@nongnu.org Date: Mon, 24 May 2010 17:18:20 +0200 Message-Id: <895477882f47c541992e31068d8dd62b10beb072.1274714215.git.quintela@redhat.com> In-Reply-To: References: In-Reply-To: References: X-Scanned-By: MIMEDefang 2.67 on 10.5.11.18 X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. Subject: [Qemu-devel] [PATCH 5/6] make hpet_in_legacy_mode() return a bool X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Signed-off-by: Juan Quintela --- hw/hpet.c | 6 +++--- hw/hpet_emul.h | 6 +++--- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/hw/hpet.c b/hw/hpet.c index 0ef3335..33d7f5e 100644 --- a/hw/hpet.c +++ b/hw/hpet.c @@ -39,12 +39,12 @@ static HPETState *hpet_statep; -uint32_t hpet_in_legacy_mode(void) +bool hpet_in_legacy_mode(void) { if (hpet_statep) - return hpet_statep->config & HPET_CFG_LEGACY; + return (hpet_statep->config & HPET_CFG_LEGACY) != 0; else - return 0; + return false; } static uint32_t timer_int_route(struct HPETTimer *timer) diff --git a/hw/hpet_emul.h b/hw/hpet_emul.h index b6fae0a..4f90faa 100644 --- a/hw/hpet_emul.h +++ b/hw/hpet_emul.h @@ -17,9 +17,9 @@ extern int no_hpet; #if !defined(TARGET_I386) -static inline uint32_t hpet_in_legacy_mode(void) +static inline bool hpet_in_legacy_mode(void) { - return 0; + return false; } #else @@ -85,7 +85,7 @@ typedef struct HPETState { uint64_t hpet_counter; /* main counter */ } HPETState; -extern uint32_t hpet_in_legacy_mode(void); +extern bool hpet_in_legacy_mode(void); extern void hpet_init(qemu_irq *irq); #endif /* TARGET_I386 */