From patchwork Tue Sep 29 20:48:37 2009 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Juan Quintela X-Patchwork-Id: 34468 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 6547CB7BFD for ; Wed, 30 Sep 2009 07:25:37 +1000 (EST) Received: from localhost ([127.0.0.1]:42839 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1MskCT-0003o5-G3 for incoming@patchwork.ozlabs.org; Tue, 29 Sep 2009 17:25:33 -0400 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1Msjds-00059A-JN for qemu-devel@nongnu.org; Tue, 29 Sep 2009 16:49:48 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1Msjdn-00054p-5O for qemu-devel@nongnu.org; Tue, 29 Sep 2009 16:49:47 -0400 Received: from [199.232.76.173] (port=55223 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Msjdm-00054W-Le for qemu-devel@nongnu.org; Tue, 29 Sep 2009 16:49:42 -0400 Received: from mx1.redhat.com ([209.132.183.28]:7136) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1Msjdm-0002Uj-3d for qemu-devel@nongnu.org; Tue, 29 Sep 2009 16:49:42 -0400 Received: from int-mx03.intmail.prod.int.phx2.redhat.com (int-mx03.intmail.prod.int.phx2.redhat.com [10.5.11.16]) by mx1.redhat.com (8.13.8/8.13.8) with ESMTP id n8TKnf0x028554 for ; Tue, 29 Sep 2009 16:49:41 -0400 Received: from localhost.localdomain (ovpn01.gateway.prod.ext.phx2.redhat.com [10.5.9.1]) by int-mx03.intmail.prod.int.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id n8TKnHXr006885; Tue, 29 Sep 2009 16:49:40 -0400 From: Juan Quintela To: qemu-devel@nongnu.org Date: Tue, 29 Sep 2009 22:48:37 +0200 Message-Id: In-Reply-To: References: In-Reply-To: References: X-Scanned-By: MIMEDefang 2.67 on 10.5.11.16 X-detected-operating-system: by monty-python.gnu.org: Genre and OS details not recognized. Subject: [Qemu-devel] [PATCH 18/49] tmp105: change len and alorm to uint8_t 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 They were using only with very small integers, and they are sent/read as bytes. They can't become negative as far as I can see Signed-off-by: Juan Quintela --- hw/tmp105.c | 4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) diff --git a/hw/tmp105.c b/hw/tmp105.c index 0113f8d..b75a70b 100644 --- a/hw/tmp105.c +++ b/hw/tmp105.c @@ -23,7 +23,7 @@ typedef struct { i2c_slave i2c; - int len; + uint8_t len; uint8_t buf[2]; qemu_irq pin; @@ -32,7 +32,7 @@ typedef struct { int16_t temperature; int16_t limit[2]; int faults; - int alarm; + uint8_t alarm; } TMP105State; static void tmp105_interrupt_update(TMP105State *s)