From: "Jan Beulich" Subject: [PATCH] linux: make xenoprof local variables static Date: Thu, 04 Sep 2008 16:45:59 +0100 Message-ID: <48C01ED7.76E4.0078.0@novell.com> Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: quoted-printable Return-path: Content-Disposition: inline List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xensource.com Errors-To: xen-devel-bounces@lists.xensource.com To: xen-devel@lists.xensource.com List-Id: xen-devel@lists.xenproject.org As usual, written and tested on 2.6.27-rc5 and made apply to the 2.6.18 tree without further testing. Signed-off-by: Jan Beulich Index: head-2008-09-01/drivers/xen/xenoprof/xenoprofile.c =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- head-2008-09-01.orig/drivers/xen/xenoprof/xenoprofile.c 2008-09-04 = 14:47:42.000000000 +0200 +++ head-2008-09-01/drivers/xen/xenoprof/xenoprofile.c 2008-09-04 = 14:49:10.000000000 +0200 @@ -35,14 +35,14 @@ #define MAX_XENOPROF_SAMPLES 16 =20 /* sample buffers shared with Xen */ -xenoprof_buf_t * xenoprof_buf[MAX_VIRT_CPUS]; +static xenoprof_buf_t *xenoprof_buf[MAX_VIRT_CPUS]; /* Shared buffer area */ -struct xenoprof_shared_buffer shared_buffer; +static struct xenoprof_shared_buffer shared_buffer; =20 /* Passive sample buffers shared with Xen */ -xenoprof_buf_t *p_xenoprof_buf[MAX_OPROF_DOMAINS][MAX_VIRT_CPUS]; +static xenoprof_buf_t *p_xenoprof_buf[MAX_OPROF_DOMAINS][MAX_VIRT_CPUS]; /* Passive shared buffer area */ -struct xenoprof_shared_buffer p_shared_buffer[MAX_OPROF_DOMAINS]; +static struct xenoprof_shared_buffer p_shared_buffer[MAX_OPROF_DOMAINS]; =20 static int xenoprof_start(void); static void xenoprof_stop(void); @@ -54,11 +54,11 @@ static int active_defined; extern unsigned long backtrace_depth; =20 /* Number of buffers in shared area (one per VCPU) */ -int nbuf; +static int nbuf; /* Mappings of VIRQ_XENOPROF to irq number (per cpu) */ -int ovf_irq[NR_CPUS]; +static int ovf_irq[NR_CPUS]; /* cpu model type string - copied from Xen on XENOPROF_init command */ -char cpu_type[XENOPROF_CPU_TYPE_SIZE]; +static char cpu_type[XENOPROF_CPU_TYPE_SIZE]; =20 #ifdef CONFIG_PM =20 @@ -111,11 +111,11 @@ static void exit_driverfs(void) #define exit_driverfs() do { } while (0) #endif /* CONFIG_PM */ =20 -unsigned long long oprofile_samples =3D 0; -unsigned long long p_oprofile_samples =3D 0; +static unsigned long long oprofile_samples; +static unsigned long long p_oprofile_samples; =20 -unsigned int pdomains; -struct xenoprof_passive passive_domains[MAX_OPROF_DOMAINS]; +static unsigned int pdomains; +static struct xenoprof_passive passive_domains[MAX_OPROF_DOMAINS]; =20 /* Check whether the given entry is an escape code */ static int xenoprof_is_escape(xenoprof_buf_t * buf, int tail) @@ -482,8 +482,7 @@ static void xenoprof_dummy_backtrace(str } =20 =20 - -struct oprofile_operations xenoprof_ops =3D { +static struct oprofile_operations xenoprof_ops =3D { #ifdef HAVE_XENOPROF_CREATE_FILES .create_files =3D xenoprof_create_files, #endif