ia64/xen-unstable

changeset 9173:e9daf5307296

Cleanup whitespace.

Signed-off-by: Christian Limpach <Christian.Limpach@cl.cam.ac.uk>
author cl349@firebug.cl.cam.ac.uk
date Mon Mar 06 17:15:10 2006 +0000 (2006-03-06)
parents 085f0ad9018a
children 90c71ea18b50
files linux-2.6-xen-sparse/arch/i386/kernel/entry-xen.S linux-2.6-xen-sparse/arch/i386/kernel/head-xen.S linux-2.6-xen-sparse/arch/i386/kernel/process-xen.c linux-2.6-xen-sparse/arch/i386/kernel/time-xen.c linux-2.6-xen-sparse/arch/x86_64/kernel/process-xen.c linux-2.6-xen-sparse/drivers/xen/blkfront/blkfront.c linux-2.6-xen-sparse/drivers/xen/blkfront/block.h linux-2.6-xen-sparse/drivers/xen/console/console.c linux-2.6-xen-sparse/drivers/xen/console/xencons_ring.c linux-2.6-xen-sparse/drivers/xen/core/evtchn.c linux-2.6-xen-sparse/drivers/xen/core/features.c linux-2.6-xen-sparse/drivers/xen/core/gnttab.c linux-2.6-xen-sparse/drivers/xen/core/reboot.c linux-2.6-xen-sparse/drivers/xen/net_driver_util.c linux-2.6-xen-sparse/drivers/xen/netfront/netfront.c linux-2.6-xen-sparse/drivers/xen/xenbus/Makefile linux-2.6-xen-sparse/drivers/xen/xenbus/xenbus_client.c linux-2.6-xen-sparse/drivers/xen/xenbus/xenbus_comms.c linux-2.6-xen-sparse/drivers/xen/xenbus/xenbus_probe.c linux-2.6-xen-sparse/drivers/xen/xenbus/xenbus_xs.c linux-2.6-xen-sparse/include/asm-i386/mach-xen/asm/page.h linux-2.6-xen-sparse/include/asm-i386/mach-xen/asm/pgtable-3level.h linux-2.6-xen-sparse/include/asm-i386/mach-xen/asm/system.h linux-2.6-xen-sparse/include/asm-x86_64/mach-xen/asm/page.h linux-2.6-xen-sparse/include/linux/mm.h linux-2.6-xen-sparse/include/xen/xenbus.h xen/include/public/acm.h xen/include/public/arch-ia64.h xen/include/public/arch-x86_32.h xen/include/public/arch-x86_64.h xen/include/public/dom0_ops.h xen/include/public/grant_table.h xen/include/public/hvm/vmx_assist.h xen/include/public/io/ring.h xen/include/public/io/xenbus.h xen/include/public/memory.h xen/include/public/physdev.h xen/include/public/sched_ctl.h
line diff
     1.1 --- a/linux-2.6-xen-sparse/arch/i386/kernel/entry-xen.S	Mon Mar 06 18:05:09 2006 +0100
     1.2 +++ b/linux-2.6-xen-sparse/arch/i386/kernel/entry-xen.S	Mon Mar 06 17:15:10 2006 +0000
     1.3 @@ -560,7 +560,7 @@ 11:	push %esp
     1.4  	jmp  ret_from_intr
     1.5  
     1.6          ALIGN
     1.7 -restore_all_enable_events:  
     1.8 +restore_all_enable_events:
     1.9  	XEN_LOCKED_UNBLOCK_EVENTS(%esi)
    1.10  scrit:	/**** START OF CRITICAL REGION ****/
    1.11  	XEN_TEST_PENDING(%esi)
    1.12 @@ -577,7 +577,7 @@ ecrit:  /**** END OF CRITICAL REGION ***
    1.13  # registers are in each frame. We do this quickly using the lookup table
    1.14  # 'critical_fixup_table'. For each byte offset in the critical region, it
    1.15  # provides the number of bytes which have already been popped from the
    1.16 -# interrupted stack frame. 
    1.17 +# interrupted stack frame.
    1.18  critical_region_fixup:
    1.19  	addl $critical_fixup_table-scrit,%eax
    1.20  	movzbl (%eax),%eax		# %eax contains num bytes popped
     2.1 --- a/linux-2.6-xen-sparse/arch/i386/kernel/head-xen.S	Mon Mar 06 18:05:09 2006 +0100
     2.2 +++ b/linux-2.6-xen-sparse/arch/i386/kernel/head-xen.S	Mon Mar 06 17:15:10 2006 +0000
     2.3 @@ -30,8 +30,6 @@ ENTRY(startup_32)
     2.4  	/* Set up the stack pointer */
     2.5  	movl $(init_thread_union+THREAD_SIZE),%esp
     2.6  
     2.7 -checkCPUtype:
     2.8 -
     2.9  	/* get vendor info */
    2.10  	xorl %eax,%eax			# call CPUID with 0 -> return vendor ID
    2.11  	cpuid
     3.1 --- a/linux-2.6-xen-sparse/arch/i386/kernel/process-xen.c	Mon Mar 06 18:05:09 2006 +0100
     3.2 +++ b/linux-2.6-xen-sparse/arch/i386/kernel/process-xen.c	Mon Mar 06 17:15:10 2006 +0000
     3.3 @@ -107,9 +107,9 @@ void xen_idle(void)
     3.4  {
     3.5  	local_irq_disable();
     3.6  
     3.7 -	if (need_resched()) {
     3.8 +	if (need_resched())
     3.9  		local_irq_enable();
    3.10 -	} else {
    3.11 +	else {
    3.12  		clear_thread_flag(TIF_POLLING_NRFLAG);
    3.13  		smp_mb__after_clear_bit();
    3.14  		stop_hz_timer();
     4.1 --- a/linux-2.6-xen-sparse/arch/i386/kernel/time-xen.c	Mon Mar 06 18:05:09 2006 +0100
     4.2 +++ b/linux-2.6-xen-sparse/arch/i386/kernel/time-xen.c	Mon Mar 06 17:15:10 2006 +0000
     4.3 @@ -162,13 +162,12 @@ int tsc_disable __devinitdata = 0;
     4.4  static void delay_tsc(unsigned long loops)
     4.5  {
     4.6  	unsigned long bclock, now;
     4.7 -	
     4.8 +
     4.9  	rdtscl(bclock);
    4.10 -	do
    4.11 -	{
    4.12 +	do {
    4.13  		rep_nop();
    4.14  		rdtscl(now);
    4.15 -	} while ((now-bclock) < loops);
    4.16 +	} while ((now - bclock) < loops);
    4.17  }
    4.18  
    4.19  struct timer_opts timer_tsc = {
    4.20 @@ -187,7 +186,7 @@ static inline u64 scale_delta(u64 delta,
    4.21  	u32 tmp1, tmp2;
    4.22  #endif
    4.23  
    4.24 -	if ( shift < 0 )
    4.25 +	if (shift < 0)
    4.26  		delta >>= -shift;
    4.27  	else
    4.28  		delta <<= shift;
    4.29 @@ -226,7 +225,7 @@ void init_cpu_khz(void)
    4.30  	struct vcpu_time_info *info;
    4.31  	info = &HYPERVISOR_shared_info->vcpu_info[0].time;
    4.32  	do_div(__cpu_khz, info->tsc_to_system_mul);
    4.33 -	if ( info->tsc_shift < 0 )
    4.34 +	if (info->tsc_shift < 0)
    4.35  		cpu_khz = __cpu_khz << -info->tsc_shift;
    4.36  	else
    4.37  		cpu_khz = __cpu_khz >> info->tsc_shift;
    4.38 @@ -284,8 +283,7 @@ static void update_wallclock(void)
    4.39  		shadow_tv.tv_sec  = s->wc_sec;
    4.40  		shadow_tv.tv_nsec = s->wc_nsec;
    4.41  		rmb();
    4.42 -	}
    4.43 -	while ((s->wc_version & 1) | (shadow_tv_version ^ s->wc_version));
    4.44 +	} while ((s->wc_version & 1) | (shadow_tv_version ^ s->wc_version));
    4.45  
    4.46  	if (!independent_wallclock)
    4.47  		__update_wallclock(shadow_tv.tv_sec, shadow_tv.tv_nsec);
    4.48 @@ -312,8 +310,7 @@ static void get_time_values_from_xen(voi
    4.49  		dst->tsc_to_nsec_mul   = src->tsc_to_system_mul;
    4.50  		dst->tsc_shift         = src->tsc_shift;
    4.51  		rmb();
    4.52 -	}
    4.53 -	while ((src->version & 1) | (dst->version ^ src->version));
    4.54 +	} while ((src->version & 1) | (dst->version ^ src->version));
    4.55  
    4.56  	dst->tsc_to_usec_mul = dst->tsc_to_nsec_mul / 1000;
    4.57  }
    4.58 @@ -324,7 +321,7 @@ static inline int time_values_up_to_date
    4.59  	struct shadow_time_info *dst;
    4.60  
    4.61  	src = &HYPERVISOR_shared_info->vcpu_info[cpu].time;
    4.62 -	dst = &per_cpu(shadow_time, cpu); 
    4.63 +	dst = &per_cpu(shadow_time, cpu);
    4.64  
    4.65  	return (dst->version == src->version);
    4.66  }
    4.67 @@ -454,7 +451,7 @@ int do_settimeofday(struct timespec *tv)
    4.68  	 * overflows. If that were to happen then our shadow time values would
    4.69  	 * be stale, so we can retry with fresh ones.
    4.70  	 */
    4.71 -	for ( ; ; ) {
    4.72 +	for (;;) {
    4.73  		nsec = tv->tv_nsec - get_nsec_offset(shadow);
    4.74  		if (time_values_up_to_date(cpu))
    4.75  			break;
    4.76 @@ -614,7 +611,7 @@ irqreturn_t timer_interrupt(int irq, voi
    4.77  		get_time_values_from_xen();
    4.78  
    4.79  		/* Obtain a consistent snapshot of elapsed wallclock cycles. */
    4.80 -		delta = delta_cpu = 
    4.81 +		delta = delta_cpu =
    4.82  			shadow->system_timestamp + get_nsec_offset(shadow);
    4.83  		delta     -= processed_system_time;
    4.84  		delta_cpu -= per_cpu(processed_system_time, cpu);
    4.85 @@ -633,8 +630,7 @@ irqreturn_t timer_interrupt(int irq, voi
    4.86  				per_cpu(processed_blocked_time, cpu);
    4.87  			barrier();
    4.88  		} while (sched_time != runstate->state_entry_time);
    4.89 -	}
    4.90 -	while (!time_values_up_to_date(cpu));
    4.91 +	} while (!time_values_up_to_date(cpu));
    4.92  
    4.93  	if ((unlikely(delta < -1000000LL) || unlikely(delta_cpu < 0))
    4.94  	    && printk_ratelimit()) {
    4.95 @@ -938,7 +934,7 @@ void __init time_init(void)
    4.96  }
    4.97  
    4.98  /* Convert jiffies to system time. */
    4.99 -static inline u64 jiffies_to_st(unsigned long j) 
   4.100 +static inline u64 jiffies_to_st(unsigned long j)
   4.101  {
   4.102  	unsigned long seq;
   4.103  	long delta;
   4.104 @@ -949,7 +945,7 @@ static inline u64 jiffies_to_st(unsigned
   4.105  		delta = j - jiffies;
   4.106  		/* NB. The next check can trigger in some wrap-around cases,
   4.107  		 * but that's ok: we'll just end up with a shorter timeout. */
   4.108 -		if (delta < 1) 
   4.109 +		if (delta < 1)
   4.110  			delta = 1;
   4.111  		st = processed_system_time + (delta * (u64)NS_PER_TICK);
   4.112  	} while (read_seqretry(&xtime_lock, seq));
   4.113 @@ -965,7 +961,7 @@ void stop_hz_timer(void)
   4.114  {
   4.115  	unsigned int cpu = smp_processor_id();
   4.116  	unsigned long j;
   4.117 -	
   4.118 +
   4.119  	/* We must do this /before/ checking rcu_pending(). */
   4.120  	cpu_set(cpu, nohz_cpu_mask);
   4.121  	smp_mb();
   4.122 @@ -1012,7 +1008,7 @@ void local_setup_timer(unsigned int cpu)
   4.123  	do {
   4.124  		seq = read_seqbegin(&xtime_lock);
   4.125  		/* Use cpu0 timestamp: cpu's shadow is not initialised yet. */
   4.126 -		per_cpu(processed_system_time, cpu) = 
   4.127 +		per_cpu(processed_system_time, cpu) =
   4.128  			per_cpu(shadow_time, 0).system_timestamp;
   4.129  		init_missing_ticks_accounting(cpu);
   4.130  	} while (read_seqretry(&xtime_lock, seq));
     5.1 --- a/linux-2.6-xen-sparse/arch/x86_64/kernel/process-xen.c	Mon Mar 06 18:05:09 2006 +0100
     5.2 +++ b/linux-2.6-xen-sparse/arch/x86_64/kernel/process-xen.c	Mon Mar 06 17:15:10 2006 +0000
     5.3 @@ -124,9 +124,9 @@ void xen_idle(void)
     5.4  {
     5.5  	local_irq_disable();
     5.6  
     5.7 -	if (need_resched()) {
     5.8 +	if (need_resched())
     5.9  		local_irq_enable();
    5.10 -	} else {
    5.11 +	else {
    5.12  		clear_thread_flag(TIF_POLLING_NRFLAG);
    5.13  		smp_mb__after_clear_bit();
    5.14  		stop_hz_timer();
     6.1 --- a/linux-2.6-xen-sparse/drivers/xen/blkfront/blkfront.c	Mon Mar 06 18:05:09 2006 +0100
     6.2 +++ b/linux-2.6-xen-sparse/drivers/xen/blkfront/blkfront.c	Mon Mar 06 17:15:10 2006 +0000
     6.3 @@ -182,9 +182,8 @@ again:
     6.4  	}
     6.5  
     6.6  	err = xenbus_switch_state(dev, xbt, XenbusStateInitialised);
     6.7 -	if (err) {
     6.8 +	if (err)
     6.9  		goto abort_transaction;
    6.10 -	}
    6.11  
    6.12  	err = xenbus_transaction_end(xbt, 0);
    6.13  	if (err) {
    6.14 @@ -295,17 +294,17 @@ static void backend_changed(struct xenbu
    6.15  /* ** Connection ** */
    6.16  
    6.17  
    6.18 -/* 
    6.19 -** Invoked when the backend is finally 'ready' (and has told produced 
    6.20 -** the details about the physical device - #sectors, size, etc). 
    6.21 -*/
    6.22 +/*
    6.23 + * Invoked when the backend is finally 'ready' (and has told produced
    6.24 + * the details about the physical device - #sectors, size, etc).
    6.25 + */
    6.26  static void connect(struct blkfront_info *info)
    6.27  {
    6.28  	unsigned long sectors, sector_size;
    6.29  	unsigned int binfo;
    6.30  	int err;
    6.31  
    6.32 -        if( (info->connected == BLKIF_STATE_CONNECTED) || 
    6.33 +	if ((info->connected == BLKIF_STATE_CONNECTED) ||
    6.34  	    (info->connected == BLKIF_STATE_SUSPENDED) )
    6.35  		return;
    6.36  
    6.37 @@ -330,7 +329,7 @@ static void connect(struct blkfront_info
    6.38  		return;
    6.39  	}
    6.40  
    6.41 -	(void)xenbus_switch_state(info->xbdev, XBT_NULL, XenbusStateConnected); 
    6.42 +	(void)xenbus_switch_state(info->xbdev, XBT_NULL, XenbusStateConnected);
    6.43  
    6.44  	/* Kick pending requests. */
    6.45  	spin_lock_irq(&blkif_io_lock);
    6.46 @@ -463,8 +462,7 @@ int blkif_ioctl(struct inode *inode, str
    6.47  	DPRINTK_IOCTL("command: 0x%x, argument: 0x%lx, dev: 0x%04x\n",
    6.48  		      command, (long)argument, inode->i_rdev);
    6.49  
    6.50 -	switch ( command )
    6.51 -	{
    6.52 +	switch (command) {
    6.53  	case HDIO_GETGEO:
    6.54  		/* return ENOSYS to use defaults */
    6.55  		return -ENOSYS;
    6.56 @@ -490,7 +488,7 @@ int blkif_ioctl(struct inode *inode, str
    6.57   * blkif_queue_request
    6.58   *
    6.59   * request block io
    6.60 - * 
    6.61 + *
    6.62   * id: for guest use only.
    6.63   * operation: BLKIF_OP_{READ,WRITE,PROBE}
    6.64   * buffer: buffer to read/write into. this should be a
    6.65 @@ -557,7 +555,7 @@ static int blkif_queue_request(struct re
    6.66  			ring_req->seg[ring_req->nr_segments] =
    6.67  				(struct blkif_request_segment) {
    6.68  					.gref       = ref,
    6.69 -					.first_sect = fsect, 
    6.70 +					.first_sect = fsect,
    6.71  					.last_sect  = lsect };
    6.72  
    6.73  			ring_req->nr_segments++;
    6.74 @@ -679,9 +677,8 @@ static irqreturn_t blkif_int(int irq, vo
    6.75  		RING_FINAL_CHECK_FOR_RESPONSES(&info->ring, more_to_do);
    6.76  		if (more_to_do)
    6.77  			goto again;
    6.78 -	} else {
    6.79 +	} else
    6.80  		info->ring.sring->rsp_event = i + 1;
    6.81 -	}
    6.82  
    6.83  	kick_pending_request_queues(info);
    6.84  
    6.85 @@ -694,8 +691,8 @@ static void blkif_free(struct blkfront_i
    6.86  {
    6.87  	/* Prevent new requests being issued until we fix things up. */
    6.88  	spin_lock_irq(&blkif_io_lock);
    6.89 -	info->connected = suspend ? 
    6.90 -		BLKIF_STATE_SUSPENDED : BLKIF_STATE_DISCONNECTED; 
    6.91 +	info->connected = suspend ?
    6.92 +		BLKIF_STATE_SUSPENDED : BLKIF_STATE_DISCONNECTED;
    6.93  	spin_unlock_irq(&blkif_io_lock);
    6.94  
    6.95  	/* Free resources associated with old device channel. */
    6.96 @@ -706,7 +703,7 @@ static void blkif_free(struct blkfront_i
    6.97  		info->ring.sring = NULL;
    6.98  	}
    6.99  	if (info->irq)
   6.100 -		unbind_from_irqhandler(info->irq, info); 
   6.101 +		unbind_from_irqhandler(info->irq, info);
   6.102  	info->evtchn = info->irq = 0;
   6.103  
   6.104  }
   6.105 @@ -767,11 +764,11 @@ static void blkif_recover(struct blkfron
   6.106  
   6.107  	kfree(copy);
   6.108  
   6.109 -	(void)xenbus_switch_state(info->xbdev, XBT_NULL, XenbusStateConnected); 
   6.110 -	
   6.111 +	(void)xenbus_switch_state(info->xbdev, XBT_NULL, XenbusStateConnected);
   6.112 +
   6.113  	/* Now safe for us to use the shared ring */
   6.114  	spin_lock_irq(&blkif_io_lock);
   6.115 -        info->connected = BLKIF_STATE_CONNECTED;
   6.116 +	info->connected = BLKIF_STATE_CONNECTED;
   6.117  	spin_unlock_irq(&blkif_io_lock);
   6.118  
   6.119  	/* Send off requeued requests */
     7.1 --- a/linux-2.6-xen-sparse/drivers/xen/blkfront/block.h	Mon Mar 06 18:05:09 2006 +0100
     7.2 +++ b/linux-2.6-xen-sparse/drivers/xen/blkfront/block.h	Mon Mar 06 17:15:10 2006 +0000
     7.3 @@ -55,24 +55,24 @@
     7.4  #include <asm/atomic.h>
     7.5  #include <asm/uaccess.h>
     7.6  
     7.7 -#if 1 
     7.8 +#if 1
     7.9  #define IPRINTK(fmt, args...) \
    7.10      printk(KERN_INFO "xen_blk: " fmt, ##args)
    7.11  #else
    7.12  #define IPRINTK(fmt, args...) ((void)0)
    7.13  #endif
    7.14  
    7.15 -#if 1 
    7.16 +#if 1
    7.17  #define WPRINTK(fmt, args...) \
    7.18      printk(KERN_WARNING "xen_blk: " fmt, ##args)
    7.19  #else
    7.20  #define WPRINTK(fmt, args...) ((void)0)
    7.21  #endif
    7.22 - 
    7.23 -#define DPRINTK(_f, _a...) pr_debug ( _f , ## _a )
    7.24 +
    7.25 +#define DPRINTK(_f, _a...) pr_debug(_f, ## _a)
    7.26  
    7.27  #if 0
    7.28 -#define DPRINTK_IOCTL(_f, _a...) printk ( KERN_ALERT _f , ## _a )
    7.29 +#define DPRINTK_IOCTL(_f, _a...) printk(KERN_ALERT _f, ## _a)
    7.30  #else
    7.31  #define DPRINTK_IOCTL(_f, _a...) ((void)0)
    7.32  #endif
    7.33 @@ -139,7 +139,7 @@ extern int blkif_ioctl(struct inode *ino
    7.34                         unsigned command, unsigned long argument);
    7.35  extern int blkif_check(dev_t dev);
    7.36  extern int blkif_revalidate(dev_t dev);
    7.37 -extern void do_blkif_request (request_queue_t *rq); 
    7.38 +extern void do_blkif_request (request_queue_t *rq);
    7.39  
    7.40  /* Virtual block-device subsystem. */
    7.41  /* Note that xlvbd_add doesn't call add_disk for you: you're expected
     8.1 --- a/linux-2.6-xen-sparse/drivers/xen/console/console.c	Mon Mar 06 18:05:09 2006 +0100
     8.2 +++ b/linux-2.6-xen-sparse/drivers/xen/console/console.c	Mon Mar 06 17:15:10 2006 +0000
     8.3 @@ -85,8 +85,7 @@ static int __init xencons_setup(char *st
     8.4  	else if (!strncmp(str, "off", 3))
     8.5  		xc_mode = XC_OFF;
     8.6  
     8.7 -	switch ( xc_mode )
     8.8 -	{
     8.9 +	switch (xc_mode) {
    8.10  	case XC_SERIAL:
    8.11  		n = simple_strtol(str+4, &q, 10);
    8.12  		if (q > (str + 4))
    8.13 @@ -227,7 +226,7 @@ asmlinkage int xprintk(const char *fmt, 
    8.14  	va_list args;
    8.15  	int printk_len;
    8.16  	static char printk_buf[1024];
    8.17 -    
    8.18 +
    8.19  	/* Emit the output into the temporary buffer */
    8.20  	va_start(args, fmt);
    8.21  	printk_len = vsnprintf(printk_buf, sizeof(printk_buf), fmt, args);
    8.22 @@ -485,7 +484,7 @@ static void xencons_flush_chars(struct t
    8.23  
    8.24  	spin_lock_irqsave(&xencons_lock, flags);
    8.25  	__xencons_tx_flush();
    8.26 -	spin_unlock_irqrestore(&xencons_lock, flags);    
    8.27 +	spin_unlock_irqrestore(&xencons_lock, flags);
    8.28  }
    8.29  
    8.30  static void xencons_wait_until_sent(struct tty_struct *tty, int timeout)
    8.31 @@ -495,17 +494,15 @@ static void xencons_wait_until_sent(stru
    8.32  	if (TTY_INDEX(tty) != 0)
    8.33  		return;
    8.34  
    8.35 -	while (DRV(tty->driver)->chars_in_buffer(tty))
    8.36 -	{
    8.37 +	while (DRV(tty->driver)->chars_in_buffer(tty)) {
    8.38  		set_current_state(TASK_INTERRUPTIBLE);
    8.39  		schedule_timeout(1);
    8.40  		if (signal_pending(current))
    8.41  			break;
    8.42 -		if ( (timeout != 0) &&
    8.43 -		     time_after(jiffies, orig_jiffies + timeout) )
    8.44 +		if (timeout && time_after(jiffies, orig_jiffies + timeout))
    8.45  			break;
    8.46  	}
    8.47 -    
    8.48 +
    8.49  	set_current_state(TASK_RUNNING);
    8.50  }
    8.51  
    8.52 @@ -521,7 +518,7 @@ static int xencons_open(struct tty_struc
    8.53  	if (xencons_tty == NULL)
    8.54  		xencons_tty = tty;
    8.55  	__xencons_tx_flush();
    8.56 -	spin_unlock_irqrestore(&xencons_lock, flags);    
    8.57 +	spin_unlock_irqrestore(&xencons_lock, flags);
    8.58  
    8.59  	return 0;
    8.60  }
    8.61 @@ -543,7 +540,7 @@ static void xencons_close(struct tty_str
    8.62  		tty->closing = 0;
    8.63  		spin_lock_irqsave(&xencons_lock, flags);
    8.64  		xencons_tty = NULL;
    8.65 -		spin_unlock_irqrestore(&xencons_lock, flags);    
    8.66 +		spin_unlock_irqrestore(&xencons_lock, flags);
    8.67  	}
    8.68  }
    8.69  
    8.70 @@ -574,7 +571,7 @@ static int __init xencons_init(void)
    8.71  
    8.72  	xencons_ring_init();
    8.73  
    8.74 -	xencons_driver = alloc_tty_driver((xc_mode == XC_SERIAL) ? 
    8.75 +	xencons_driver = alloc_tty_driver((xc_mode == XC_SERIAL) ?
    8.76  					  1 : MAX_NR_CONSOLES);
    8.77  	if (xencons_driver == NULL)
    8.78  		return -ENOMEM;
    8.79 @@ -584,15 +581,14 @@ static int __init xencons_init(void)
    8.80  	DRV(xencons_driver)->type            = TTY_DRIVER_TYPE_SERIAL;
    8.81  	DRV(xencons_driver)->subtype         = SERIAL_TYPE_NORMAL;
    8.82  	DRV(xencons_driver)->init_termios    = tty_std_termios;
    8.83 -	DRV(xencons_driver)->flags           = 
    8.84 +	DRV(xencons_driver)->flags           =
    8.85  		TTY_DRIVER_REAL_RAW |
    8.86  		TTY_DRIVER_RESET_TERMIOS |
    8.87  		TTY_DRIVER_NO_DEVFS;
    8.88  	DRV(xencons_driver)->termios         = xencons_termios;
    8.89  	DRV(xencons_driver)->termios_locked  = xencons_termios_locked;
    8.90  
    8.91 -	if (xc_mode == XC_SERIAL)
    8.92 -	{
    8.93 +	if (xc_mode == XC_SERIAL) {
    8.94  		DRV(xencons_driver)->name        = "ttyS";
    8.95  		DRV(xencons_driver)->minor_start = 64 + xc_num;
    8.96  		DRV(xencons_driver)->name_base   = 0 + xc_num;
    8.97 @@ -630,7 +626,7 @@ static int __init xencons_init(void)
    8.98  	printk("Xen virtual console successfully installed as %s%d\n",
    8.99  	       DRV(xencons_driver)->name,
   8.100  	       DRV(xencons_driver)->name_base );
   8.101 -    
   8.102 +
   8.103  	return 0;
   8.104  }
   8.105  
     9.1 --- a/linux-2.6-xen-sparse/drivers/xen/console/xencons_ring.c	Mon Mar 06 18:05:09 2006 +0100
     9.2 +++ b/linux-2.6-xen-sparse/drivers/xen/console/xencons_ring.c	Mon Mar 06 17:15:10 2006 +0000
     9.3 @@ -55,7 +55,7 @@ int xencons_ring_send(const char *data, 
     9.4  	notify_daemon();
     9.5  
     9.6  	return sent;
     9.7 -}	
     9.8 +}
     9.9  
    9.10  static irqreturn_t handle_input(int irq, void *unused, struct pt_regs *regs)
    9.11  {
    10.1 --- a/linux-2.6-xen-sparse/drivers/xen/core/evtchn.c	Mon Mar 06 18:05:09 2006 +0100
    10.2 +++ b/linux-2.6-xen-sparse/drivers/xen/core/evtchn.c	Mon Mar 06 17:15:10 2006 +0000
    10.3 @@ -72,7 +72,7 @@ DEFINE_PER_CPU(int, virq_to_irq[NR_VIRQS
    10.4  
    10.5  /* IRQ <-> IPI mapping. */
    10.6  #ifndef NR_IPIS
    10.7 -#define NR_IPIS 1 
    10.8 +#define NR_IPIS 1
    10.9  #endif
   10.10  DEFINE_PER_CPU(int, ipi_to_irq[NR_IPIS]);
   10.11  
   10.12 @@ -209,7 +209,7 @@ static int bind_evtchn_to_irq(unsigned i
   10.13  	irq_bindcount[irq]++;
   10.14  
   10.15  	spin_unlock(&irq_mapping_update_lock);
   10.16 -    
   10.17 +
   10.18  	return irq;
   10.19  }
   10.20  
   10.21 @@ -238,7 +238,7 @@ static int bind_virq_to_irq(unsigned int
   10.22  	irq_bindcount[irq]++;
   10.23  
   10.24  	spin_unlock(&irq_mapping_update_lock);
   10.25 -    
   10.26 +
   10.27  	return irq;
   10.28  }
   10.29  
   10.30 @@ -535,9 +535,9 @@ static unsigned int startup_pirq(unsigne
   10.31  	/* NB. We are happy to share unless we are probing. */
   10.32  	op.u.bind_pirq.flags = probing_irq(irq) ? 0 : BIND_PIRQ__WILL_SHARE;
   10.33  	if (HYPERVISOR_event_channel_op(&op) != 0) {
   10.34 -		if ( !probing_irq(irq) )
   10.35 -			printk(KERN_INFO "Failed to obtain physical "
   10.36 -			       "IRQ %d\n", irq);
   10.37 +		if (!probing_irq(irq))
   10.38 +			printk(KERN_INFO "Failed to obtain physical IRQ %d\n",
   10.39 +			       irq);
   10.40  		return 0;
   10.41  	}
   10.42  	evtchn = op.u.bind_pirq.port;
   10.43 @@ -669,7 +669,7 @@ void unmask_evtchn(int port)
   10.44  	 * like a real IO-APIC we 'lose the interrupt edge' if the channel is
   10.45  	 * masked.
   10.46  	 */
   10.47 -	if (synch_test_bit(port, &s->evtchn_pending[0]) && 
   10.48 +	if (synch_test_bit(port, &s->evtchn_pending[0]) &&
   10.49  	    !synch_test_and_set_bit(port / BITS_PER_LONG,
   10.50  				    &vcpu_info->evtchn_pending_sel)) {
   10.51  		vcpu_info->evtchn_upcall_pending = 1;
   10.52 @@ -722,7 +722,7 @@ void irq_resume(void)
   10.53  		op.u.bind_virq.vcpu = 0;
   10.54  		BUG_ON(HYPERVISOR_event_channel_op(&op) != 0);
   10.55  		evtchn = op.u.bind_virq.port;
   10.56 -        
   10.57 +
   10.58  		/* Record the new mapping. */
   10.59  		evtchn_to_irq[evtchn] = irq;
   10.60  		irq_info[irq] = mk_irq_info(IRQT_VIRQ, virq, evtchn);
   10.61 @@ -744,7 +744,7 @@ void irq_resume(void)
   10.62  		op.u.bind_ipi.vcpu = 0;
   10.63  		BUG_ON(HYPERVISOR_event_channel_op(&op) != 0);
   10.64  		evtchn = op.u.bind_ipi.port;
   10.65 -        
   10.66 +
   10.67  		/* Record the new mapping. */
   10.68  		evtchn_to_irq[evtchn] = irq;
   10.69  		irq_info[irq] = mk_irq_info(IRQT_IPI, ipi, evtchn);
   10.70 @@ -794,8 +794,7 @@ void __init init_IRQ(void)
   10.71  	}
   10.72  
   10.73  	/* Phys IRQ space is statically bound (1:1 mapping). Nail refcnts. */
   10.74 -	for (i = 0; i < NR_PIRQS; i++)
   10.75 -	{
   10.76 +	for (i = 0; i < NR_PIRQS; i++) {
   10.77  		irq_bindcount[pirq_to_irq(i)] = 1;
   10.78  
   10.79  #ifdef RTC_IRQ
    11.1 --- a/linux-2.6-xen-sparse/drivers/xen/core/features.c	Mon Mar 06 18:05:09 2006 +0100
    11.2 +++ b/linux-2.6-xen-sparse/drivers/xen/core/features.c	Mon Mar 06 17:15:10 2006 +0000
    11.3 @@ -19,7 +19,7 @@ void setup_xen_features(void)
    11.4  	xen_feature_info_t fi;
    11.5  	int i, j;
    11.6  
    11.7 -	for (i=0; i<XENFEAT_NR_SUBMAPS; i++) {
    11.8 +	for (i = 0; i < XENFEAT_NR_SUBMAPS; i++) {
    11.9  		fi.submap_idx = i;
   11.10  		if (HYPERVISOR_xen_version(XENVER_get_features, &fi) < 0)
   11.11  			break;
    12.1 --- a/linux-2.6-xen-sparse/drivers/xen/core/gnttab.c	Mon Mar 06 18:05:09 2006 +0100
    12.2 +++ b/linux-2.6-xen-sparse/drivers/xen/core/gnttab.c	Mon Mar 06 17:15:10 2006 +0000
    12.3 @@ -40,7 +40,7 @@
    12.4  
    12.5  #if 1
    12.6  #define ASSERT(_p)							      \
    12.7 -	if ( !(_p) ) { printk(KERN_ALERT"Assertion '%s': line %d, file %s\n", \
    12.8 +	if (!(_p)) { printk(KERN_ALERT"Assertion '%s': line %d, file %s\n",   \
    12.9  	#_p , __LINE__, __FILE__); *(int*)0=0; }
   12.10  #else
   12.11  #define ASSERT(_p) ((void)0)
   12.12 @@ -152,7 +152,7 @@ int
   12.13  gnttab_grant_foreign_access(domid_t domid, unsigned long frame, int readonly)
   12.14  {
   12.15  	int ref;
   12.16 -    
   12.17 +
   12.18  	if (unlikely((ref = get_free_entry()) == -1))
   12.19  		return -ENOSPC;
   12.20  
   12.21 @@ -192,13 +192,12 @@ gnttab_end_foreign_access_ref(grant_ref_
   12.22  
   12.23  	nflags = shared[ref].flags;
   12.24  	do {
   12.25 -		if ( (flags = nflags) & (GTF_reading|GTF_writing) ) {
   12.26 +		if ((flags = nflags) & (GTF_reading|GTF_writing)) {
   12.27  			printk(KERN_ALERT "WARNING: g.e. still in use!\n");
   12.28  			return 0;
   12.29  		}
   12.30 -	}
   12.31 -	while ((nflags = synch_cmpxchg(&shared[ref].flags, flags, 0)) !=
   12.32 -	       flags);
   12.33 +	} while ((nflags = synch_cmpxchg(&shared[ref].flags, flags, 0)) !=
   12.34 +		 flags);
   12.35  
   12.36  	return 1;
   12.37  }
   12.38 @@ -211,8 +210,7 @@ gnttab_end_foreign_access(grant_ref_t re
   12.39  		if (page != 0) {
   12.40  			free_page(page);
   12.41  		}
   12.42 -	}
   12.43 -	else {
   12.44 +	} else {
   12.45  		/* XXX This needs to be fixed so that the ref and page are
   12.46  		   placed on a list to be freed up later. */
   12.47  		printk(KERN_WARNING
   12.48 @@ -253,7 +251,7 @@ gnttab_end_foreign_transfer_ref(grant_re
   12.49           * reference and return failure (== 0).
   12.50           */
   12.51  	while (!((flags = shared[ref].flags) & GTF_transfer_committed)) {
   12.52 -		if ( synch_cmpxchg(&shared[ref].flags, flags, 0) == flags )
   12.53 +		if (synch_cmpxchg(&shared[ref].flags, flags, 0) == flags)
   12.54  			return 0;
   12.55  		cpu_relax();
   12.56  	}
    13.1 --- a/linux-2.6-xen-sparse/drivers/xen/core/reboot.c	Mon Mar 06 18:05:09 2006 +0100
    13.2 +++ b/linux-2.6-xen-sparse/drivers/xen/core/reboot.c	Mon Mar 06 17:15:10 2006 +0000
    13.3 @@ -29,10 +29,11 @@ EXPORT_SYMBOL(pm_power_off);
    13.4  #define SHUTDOWN_POWEROFF  0
    13.5  #define SHUTDOWN_REBOOT    1
    13.6  #define SHUTDOWN_SUSPEND   2
    13.7 -// Code 3 is SHUTDOWN_CRASH, which we don't use because the domain can only
    13.8 -// report a crash, not be instructed to crash!
    13.9 -// HALT is the same as POWEROFF, as far as we're concerned.  The tools use
   13.10 -// the distinction when we return the reason code to them.
   13.11 +/* Code 3 is SHUTDOWN_CRASH, which we don't use because the domain can only
   13.12 + * report a crash, not be instructed to crash!
   13.13 + * HALT is the same as POWEROFF, as far as we're concerned.  The tools use
   13.14 + * the distinction when we return the reason code to them.
   13.15 + */
   13.16  #define SHUTDOWN_HALT      4
   13.17  
   13.18  void machine_emergency_restart(void)
   13.19 @@ -84,14 +85,14 @@ static int __do_suspend(void *ignore)
   13.20  {
   13.21  	int i, j, k, fpp;
   13.22  
   13.23 -	extern int gnttab_suspend(void);
   13.24 -	extern int gnttab_resume(void);
   13.25 -
   13.26 -	extern void time_resume(void);
   13.27  	extern unsigned long max_pfn;
   13.28  	extern unsigned long *pfn_to_mfn_frame_list_list;
   13.29  	extern unsigned long *pfn_to_mfn_frame_list[];
   13.30  
   13.31 +	extern int gnttab_suspend(void);
   13.32 +	extern int gnttab_resume(void);
   13.33 +	extern void time_resume(void);
   13.34 +
   13.35  #ifdef CONFIG_SMP
   13.36  	cpumask_t prev_online_cpus;
   13.37  	int vcpu_prepare(int vcpu);
   13.38 @@ -167,26 +168,26 @@ static int __do_suspend(void *ignore)
   13.39  	 */
   13.40  	HYPERVISOR_suspend(virt_to_mfn(xen_start_info));
   13.41  
   13.42 -	shutting_down = SHUTDOWN_INVALID; 
   13.43 +	shutting_down = SHUTDOWN_INVALID;
   13.44  
   13.45  	set_fixmap(FIX_SHARED_INFO, xen_start_info->shared_info);
   13.46  
   13.47  	HYPERVISOR_shared_info = (shared_info_t *)fix_to_virt(FIX_SHARED_INFO);
   13.48  
   13.49  	memset(empty_zero_page, 0, PAGE_SIZE);
   13.50 -	     
   13.51 +
   13.52  	HYPERVISOR_shared_info->arch.pfn_to_mfn_frame_list_list =
   13.53  		virt_to_mfn(pfn_to_mfn_frame_list_list);
   13.54 -  
   13.55 +
   13.56  	fpp = PAGE_SIZE/sizeof(unsigned long);
   13.57  	for (i = 0, j = 0, k = -1; i < max_pfn; i += fpp, j++) {
   13.58  		if ((j % fpp) == 0) {
   13.59  			k++;
   13.60 -			pfn_to_mfn_frame_list_list[k] = 
   13.61 +			pfn_to_mfn_frame_list_list[k] =
   13.62  				virt_to_mfn(pfn_to_mfn_frame_list[k]);
   13.63  			j = 0;
   13.64  		}
   13.65 -		pfn_to_mfn_frame_list[k][j] = 
   13.66 +		pfn_to_mfn_frame_list[k][j] =
   13.67  			virt_to_mfn(&phys_to_machine_mapping[i]);
   13.68  	}
   13.69  	HYPERVISOR_shared_info->arch.max_pfn = max_pfn;
   13.70 @@ -207,7 +208,7 @@ static int __do_suspend(void *ignore)
   13.71  
   13.72  #endif
   13.73  
   13.74 -	/* 
   13.75 +	/*
   13.76  	 * Only resume xenbus /after/ we've prepared our VCPUs; otherwise
   13.77  	 * the VCPU hotplug callback can race with our vcpu_prepare
   13.78  	 */
   13.79 @@ -231,7 +232,7 @@ static int __do_suspend(void *ignore)
   13.80  
   13.81  static int shutdown_process(void *__unused)
   13.82  {
   13.83 -	static char *envp[] = { "HOME=/", "TERM=linux", 
   13.84 +	static char *envp[] = { "HOME=/", "TERM=linux",
   13.85  				"PATH=/sbin:/usr/sbin:/bin:/usr/bin", NULL };
   13.86  	static char *restart_argv[]  = { "/sbin/reboot", NULL };
   13.87  	static char *poweroff_argv[] = { "/sbin/poweroff", NULL };
   13.88 @@ -291,7 +292,7 @@ static void __shutdown_handler(void *unu
   13.89  	else
   13.90  		err = kthread_create_on_cpu(__do_suspend, NULL, "suspend", 0);
   13.91  
   13.92 -	if ( err < 0 ) {
   13.93 +	if (err < 0) {
   13.94  		printk(KERN_WARNING "Error creating shutdown process (%d): "
   13.95  		       "retrying...\n", -err);
   13.96  		schedule_delayed_work(&shutdown_work, HZ/2);
   13.97 @@ -406,14 +407,12 @@ static int setup_shutdown_watcher(struct
   13.98  	err2 = register_xenbus_watch(&sysrq_watch);
   13.99  #endif
  13.100  
  13.101 -	if (err1) {
  13.102 +	if (err1)
  13.103  		printk(KERN_ERR "Failed to set shutdown watcher\n");
  13.104 -	}
  13.105 -    
  13.106 +
  13.107  #ifdef CONFIG_MAGIC_SYSRQ
  13.108 -	if (err2) {
  13.109 +	if (err2)
  13.110  		printk(KERN_ERR "Failed to set sysrq watcher\n");
  13.111 -	}
  13.112  #endif
  13.113  
  13.114  	return NOTIFY_DONE;
  13.115 @@ -421,11 +420,11 @@ static int setup_shutdown_watcher(struct
  13.116  
  13.117  static int __init setup_shutdown_event(void)
  13.118  {
  13.119 -    
  13.120 +
  13.121  	xenstore_notifier.notifier_call = setup_shutdown_watcher;
  13.122  
  13.123  	register_xenstore_notifier(&xenstore_notifier);
  13.124 -    
  13.125 +
  13.126  	return 0;
  13.127  }
  13.128  
    14.1 --- a/linux-2.6-xen-sparse/drivers/xen/net_driver_util.c	Mon Mar 06 18:05:09 2006 +0100
    14.2 +++ b/linux-2.6-xen-sparse/drivers/xen/net_driver_util.c	Mon Mar 06 17:15:10 2006 +0000
    14.3 @@ -40,9 +40,8 @@ int xen_net_read_mac(struct xenbus_devic
    14.4  	int i;
    14.5  	char *e;
    14.6  	char *macstr = xenbus_read(XBT_NULL, dev->nodename, "mac", NULL);
    14.7 -	if (IS_ERR(macstr)) {
    14.8 +	if (IS_ERR(macstr))
    14.9  		return PTR_ERR(macstr);
   14.10 -	}
   14.11  	s = macstr;
   14.12  	for (i = 0; i < ETH_ALEN; i++) {
   14.13  		mac[i] = simple_strtoul(s, &e, 16);
    15.1 --- a/linux-2.6-xen-sparse/drivers/xen/netfront/netfront.c	Mon Mar 06 18:05:09 2006 +0100
    15.2 +++ b/linux-2.6-xen-sparse/drivers/xen/netfront/netfront.c	Mon Mar 06 17:15:10 2006 +0000
    15.3 @@ -91,7 +91,7 @@ struct netfront_info
    15.4  
    15.5  	struct net_device_stats stats;
    15.6  	unsigned int tx_full;
    15.7 -    
    15.8 +
    15.9  	netif_tx_front_ring_t tx;
   15.10  	netif_rx_front_ring_t rx;
   15.11  
   15.12 @@ -129,9 +129,9 @@ struct netfront_info
   15.13  	struct sk_buff *rx_skbs[NET_RX_RING_SIZE+1];
   15.14  
   15.15  	grant_ref_t gref_tx_head;
   15.16 -	grant_ref_t grant_tx_ref[NET_TX_RING_SIZE + 1]; 
   15.17 +	grant_ref_t grant_tx_ref[NET_TX_RING_SIZE + 1];
   15.18  	grant_ref_t gref_rx_head;
   15.19 -	grant_ref_t grant_rx_ref[NET_TX_RING_SIZE + 1]; 
   15.20 +	grant_ref_t grant_rx_ref[NET_TX_RING_SIZE + 1];
   15.21  
   15.22  	struct xenbus_device *xbdev;
   15.23  	int tx_ring_ref;
   15.24 @@ -433,7 +433,7 @@ static int send_fake_arp(struct net_devi
   15.25  
   15.26  	skb = arp_create(ARPOP_REPLY, ETH_P_ARP,
   15.27  			 dst_ip, dev, src_ip,
   15.28 -			 /*dst_hw*/ NULL, /*src_hw*/ NULL, 
   15.29 +			 /*dst_hw*/ NULL, /*src_hw*/ NULL,
   15.30  			 /*target_hw*/ dev->dev_addr);
   15.31  	if (skb == NULL)
   15.32  		return -ENOMEM;
   15.33 @@ -480,7 +480,7 @@ static void network_tx_buf_gc(struct net
   15.34  				printk(KERN_ALERT "network_tx_buf_gc: warning "
   15.35  				       "-- grant still in use by backend "
   15.36  				       "domain.\n");
   15.37 -				goto out; 
   15.38 +				goto out;
   15.39  			}
   15.40  			gnttab_end_foreign_access_ref(
   15.41  				np->grant_tx_ref[id], GNTMAP_readonly);
   15.42 @@ -490,9 +490,9 @@ static void network_tx_buf_gc(struct net
   15.43  			ADD_ID_TO_FREELIST(np->tx_skbs, id);
   15.44  			dev_kfree_skb_irq(skb);
   15.45  		}
   15.46 -        
   15.47 +
   15.48  		np->tx.rsp_cons = prod;
   15.49 -        
   15.50 +
   15.51  		/*
   15.52  		 * Set a new event, then check for race with update of tx_cons.
   15.53  		 * Note that it is essential to schedule a callback, no matter
   15.54 @@ -506,7 +506,7 @@ static void network_tx_buf_gc(struct net
   15.55  		mb();
   15.56  	} while (prod != np->tx.sring->rsp_prod);
   15.57  
   15.58 - out: 
   15.59 + out:
   15.60  	if (np->tx_full &&
   15.61  	    ((np->tx.sring->req_prod - prod) < NET_TX_RING_SIZE)) {
   15.62  		np->tx_full = 0;
   15.63 @@ -582,7 +582,7 @@ static void network_alloc_rx_buffers(str
   15.64  		id = GET_ID_FROM_FREELIST(np->rx_skbs);
   15.65  
   15.66  		np->rx_skbs[id] = skb;
   15.67 -        
   15.68 +
   15.69  		RING_GET_REQUEST(&np->rx, req_prod + i)->id = id;
   15.70  		ref = gnttab_claim_grant_reference(&np->gref_rx_head);
   15.71  		BUG_ON((signed short)ref < 0);
   15.72 @@ -628,11 +628,10 @@ static void network_alloc_rx_buffers(str
   15.73  		/* Check return status of HYPERVISOR_memory_op(). */
   15.74  		if (unlikely(rx_mcl[i].result != i))
   15.75  			panic("Unable to reduce memory reservation\n");
   15.76 -	} else {
   15.77 +	} else
   15.78  		if (HYPERVISOR_memory_op(XENMEM_decrease_reservation,
   15.79  					 &reservation) != i)
   15.80  			panic("Unable to reduce memory reservation\n");
   15.81 -	}
   15.82  
   15.83  	/* Above is a suitable barrier to ensure backend will see requests. */
   15.84  	np->rx.req_prod_pvt = req_prod + i;
   15.85 @@ -668,7 +667,7 @@ static int network_start_xmit(struct sk_
   15.86  		dev_kfree_skb(skb);
   15.87  		skb = nskb;
   15.88  	}
   15.89 -    
   15.90 +
   15.91  	spin_lock_irq(&np->tx_lock);
   15.92  
   15.93  	if (np->backend_state != BEST_CONNECTED) {
   15.94 @@ -765,7 +764,7 @@ static int netif_poll(struct net_device 
   15.95  	rp = np->rx.sring->rsp_prod;
   15.96  	rmb(); /* Ensure we see queued responses up to 'rp'. */
   15.97  
   15.98 -	for (i = np->rx.rsp_cons, work_done = 0; 
   15.99 +	for (i = np->rx.rsp_cons, work_done = 0;
  15.100  	     (i != rp) && (work_done < budget);
  15.101  	     i++, work_done++) {
  15.102  		rx = RING_GET_RESPONSE(&np->rx, i);
  15.103 @@ -807,7 +806,7 @@ static int netif_poll(struct net_device 
  15.104  		skb->len  = rx->status;
  15.105  		skb->tail = skb->data + skb->len;
  15.106  
  15.107 -		if ( rx->flags & NETRXF_csum_valid )
  15.108 +		if (rx->flags & NETRXF_csum_valid)
  15.109  			skb->ip_summed = CHECKSUM_UNNECESSARY;
  15.110  
  15.111  		np->stats.rx_packets++;
  15.112 @@ -862,7 +861,7 @@ static int netif_poll(struct net_device 
  15.113  		 * Enough room in skbuff for the data we were passed? Also,
  15.114  		 * Linux expects at least 16 bytes headroom in each rx buffer.
  15.115  		 */
  15.116 -		if (unlikely(skb->tail > skb->end) || 
  15.117 +		if (unlikely(skb->tail > skb->end) ||
  15.118  		    unlikely((skb->data - skb->head) < 16)) {
  15.119  			if (net_ratelimit()) {
  15.120  				if (skb->tail > skb->end)
  15.121 @@ -894,7 +893,7 @@ static int netif_poll(struct net_device 
  15.122  			if ((skb = nskb) == NULL)
  15.123  				continue;
  15.124  		}
  15.125 -        
  15.126 +
  15.127  		/* Set the shinfo area, which is hidden behind the data. */
  15.128  		init_skb_shinfo(skb);
  15.129  		/* Ethernet work: Delayed to here as it peeks the header. */
  15.130 @@ -995,9 +994,9 @@ static void network_connect(struct net_d
  15.131  
  15.132  		tx->id = i;
  15.133  		gnttab_grant_foreign_access_ref(
  15.134 -			np->grant_tx_ref[i], np->xbdev->otherend_id, 
  15.135 +			np->grant_tx_ref[i], np->xbdev->otherend_id,
  15.136  			virt_to_mfn(np->tx_skbs[i]->data),
  15.137 -			GNTMAP_readonly); 
  15.138 +			GNTMAP_readonly);
  15.139  		tx->gref = np->grant_tx_ref[i];
  15.140  		tx->offset = (unsigned long)skb->data & ~PAGE_MASK;
  15.141  		tx->size = skb->len;
  15.142 @@ -1012,7 +1011,7 @@ static void network_connect(struct net_d
  15.143  	RING_PUSH_REQUESTS(&np->tx);
  15.144  
  15.145  	/* Rebuild the RX buffer freelist and the RX ring itself. */
  15.146 -	for (requeue_idx = 0, i = 1; i <= NET_RX_RING_SIZE; i++) { 
  15.147 +	for (requeue_idx = 0, i = 1; i <= NET_RX_RING_SIZE; i++) {
  15.148  		if ((unsigned long)np->rx_skbs[i] < __PAGE_OFFSET)
  15.149  			continue;
  15.150  		gnttab_grant_foreign_transfer_ref(
  15.151 @@ -1021,7 +1020,7 @@ static void network_connect(struct net_d
  15.152  		RING_GET_REQUEST(&np->rx, requeue_idx)->gref =
  15.153  			np->grant_rx_ref[i];
  15.154  		RING_GET_REQUEST(&np->rx, requeue_idx)->id = i;
  15.155 -		requeue_idx++; 
  15.156 +		requeue_idx++;
  15.157  	}
  15.158  
  15.159  	np->rx.req_prod_pvt = requeue_idx;
  15.160 @@ -1055,9 +1054,8 @@ static void show_device(struct netfront_
  15.161  			np->evtchn,
  15.162  			np->tx,
  15.163  			np->rx);
  15.164 -	} else {
  15.165 +	} else
  15.166  		IPRINTK("<vif NULL>\n");
  15.167 -	}
  15.168  #endif
  15.169  }
  15.170  
  15.171 @@ -1150,7 +1148,7 @@ static int create_netdev(int handle, str
  15.172  	SET_ETHTOOL_OPS(netdev, &network_ethtool_ops);
  15.173  	SET_MODULE_OWNER(netdev);
  15.174  	SET_NETDEV_DEV(netdev, &dev->dev);
  15.175 -    
  15.176 +
  15.177  	if ((err = register_netdev(netdev)) != 0) {
  15.178  		printk(KERN_WARNING "%s> register_netdev err=%d\n",
  15.179  		       __FUNCTION__, err);
  15.180 @@ -1181,16 +1179,16 @@ static int create_netdev(int handle, str
  15.181   * We use this notifier to send out a fake ARP reply to reset switches and
  15.182   * router ARP caches when an IP interface is brought up on a VIF.
  15.183   */
  15.184 -static int 
  15.185 +static int
  15.186  inetdev_notify(struct notifier_block *this, unsigned long event, void *ptr)
  15.187  {
  15.188 -	struct in_ifaddr  *ifa = (struct in_ifaddr *)ptr; 
  15.189 +	struct in_ifaddr  *ifa = (struct in_ifaddr *)ptr;
  15.190  	struct net_device *dev = ifa->ifa_dev->dev;
  15.191  
  15.192  	/* UP event and is it one of our devices? */
  15.193  	if (event == NETDEV_UP && dev->open == network_open)
  15.194  		(void)send_fake_arp(dev);
  15.195 -        
  15.196 +
  15.197  	return NOTIFY_DONE;
  15.198  }
  15.199  
  15.200 @@ -1336,8 +1334,8 @@ static void netif_exit(void)
  15.201  module_exit(netif_exit);
  15.202  
  15.203  MODULE_LICENSE("Dual BSD/GPL");
  15.204 - 
  15.205 - 
  15.206 +
  15.207 +
  15.208  /* ** /proc **/
  15.209  
  15.210  
  15.211 @@ -1354,9 +1352,8 @@ static int xennet_proc_read(
  15.212  		(struct net_device *)((unsigned long)data & ~3UL);
  15.213  	struct netfront_info *np = netdev_priv(dev);
  15.214  	int len = 0, which_target = (long)data & 3;
  15.215 -    
  15.216 -	switch (which_target)
  15.217 -	{
  15.218 +
  15.219 +	switch (which_target) {
  15.220  	case TARGET_MIN:
  15.221  		len = sprintf(page, "%d\n", np->rx_min_target);
  15.222  		break;
  15.223 @@ -1403,8 +1400,7 @@ static int xennet_proc_write(
  15.224  
  15.225  	spin_lock(&np->rx_lock);
  15.226  
  15.227 -	switch (which_target)
  15.228 -	{
  15.229 +	switch (which_target) {
  15.230  	case TARGET_MIN:
  15.231  		if (target > np->rx_max_target)
  15.232  			np->rx_max_target = target;
    16.1 --- a/linux-2.6-xen-sparse/drivers/xen/xenbus/Makefile	Mon Mar 06 18:05:09 2006 +0100
    16.2 +++ b/linux-2.6-xen-sparse/drivers/xen/xenbus/Makefile	Mon Mar 06 17:15:10 2006 +0000
    16.3 @@ -1,8 +1,8 @@
    16.4  obj-y	+= xenbus.o
    16.5  
    16.6  xenbus-objs =
    16.7 -xenbus-objs += xenbus_client.o 
    16.8 +xenbus-objs += xenbus_client.o
    16.9  xenbus-objs += xenbus_comms.o
   16.10  xenbus-objs += xenbus_xs.o
   16.11 -xenbus-objs += xenbus_probe.o 
   16.12 -xenbus-objs += xenbus_dev.o 
   16.13 +xenbus-objs += xenbus_probe.o
   16.14 +xenbus-objs += xenbus_dev.o
    17.1 --- a/linux-2.6-xen-sparse/drivers/xen/xenbus/xenbus_client.c	Mon Mar 06 18:05:09 2006 +0100
    17.2 +++ b/linux-2.6-xen-sparse/drivers/xen/xenbus/xenbus_client.c	Mon Mar 06 17:15:10 2006 +0000
    17.3 @@ -39,7 +39,7 @@ extern char *kasprintf(const char *fmt, 
    17.4      pr_debug("xenbus_client (%s:%d) " fmt ".\n", __FUNCTION__, __LINE__, ##args)
    17.5  
    17.6  int xenbus_watch_path(struct xenbus_device *dev, const char *path,
    17.7 -		      struct xenbus_watch *watch, 
    17.8 +		      struct xenbus_watch *watch,
    17.9  		      void (*callback)(struct xenbus_watch *,
   17.10  				       const char **, unsigned int))
   17.11  {
   17.12 @@ -62,7 +62,7 @@ EXPORT_SYMBOL(xenbus_watch_path);
   17.13  
   17.14  
   17.15  int xenbus_watch_path2(struct xenbus_device *dev, const char *path,
   17.16 -		       const char *path2, struct xenbus_watch *watch, 
   17.17 +		       const char *path2, struct xenbus_watch *watch,
   17.18  		       void (*callback)(struct xenbus_watch *,
   17.19  					const char **, unsigned int))
   17.20  {
   17.21 @@ -74,9 +74,8 @@ int xenbus_watch_path2(struct xenbus_dev
   17.22  	}
   17.23  	err = xenbus_watch_path(dev, state, watch, callback);
   17.24  
   17.25 -	if (err) {
   17.26 +	if (err)
   17.27  		kfree(state);
   17.28 -	}
   17.29  	return err;
   17.30  }
   17.31  EXPORT_SYMBOL(xenbus_watch_path2);
   17.32 @@ -190,7 +189,7 @@ void xenbus_dev_fatal(struct xenbus_devi
   17.33  	va_start(ap, fmt);
   17.34  	_dev_error(dev, err, fmt, ap);
   17.35  	va_end(ap);
   17.36 -	
   17.37 +
   17.38  	xenbus_switch_state(dev, XBT_NULL, XenbusStateClosing);
   17.39  }
   17.40  EXPORT_SYMBOL(xenbus_dev_fatal);
   17.41 @@ -213,7 +212,6 @@ int xenbus_alloc_evtchn(struct xenbus_de
   17.42  		.u.alloc_unbound.dom = DOMID_SELF,
   17.43  		.u.alloc_unbound.remote_dom = dev->otherend_id
   17.44  	};
   17.45 -
   17.46  	int err = HYPERVISOR_event_channel_op(&op);
   17.47  	if (err)
   17.48  		xenbus_dev_fatal(dev, err, "allocating event channel");
   17.49 @@ -231,7 +229,6 @@ int xenbus_bind_evtchn(struct xenbus_dev
   17.50  		.u.bind_interdomain.remote_dom = dev->otherend_id,
   17.51  		.u.bind_interdomain.remote_port = remote_port,
   17.52  	};
   17.53 -
   17.54  	int err = HYPERVISOR_event_channel_op(&op);
   17.55  	if (err)
   17.56  		xenbus_dev_fatal(dev, err,
   17.57 @@ -388,7 +385,6 @@ EXPORT_SYMBOL(xenbus_unmap_ring);
   17.58  XenbusState xenbus_read_driver_state(const char *path)
   17.59  {
   17.60  	XenbusState result;
   17.61 -
   17.62  	int err = xenbus_gather(XBT_NULL, path, "state", "%d", &result, NULL);
   17.63  	if (err)
   17.64  		result = XenbusStateClosed;
    18.1 --- a/linux-2.6-xen-sparse/drivers/xen/xenbus/xenbus_comms.c	Mon Mar 06 18:05:09 2006 +0100
    18.2 +++ b/linux-2.6-xen-sparse/drivers/xen/xenbus/xenbus_comms.c	Mon Mar 06 17:15:10 2006 +0000
    18.3 @@ -38,8 +38,8 @@
    18.4  
    18.5  static int xenbus_irq;
    18.6  
    18.7 -extern void xenbus_probe(void *); 
    18.8 -extern int xenstored_ready; 
    18.9 +extern void xenbus_probe(void *);
   18.10 +extern int xenstored_ready;
   18.11  static DECLARE_WORK(probe_work, xenbus_probe, NULL);
   18.12  
   18.13  DECLARE_WAIT_QUEUE_HEAD(xb_waitq);
   18.14 @@ -52,9 +52,9 @@ static inline struct xenstore_domain_int
   18.15  static irqreturn_t wake_waiting(int irq, void *unused, struct pt_regs *regs)
   18.16  {
   18.17  	if (unlikely(xenstored_ready == 0)) {
   18.18 -		xenstored_ready = 1; 
   18.19 -		schedule_work(&probe_work); 
   18.20 -	} 
   18.21 +		xenstored_ready = 1;
   18.22 +		schedule_work(&probe_work);
   18.23 +	}
   18.24  
   18.25  	wake_up(&xb_waitq);
   18.26  	return IRQ_HANDLED;
    19.1 --- a/linux-2.6-xen-sparse/drivers/xen/xenbus/xenbus_probe.c	Mon Mar 06 18:05:09 2006 +0100
    19.2 +++ b/linux-2.6-xen-sparse/drivers/xen/xenbus/xenbus_probe.c	Mon Mar 06 17:15:10 2006 +0000
    19.3 @@ -366,7 +366,6 @@ fail:
    19.4  	xenbus_dev_error(dev, err, "xenbus_dev_probe on %s", dev->nodename);
    19.5  	xenbus_switch_state(dev, XBT_NULL, XenbusStateClosed);
    19.6  	return -ENODEV;
    19.7 -	
    19.8  }
    19.9  
   19.10  static int xenbus_dev_remove(struct device *_dev)
   19.11 @@ -495,9 +494,8 @@ static void xenbus_dev_free(struct xenbu
   19.12  
   19.13  static void xenbus_dev_release(struct device *dev)
   19.14  {
   19.15 -	if (dev) {
   19.16 +	if (dev)
   19.17  		xenbus_dev_free(to_xenbus_device(dev));
   19.18 -	}
   19.19  }
   19.20  
   19.21  /* Simplified asprintf. */
   19.22 @@ -600,7 +598,7 @@ static int xenbus_probe_frontend(const c
   19.23  	nodename = kasprintf("%s/%s/%s", xenbus_frontend.root, type, name);
   19.24  	if (!nodename)
   19.25  		return -ENOMEM;
   19.26 -	
   19.27 +
   19.28  	DPRINTK("%s", nodename);
   19.29  
   19.30  	err = xenbus_probe_node(&xenbus_frontend, type, nodename);
   19.31 @@ -972,6 +970,7 @@ static int xsd_kva_read(char *page, char
   19.32                          int count, int *eof, void *data)
   19.33  {
   19.34  	int len;
   19.35 +
   19.36  	len  = sprintf(page, "0x%p", mfn_to_virt(xen_start_info->store_mfn));
   19.37  	*eof = 1;
   19.38  	return len;
   19.39 @@ -1006,8 +1005,8 @@ static int __init xenbus_probe_init(void
   19.40  	device_register(&xenbus_backend.dev);
   19.41  
   19.42  	/*
   19.43 -	** Domain0 doesn't have a store_evtchn or store_mfn yet.
   19.44 -	*/
   19.45 +	 * Domain0 doesn't have a store_evtchn or store_mfn yet.
   19.46 +	 */
   19.47  	dom0 = (xen_start_info->store_evtchn == 0);
   19.48  
   19.49  	if (dom0) {
   19.50 @@ -1029,7 +1028,7 @@ static int __init xenbus_probe_init(void
   19.51  		xen_start_info->store_mfn =
   19.52  			pfn_to_mfn(virt_to_phys((void *)page) >>
   19.53  				   PAGE_SHIFT);
   19.54 -		
   19.55 +
   19.56  		/* Next allocate a local port which xenstored can bind to */
   19.57  		op.cmd = EVTCHNOP_alloc_unbound;
   19.58  		op.u.alloc_unbound.dom        = DOMID_SELF;
   19.59 @@ -1040,14 +1039,16 @@ static int __init xenbus_probe_init(void
   19.60  		xen_start_info->store_evtchn = op.u.alloc_unbound.port;
   19.61  
   19.62  		/* And finally publish the above info in /proc/xen */
   19.63 -		if ((xsd_kva_intf = create_xen_proc_entry("xsd_kva", 0400))) {
   19.64 +		xsd_kva_intf = create_xen_proc_entry("xsd_kva", 0400);
   19.65 +		if (xsd_kva_intf) {
   19.66  			memcpy(&xsd_kva_fops, xsd_kva_intf->proc_fops,
   19.67  			       sizeof(xsd_kva_fops));
   19.68  			xsd_kva_fops.mmap = xsd_kva_mmap;
   19.69  			xsd_kva_intf->proc_fops = &xsd_kva_fops;
   19.70  			xsd_kva_intf->read_proc = xsd_kva_read;
   19.71  		}
   19.72 -		if ((xsd_port_intf = create_xen_proc_entry("xsd_port", 0400)))
   19.73 +		xsd_port_intf = create_xen_proc_entry("xsd_port", 0400);
   19.74 +		if (xsd_port_intf)
   19.75  			xsd_port_intf->read_proc = xsd_port_read;
   19.76  	}
   19.77  
    20.1 --- a/linux-2.6-xen-sparse/drivers/xen/xenbus/xenbus_xs.c	Mon Mar 06 18:05:09 2006 +0100
    20.2 +++ b/linux-2.6-xen-sparse/drivers/xen/xenbus/xenbus_xs.c	Mon Mar 06 17:15:10 2006 +0000
    20.3 @@ -176,9 +176,8 @@ void *xenbus_dev_request_and_reply(struc
    20.4  	if (err) {
    20.5  		msg->type = XS_ERROR;
    20.6  		ret = ERR_PTR(err);
    20.7 -	} else {
    20.8 +	} else
    20.9  		ret = read_reply(&msg->type, &msg->len);
   20.10 -	}
   20.11  
   20.12  	up(&xs_state.request_mutex);
   20.13  
   20.14 @@ -275,7 +274,7 @@ static unsigned int count_strings(const 
   20.15  	return num;
   20.16  }
   20.17  
   20.18 -/* Return the path to dir with /name appended. Buffer must be kfree()'ed. */ 
   20.19 +/* Return the path to dir with /name appended. Buffer must be kfree()'ed. */
   20.20  static char *join(const char *dir, const char *name)
   20.21  {
   20.22  	char *buffer;
    21.1 --- a/linux-2.6-xen-sparse/include/asm-i386/mach-xen/asm/page.h	Mon Mar 06 18:05:09 2006 +0100
    21.2 +++ b/linux-2.6-xen-sparse/include/asm-i386/mach-xen/asm/page.h	Mon Mar 06 17:15:10 2006 +0000
    21.3 @@ -71,7 +71,8 @@ static inline unsigned long pfn_to_mfn(u
    21.4  {
    21.5  	if (xen_feature(XENFEAT_auto_translated_physmap))
    21.6  		return pfn;
    21.7 -	return phys_to_machine_mapping[(unsigned int)(pfn)] & ~FOREIGN_FRAME_BIT;
    21.8 +	return phys_to_machine_mapping[(unsigned int)(pfn)] &
    21.9 +		~FOREIGN_FRAME_BIT;
   21.10  }
   21.11  
   21.12  static inline int phys_to_machine_mapping_valid(unsigned long pfn)
    22.1 --- a/linux-2.6-xen-sparse/include/asm-i386/mach-xen/asm/pgtable-3level.h	Mon Mar 06 18:05:09 2006 +0100
    22.2 +++ b/linux-2.6-xen-sparse/include/asm-i386/mach-xen/asm/pgtable-3level.h	Mon Mar 06 17:15:10 2006 +0000
    22.3 @@ -131,8 +131,8 @@ static inline int pte_none(pte_t pte)
    22.4  	return !pte.pte_low && !pte.pte_high;
    22.5  }
    22.6  
    22.7 -#define pte_mfn(_pte) ( ((_pte).pte_low >> PAGE_SHIFT) |\
    22.8 -		        (((_pte).pte_high & 0xfff) << (32-PAGE_SHIFT)) )
    22.9 +#define pte_mfn(_pte) (((_pte).pte_low >> PAGE_SHIFT) |\
   22.10 +		       (((_pte).pte_high & 0xfff) << (32-PAGE_SHIFT)))
   22.11  #define pte_pfn(_pte) mfn_to_local_pfn(pte_mfn(_pte))
   22.12  
   22.13  extern unsigned long long __supported_pte_mask;
    23.1 --- a/linux-2.6-xen-sparse/include/asm-i386/mach-xen/asm/system.h	Mon Mar 06 18:05:09 2006 +0100
    23.2 +++ b/linux-2.6-xen-sparse/include/asm-i386/mach-xen/asm/system.h	Mon Mar 06 17:15:10 2006 +0000
    23.3 @@ -596,7 +596,7 @@ do {									\
    23.4  	_vcpu = &HYPERVISOR_shared_info->vcpu_info[__vcpu_id];		\
    23.5  	_vcpu->evtchn_upcall_mask = 0;					\
    23.6  	barrier(); /* unmask then check (avoid races) */		\
    23.7 -	if ( unlikely(_vcpu->evtchn_upcall_pending) )			\
    23.8 +	if (unlikely(_vcpu->evtchn_upcall_pending))			\
    23.9  		force_evtchn_callback();				\
   23.10  	preempt_enable();						\
   23.11  } while (0)
   23.12 @@ -618,7 +618,7 @@ do {									\
   23.13  	_vcpu = &HYPERVISOR_shared_info->vcpu_info[__vcpu_id];		\
   23.14  	if ((_vcpu->evtchn_upcall_mask = (x)) == 0) {			\
   23.15  		barrier(); /* unmask then check (avoid races) */	\
   23.16 -		if ( unlikely(_vcpu->evtchn_upcall_pending) )		\
   23.17 +		if (unlikely(_vcpu->evtchn_upcall_pending))		\
   23.18  			force_evtchn_callback();			\
   23.19  		preempt_enable();					\
   23.20  	} else								\
    24.1 --- a/linux-2.6-xen-sparse/include/asm-x86_64/mach-xen/asm/page.h	Mon Mar 06 18:05:09 2006 +0100
    24.2 +++ b/linux-2.6-xen-sparse/include/asm-x86_64/mach-xen/asm/page.h	Mon Mar 06 17:15:10 2006 +0000
    24.3 @@ -89,7 +89,8 @@ static inline unsigned long pfn_to_mfn(u
    24.4  {
    24.5  	if (xen_feature(XENFEAT_auto_translated_physmap))
    24.6  		return pfn;
    24.7 -	return phys_to_machine_mapping[(unsigned int)(pfn)] & ~FOREIGN_FRAME_BIT;
    24.8 +	return phys_to_machine_mapping[(unsigned int)(pfn)] &
    24.9 +		~FOREIGN_FRAME_BIT;
   24.10  }
   24.11  
   24.12  static inline int phys_to_machine_mapping_valid(unsigned long pfn)
    25.1 --- a/linux-2.6-xen-sparse/include/linux/mm.h	Mon Mar 06 18:05:09 2006 +0100
    25.2 +++ b/linux-2.6-xen-sparse/include/linux/mm.h	Mon Mar 06 17:15:10 2006 +0000
    25.3 @@ -1020,9 +1020,9 @@ struct page *follow_page(struct vm_area_
    25.4  #define FOLL_ANON	0x08	/* give ZERO_PAGE if no pgtable */
    25.5  
    25.6  #ifdef CONFIG_XEN
    25.7 -typedef int (*pte_fn_t)(pte_t *pte, struct page *pte_page, unsigned long addr, 
    25.8 +typedef int (*pte_fn_t)(pte_t *pte, struct page *pte_page, unsigned long addr,
    25.9                          void *data);
   25.10 -extern int generic_page_range(struct mm_struct *mm, unsigned long address, 
   25.11 +extern int generic_page_range(struct mm_struct *mm, unsigned long address,
   25.12                                unsigned long size, pte_fn_t fn, void *data);
   25.13  #endif
   25.14  
    26.1 --- a/linux-2.6-xen-sparse/include/xen/xenbus.h	Mon Mar 06 18:05:09 2006 +0100
    26.2 +++ b/linux-2.6-xen-sparse/include/xen/xenbus.h	Mon Mar 06 17:15:10 2006 +0000
    26.3 @@ -28,8 +28,8 @@
    26.4   * IN THE SOFTWARE.
    26.5   */
    26.6  
    26.7 -#ifndef _ASM_XEN_XENBUS_H
    26.8 -#define _ASM_XEN_XENBUS_H
    26.9 +#ifndef _XEN_XENBUS_H
   26.10 +#define _XEN_XENBUS_H
   26.11  
   26.12  #include <linux/device.h>
   26.13  #include <linux/notifier.h>
   26.14 @@ -170,7 +170,7 @@ void xenbus_resume(void);
   26.15   * be saved in the store.
   26.16   */
   26.17  int xenbus_watch_path(struct xenbus_device *dev, const char *path,
   26.18 -		      struct xenbus_watch *watch, 
   26.19 +		      struct xenbus_watch *watch,
   26.20  		      void (*callback)(struct xenbus_watch *,
   26.21  				       const char **, unsigned int));
   26.22  
   26.23 @@ -185,7 +185,7 @@ int xenbus_watch_path(struct xenbus_devi
   26.24   * saved in the store.
   26.25   */
   26.26  int xenbus_watch_path2(struct xenbus_device *dev, const char *path,
   26.27 -		       const char *path2, struct xenbus_watch *watch, 
   26.28 +		       const char *path2, struct xenbus_watch *watch,
   26.29  		       void (*callback)(struct xenbus_watch *,
   26.30  					const char **, unsigned int));
   26.31  
   26.32 @@ -216,8 +216,8 @@ int xenbus_grant_ring(struct xenbus_devi
   26.33   * page to that address, and sets *vaddr to that address.
   26.34   * xenbus_map_ring does not allocate the virtual address space (you must do
   26.35   * this yourself!). It only maps in the page to the specified address.
   26.36 - * Returns 0 on success, and GNTST_* (see xen/include/public/grant_table.h) or
   26.37 - * -ENOMEM on error. If an error is returned, device will switch to
   26.38 + * Returns 0 on success, and GNTST_* (see xen/include/interface/grant_table.h)
   26.39 + * or -ENOMEM on error. If an error is returned, device will switch to
   26.40   * XenbusStateClosing and the error message will be saved in XenStore.
   26.41   */
   26.42  int xenbus_map_ring_valloc(struct xenbus_device *dev,
   26.43 @@ -231,7 +231,7 @@ int xenbus_map_ring(struct xenbus_device
   26.44   * Use xenbus_unmap_ring_vfree if you mapped in your memory with
   26.45   * xenbus_map_ring_valloc (it will free the virtual address space).
   26.46   * Returns 0 on success and returns GNTST_* on error
   26.47 - * (see xen/include/public/grant_table.h).
   26.48 + * (see xen/include/interface/grant_table.h).
   26.49   */
   26.50  int xenbus_unmap_ring_vfree(struct xenbus_device *dev, void *vaddr);
   26.51  int xenbus_unmap_ring(struct xenbus_device *dev,
   26.52 @@ -285,7 +285,7 @@ void xenbus_dev_fatal(struct xenbus_devi
   26.53  		      ...);
   26.54  
   26.55  
   26.56 -#endif /* _ASM_XEN_XENBUS_H */
   26.57 +#endif /* _XEN_XENBUS_H */
   26.58  
   26.59  /*
   26.60   * Local variables:
    27.1 --- a/xen/include/public/acm.h	Mon Mar 06 18:05:09 2006 +0100
    27.2 +++ b/xen/include/public/acm.h	Mon Mar 06 17:15:10 2006 +0000
    27.3 @@ -152,7 +152,7 @@ struct acm_ste_stats_buffer {
    27.4      uint32_t ec_eval_count;
    27.5      uint32_t gt_eval_count;
    27.6      uint32_t ec_denied_count;
    27.7 -    uint32_t gt_denied_count; 
    27.8 +    uint32_t gt_denied_count;
    27.9      uint32_t ec_cachehit_count;
   27.10      uint32_t gt_cachehit_count;
   27.11  };
    28.1 --- a/xen/include/public/arch-ia64.h	Mon Mar 06 18:05:09 2006 +0100
    28.2 +++ b/xen/include/public/arch-ia64.h	Mon Mar 06 17:15:10 2006 +0000
    28.3 @@ -60,8 +60,8 @@ typedef struct {
    28.4  
    28.5  #define INVALID_MFN       (~0UL)
    28.6  
    28.7 -#define MEM_G   (1UL << 30)	
    28.8 -#define MEM_M   (1UL << 20)	
    28.9 +#define MEM_G   (1UL << 30)
   28.10 +#define MEM_M   (1UL << 20)
   28.11  
   28.12  #define MMIO_START       (3 * MEM_G)
   28.13  #define MMIO_SIZE        (512 * MEM_M)
   28.14 @@ -70,7 +70,7 @@ typedef struct {
   28.15  #define VGA_IO_SIZE      0x20000
   28.16  
   28.17  #define LEGACY_IO_START  (MMIO_START + MMIO_SIZE)
   28.18 -#define LEGACY_IO_SIZE   (64*MEM_M)  
   28.19 +#define LEGACY_IO_SIZE   (64*MEM_M)
   28.20  
   28.21  #define IO_PAGE_START (LEGACY_IO_START + LEGACY_IO_SIZE)
   28.22  #define IO_PAGE_SIZE  PAGE_SIZE
   28.23 @@ -82,7 +82,7 @@ typedef struct {
   28.24  #define IO_SAPIC_SIZE    0x100000
   28.25  
   28.26  #define PIB_START 0xfee00000UL
   28.27 -#define PIB_SIZE 0x100000 
   28.28 +#define PIB_SIZE 0x100000
   28.29  
   28.30  #define GFW_START        (4*MEM_G -16*MEM_M)
   28.31  #define GFW_SIZE         (16*MEM_M)
   28.32 @@ -300,7 +300,7 @@ typedef struct {
   28.33  
   28.34  typedef struct {
   28.35      unsigned long start;
   28.36 -    unsigned long size; 
   28.37 +    unsigned long size;
   28.38  } arch_initrd_info_t;
   28.39  
   28.40  #define IA64_COMMAND_LINE_SIZE 512
    29.1 --- a/xen/include/public/arch-x86_32.h	Mon Mar 06 18:05:09 2006 +0100
    29.2 +++ b/xen/include/public/arch-x86_32.h	Mon Mar 06 17:15:10 2006 +0000
    29.3 @@ -157,7 +157,7 @@ DEFINE_GUEST_HANDLE(vcpu_guest_context_t
    29.4  typedef struct arch_shared_info {
    29.5      unsigned long max_pfn;                  /* max pfn that appears in table */
    29.6      /* Frame containing list of mfns containing list of mfns containing p2m. */
    29.7 -    unsigned long pfn_to_mfn_frame_list_list; 
    29.8 +    unsigned long pfn_to_mfn_frame_list_list;
    29.9      unsigned long nmi_reason;
   29.10  } arch_shared_info_t;
   29.11  
    30.1 --- a/xen/include/public/arch-x86_64.h	Mon Mar 06 18:05:09 2006 +0100
    30.2 +++ b/xen/include/public/arch-x86_64.h	Mon Mar 06 17:15:10 2006 +0000
    30.3 @@ -242,7 +242,7 @@ DEFINE_GUEST_HANDLE(vcpu_guest_context_t
    30.4  typedef struct arch_shared_info {
    30.5      unsigned long max_pfn;                  /* max pfn that appears in table */
    30.6      /* Frame containing list of mfns containing list of mfns containing p2m. */
    30.7 -    unsigned long pfn_to_mfn_frame_list_list; 
    30.8 +    unsigned long pfn_to_mfn_frame_list_list;
    30.9      unsigned long nmi_reason;
   30.10  } arch_shared_info_t;
   30.11  
    31.1 --- a/xen/include/public/dom0_ops.h	Mon Mar 06 18:05:09 2006 +0100
    31.2 +++ b/xen/include/public/dom0_ops.h	Mon Mar 06 17:15:10 2006 +0000
    31.3 @@ -173,7 +173,7 @@ typedef struct dom0_readconsole {
    31.4  } dom0_readconsole_t;
    31.5  DEFINE_GUEST_HANDLE(dom0_readconsole_t);
    31.6  
    31.7 -/* 
    31.8 +/*
    31.9   * Set which physical cpus a vcpu can execute on.
   31.10   */
   31.11  #define DOM0_SETVCPUAFFINITY  20
   31.12 @@ -231,7 +231,7 @@ typedef struct dom0_sched_id {
   31.13  } dom0_sched_id_t;
   31.14  DEFINE_GUEST_HANDLE(dom0_sched_id_t);
   31.15  
   31.16 -/* 
   31.17 +/*
   31.18   * Control shadow pagetables operation
   31.19   */
   31.20  #define DOM0_SHADOW_CONTROL  25
   31.21 @@ -248,8 +248,8 @@ DEFINE_GUEST_HANDLE(dom0_sched_id_t);
   31.22  typedef struct dom0_shadow_control_stats {
   31.23      uint32_t fault_count;
   31.24      uint32_t dirty_count;
   31.25 -    uint32_t dirty_net_count;     
   31.26 -    uint32_t dirty_block_count;     
   31.27 +    uint32_t dirty_net_count;
   31.28 +    uint32_t dirty_block_count;
   31.29  } dom0_shadow_control_stats_t;
   31.30  DEFINE_GUEST_HANDLE(dom0_shadow_control_stats_t);
   31.31  
   31.32 @@ -402,7 +402,7 @@ typedef struct dom0_getdomaininfolist {
   31.33  } dom0_getdomaininfolist_t;
   31.34  DEFINE_GUEST_HANDLE(dom0_getdomaininfolist_t);
   31.35  
   31.36 -#define DOM0_PLATFORM_QUIRK      39  
   31.37 +#define DOM0_PLATFORM_QUIRK      39
   31.38  #define QUIRK_NOIRQBALANCING  1
   31.39  typedef struct dom0_platform_quirk {
   31.40      /* IN variables. */
   31.41 @@ -463,14 +463,14 @@ typedef struct dom0_iomem_permission {
   31.42      uint8_t allow_access;     /* allow (!0) or deny (0) access to range? */
   31.43  } dom0_iomem_permission_t;
   31.44  DEFINE_GUEST_HANDLE(dom0_iomem_permission_t);
   31.45 - 
   31.46 +
   31.47  #define DOM0_HYPERCALL_INIT   48
   31.48  typedef struct dom0_hypercall_init {
   31.49      domid_t  domain;          /* domain to be affected */
   31.50      unsigned long mfn;        /* machine frame to be initialised */
   31.51  } dom0_hypercall_init_t;
   31.52  DEFINE_GUEST_HANDLE(dom0_hypercall_init_t);
   31.53 - 
   31.54 +
   31.55  typedef struct dom0_op {
   31.56      uint32_t cmd;
   31.57      uint32_t interface_version; /* DOM0_INTERFACE_VERSION */
   31.58 @@ -507,7 +507,7 @@ typedef struct dom0_op {
   31.59          struct dom0_platform_quirk    platform_quirk;
   31.60          struct dom0_physical_memory_map physical_memory_map;
   31.61          struct dom0_max_vcpus         max_vcpus;
   31.62 -        struct dom0_setdomainhandle   setdomainhandle;        
   31.63 +        struct dom0_setdomainhandle   setdomainhandle;
   31.64          struct dom0_setdebugging      setdebugging;
   31.65          struct dom0_irq_permission    irq_permission;
   31.66          struct dom0_iomem_permission  iomem_permission;
    32.1 --- a/xen/include/public/grant_table.h	Mon Mar 06 18:05:09 2006 +0100
    32.2 +++ b/xen/include/public/grant_table.h	Mon Mar 06 17:15:10 2006 +0000
    32.3 @@ -262,7 +262,7 @@ typedef struct gnttab_transfer {
    32.4    * GNTMAP_contains_pte subflag:
    32.5    *  0 => This map request contains a host virtual address.
    32.6    *  1 => This map request contains the machine addess of the PTE to update.
    32.7 -  */ 
    32.8 +  */
    32.9  #define _GNTMAP_contains_pte    (4)
   32.10  #define GNTMAP_contains_pte     (1<<_GNTMAP_contains_pte)
   32.11  
    33.1 --- a/xen/include/public/hvm/vmx_assist.h	Mon Mar 06 18:05:09 2006 +0100
    33.2 +++ b/xen/include/public/hvm/vmx_assist.h	Mon Mar 06 17:15:10 2006 +0000
    33.3 @@ -22,13 +22,13 @@ union vmcs_arbytes {
    33.4          unsigned int seg_type : 4,
    33.5              s         : 1,
    33.6              dpl       : 2,
    33.7 -            p         : 1, 
    33.8 +            p         : 1,
    33.9              reserved0 : 4,
   33.10              avl       : 1,
   33.11 -            reserved1 : 1,     
   33.12 +            reserved1 : 1,
   33.13              default_ops_size: 1,
   33.14              g         : 1,
   33.15 -            null_bit  : 1, 
   33.16 +            null_bit  : 1,
   33.17              reserved2 : 15;
   33.18      } fields;
   33.19      unsigned int bytes;
    34.1 --- a/xen/include/public/io/ring.h	Mon Mar 06 18:05:09 2006 +0100
    34.2 +++ b/xen/include/public/io/ring.h	Mon Mar 06 17:15:10 2006 +0000
    34.3 @@ -39,7 +39,7 @@ typedef unsigned int RING_IDX;
    34.4   *
    34.5   * These expand out to give you a set of types, as you can see below.
    34.6   * The most important of these are:
    34.7 - *  
    34.8 + * 
    34.9   *     mytag_sring_t      - The shared ring.
   34.10   *     mytag_front_ring_t - The 'front' half of the ring.
   34.11   *     mytag_back_ring_t  - The 'back' half of the ring.
   34.12 @@ -58,7 +58,7 @@ typedef unsigned int RING_IDX;
   34.13   *     mytag_back_ring_t back_ring;
   34.14   *     BACK_RING_INIT(&back_ring, (mytag_sring_t *)shared_page, PAGE_SIZE);
   34.15   */
   34.16 -         
   34.17 +
   34.18  #define DEFINE_RING_TYPES(__name, __req_t, __rsp_t)                     \
   34.19                                                                          \
   34.20  /* Shared ring entry */                                                 \
   34.21 @@ -97,7 +97,7 @@ typedef struct __name##_front_ring __nam
   34.22  typedef struct __name##_back_ring __name##_back_ring_t
   34.23  
   34.24  /*
   34.25 - * Macros for manipulating rings.  
   34.26 + * Macros for manipulating rings.
   34.27   * 
   34.28   * FRONT_RING_whatever works on the "front end" of a ring: here 
   34.29   * requests are pushed on to the ring and responses taken off it.
   34.30 @@ -105,7 +105,7 @@ typedef struct __name##_back_ring __name
   34.31   * BACK_RING_whatever works on the "back end" of a ring: here 
   34.32   * requests are taken off the ring and responses put on.
   34.33   * 
   34.34 - * N.B. these macros do NO INTERLOCKS OR FLOW CONTROL.  
   34.35 + * N.B. these macros do NO INTERLOCKS OR FLOW CONTROL. 
   34.36   * This is OK in 1-for-1 request-response situations where the 
   34.37   * requestor (front end) never has more than RING_SIZE()-1
   34.38   * outstanding requests.
   34.39 @@ -151,7 +151,7 @@ typedef struct __name##_back_ring __name
   34.40  #define RING_SIZE(_r)                                                   \
   34.41      ((_r)->nr_ents)
   34.42  
   34.43 -/* Test if there is an empty slot available on the front ring. 
   34.44 +/* Test if there is an empty slot available on the front ring.
   34.45   * (This is only meaningful from the front. )
   34.46   */
   34.47  #define RING_FULL(_r)                                                   \
   34.48 @@ -159,24 +159,19 @@ typedef struct __name##_back_ring __name
   34.49  
   34.50  /* Test if there are outstanding messages to be processed on a ring. */
   34.51  #define RING_HAS_UNCONSUMED_RESPONSES(_r)                               \
   34.52 -   ( (_r)->rsp_cons != (_r)->sring->rsp_prod )
   34.53 -   
   34.54 +    ((_r)->rsp_cons != (_r)->sring->rsp_prod)
   34.55 +
   34.56  #define RING_HAS_UNCONSUMED_REQUESTS(_r)                                \
   34.57 -   ( ((_r)->req_cons != (_r)->sring->req_prod ) &&                      \
   34.58 -     (((_r)->req_cons - (_r)->rsp_prod_pvt) !=                          \
   34.59 -      RING_SIZE(_r)) )
   34.60 -      
   34.61 +    (((_r)->req_cons != (_r)->sring->req_prod) &&                       \
   34.62 +     (((_r)->req_cons - (_r)->rsp_prod_pvt) != RING_SIZE(_r)))
   34.63 +
   34.64  /* Direct access to individual ring elements, by index. */
   34.65  #define RING_GET_REQUEST(_r, _idx)                                      \
   34.66 - (&((_r)->sring->ring[                                                  \
   34.67 -     ((_idx) & (RING_SIZE(_r) - 1))                                     \
   34.68 -     ].req))
   34.69 +    (&((_r)->sring->ring[((_idx) & (RING_SIZE(_r) - 1))].req))
   34.70  
   34.71  #define RING_GET_RESPONSE(_r, _idx)                                     \
   34.72 - (&((_r)->sring->ring[                                                  \
   34.73 -     ((_idx) & (RING_SIZE(_r) - 1))                                     \
   34.74 -     ].rsp))   
   34.75 -    
   34.76 +    (&((_r)->sring->ring[((_idx) & (RING_SIZE(_r) - 1))].rsp))
   34.77 +
   34.78  /* Loop termination condition: Would the specified index overflow the ring? */
   34.79  #define RING_REQUEST_CONS_OVERFLOW(_r, _cons)                           \
   34.80      (((_cons) - (_r)->rsp_prod_pvt) >= RING_SIZE(_r))
   34.81 @@ -212,7 +207,7 @@ typedef struct __name##_back_ring __name
   34.82   *  The second argument is a boolean return value. True indicates that there
   34.83   *  are pending messages on the ring (i.e., the connection should not be put
   34.84   *  to sleep).
   34.85 - *  
   34.86 + * 
   34.87   *  These macros will set the req_event/rsp_event field to trigger a
   34.88   *  notification on the very next message that is enqueued. If you want to
   34.89   *  create batches of work (i.e., only receive a notification after several
    35.1 --- a/xen/include/public/io/xenbus.h	Mon Mar 06 18:05:09 2006 +0100
    35.2 +++ b/xen/include/public/io/xenbus.h	Mon Mar 06 17:15:10 2006 +0000
    35.3 @@ -6,9 +6,8 @@
    35.4   * Copyright (C) 2005 XenSource Ltd.
    35.5   */
    35.6  
    35.7 -#ifndef _XEN_XENBUS_H
    35.8 -#define _XEN_XENBUS_H
    35.9 -
   35.10 +#ifndef _XEN_PUBLIC_IO_XENBUS_H
   35.11 +#define _XEN_PUBLIC_IO_XENBUS_H
   35.12  
   35.13  /* The state of either end of the Xenbus, i.e. the current communication
   35.14     status of initialisation across the bus.  States here imply nothing about
   35.15 @@ -30,8 +29,7 @@ typedef enum
   35.16  
   35.17  } XenbusState;
   35.18  
   35.19 -
   35.20 -#endif /* _XEN_XENBUS_H */
   35.21 +#endif /* _XEN_PUBLIC_IO_XENBUS_H */
   35.22  
   35.23  /*
   35.24   * Local variables:
    36.1 --- a/xen/include/public/memory.h	Mon Mar 06 18:05:09 2006 +0100
    36.2 +++ b/xen/include/public/memory.h	Mon Mar 06 17:15:10 2006 +0000
    36.3 @@ -80,7 +80,7 @@ typedef struct xen_machphys_mfn_list {
    36.4       * machphys table is smaller than max_extents * 2MB.
    36.5       */
    36.6      unsigned int max_extents;
    36.7 -    
    36.8 +
    36.9      /*
   36.10       * Pointer to buffer to fill with list of extent starts. If there are
   36.11       * any large discontiguities in the machine address space, 2MB gaps in
    37.1 --- a/xen/include/public/physdev.h	Mon Mar 06 18:05:09 2006 +0100
    37.2 +++ b/xen/include/public/physdev.h	Mon Mar 06 17:15:10 2006 +0000
    37.3 @@ -37,14 +37,14 @@ typedef struct physdevop_apic {
    37.4      uint32_t reg;
    37.5      /* IN or OUT */
    37.6      uint32_t value;
    37.7 -} physdevop_apic_t; 
    37.8 +} physdevop_apic_t;
    37.9  
   37.10  typedef struct physdevop_irq {
   37.11      /* IN */
   37.12      uint32_t irq;
   37.13      /* OUT */
   37.14      uint32_t vector;
   37.15 -} physdevop_irq_t; 
   37.16 +} physdevop_irq_t;
   37.17  
   37.18  typedef struct physdev_op {
   37.19      uint32_t cmd;
    38.1 --- a/xen/include/public/sched_ctl.h	Mon Mar 06 18:05:09 2006 +0100
    38.2 +++ b/xen/include/public/sched_ctl.h	Mon Mar 06 17:15:10 2006 +0000
    38.3 @@ -34,24 +34,20 @@ struct sched_adjdom_cmd {
    38.4      uint32_t direction;
    38.5      domid_t  domain;
    38.6      union {
    38.7 -        struct bvt_adjdom
    38.8 -        {
    38.9 +        struct bvt_adjdom {
   38.10              uint32_t mcu_adv;      /* mcu advance: inverse of weight */
   38.11              uint32_t warpback;     /* warp? */
   38.12              int32_t  warpvalue;    /* warp value */
   38.13              int64_t  warpl;        /* warp limit */
   38.14              int64_t  warpu;        /* unwarp time requirement */
   38.15          } bvt;
   38.16 -        
   38.17 -        struct sedf_adjdom
   38.18 -        {
   38.19 +        struct sedf_adjdom {
   38.20              uint64_t period;
   38.21              uint64_t slice;
   38.22              uint64_t latency;
   38.23              uint32_t extratime;
   38.24              uint32_t weight;
   38.25          } sedf;
   38.26 -
   38.27      } u;
   38.28  };
   38.29