From patchwork Thu Oct 29 09:11:10 2009 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Gleb Natapov X-Patchwork-Id: 56432 Received: from vger.kernel.org (vger.kernel.org [209.132.176.167]) by demeter.kernel.org (8.14.2/8.14.2) with ESMTP id n9T9BFCL029760 for ; Thu, 29 Oct 2009 09:11:15 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753473AbZJ2JLI (ORCPT ); Thu, 29 Oct 2009 05:11:08 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1752911AbZJ2JLI (ORCPT ); Thu, 29 Oct 2009 05:11:08 -0400 Received: from mx1.redhat.com ([209.132.183.28]:59401 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753273AbZJ2JLH (ORCPT ); Thu, 29 Oct 2009 05:11:07 -0400 Received: from int-mx01.intmail.prod.int.phx2.redhat.com (int-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.11]) by mx1.redhat.com (8.13.8/8.13.8) with ESMTP id n9T9BBjA018391 for ; Thu, 29 Oct 2009 05:11:12 -0400 Received: from dhcp-1-237.tlv.redhat.com (dhcp-1-237.tlv.redhat.com [10.35.1.237]) by int-mx01.intmail.prod.int.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id n9T9BAgV024497; Thu, 29 Oct 2009 05:11:11 -0400 Received: by dhcp-1-237.tlv.redhat.com (Postfix, from userid 13519) id 2240618D410; Thu, 29 Oct 2009 11:11:10 +0200 (IST) Date: Thu, 29 Oct 2009 11:11:10 +0200 From: Gleb Natapov To: avi@redhat.com, mtosatti@redhat.com Cc: kvm@vger.kernel.org Subject: [PATCH] tests: Move typedefs to one place. Message-ID: <20091029091110.GY29477@redhat.com> MIME-Version: 1.0 Content-Disposition: inline X-Scanned-By: MIMEDefang 2.67 on 10.5.11.11 Sender: kvm-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: kvm@vger.kernel.org diff --git a/kvm/user/test/lib/libcflat.h b/kvm/user/test/lib/libcflat.h index 1f96cb8..1da4013 100644 --- a/kvm/user/test/lib/libcflat.h +++ b/kvm/user/test/lib/libcflat.h @@ -22,6 +22,12 @@ #include +typedef unsigned char u8; +typedef unsigned short u16; +typedef unsigned u32; +typedef unsigned long ulong; +typedef unsigned long long u64; + extern void exit(int code); extern void panic(char *fmt, ...); diff --git a/kvm/user/test/lib/x86/apic.c b/kvm/user/test/lib/x86/apic.c index 1fc3888..7bb98ed 100644 --- a/kvm/user/test/lib/x86/apic.c +++ b/kvm/user/test/lib/x86/apic.c @@ -4,12 +4,6 @@ static void *g_apic = (void *)0xfee00000; static void *g_ioapic = (void *)0xfec00000; -typedef unsigned char u8; -typedef unsigned short u16; -typedef unsigned u32; -typedef unsigned long ulong; -typedef unsigned long long u64; - struct apic_ops { u32 (*reg_read)(unsigned reg); void (*reg_write)(unsigned reg, u32 val); diff --git a/kvm/user/test/x86/apic.c b/kvm/user/test/x86/apic.c index 1edfba5..4e89c77 100644 --- a/kvm/user/test/x86/apic.c +++ b/kvm/user/test/x86/apic.c @@ -2,12 +2,6 @@ #include "apic.h" #include "vm.h" -typedef unsigned char u8; -typedef unsigned short u16; -typedef unsigned u32; -typedef unsigned long ulong; -typedef unsigned long long u64; - typedef struct { unsigned short offset0; unsigned short selector; diff --git a/kvm/user/test/x86/tsc.c b/kvm/user/test/x86/tsc.c index 204b1fd..394a9c6 100644 --- a/kvm/user/test/x86/tsc.c +++ b/kvm/user/test/x86/tsc.c @@ -1,7 +1,5 @@ #include "libcflat.h" -typedef unsigned long long u64; - u64 rdtsc(void) { unsigned a, d;