]> xenbits.xensource.com Git - legacy/linux-2.6.18-xen.git/commitdiff
xen: miscellaneous cleanup
authorKeir Fraser <keir.fraser@citrix.com>
Thu, 14 May 2009 09:08:10 +0000 (10:08 +0100)
committerKeir Fraser <keir.fraser@citrix.com>
Thu, 14 May 2009 09:08:10 +0000 (10:08 +0100)
- add two missing unwind annotations
- mark remaining struct file_operations instances const
- use get_capacity() instead of raw access to the capacity field
- use assert_spin_locked() instead of BUG_ON(!spin_is_locked())
- use clear_tsk_thread_flag() instead of clear_ti_thread_flag()
- remove dead variable cpu_state

Signed-off-by: Jan Beulich <jbeulich@novell.com>
arch/i386/kernel/entry-xen.S
drivers/oprofile/oprofile_files.c
drivers/xen/blkback/vbd.c
drivers/xen/blktap/blktap.c
drivers/xen/core/smpboot.c

index c2e390235aa4b45437643c484c2a24c3e81dc819..438df1e09cd44116e079ed949f4fd83a34c8cd45 100644 (file)
@@ -388,8 +388,10 @@ ENTRY(sysenter_entry_pv)
        movl %ebp,12(%esp)
        movl $__USER_CS,4(%esp)
        addl $4,%esp
+       CFI_ADJUST_CFA_OFFSET -4
        /* +5*4 is SS:ESP,EFLAGS,CS:EIP. +8 is esp0 setting. */
        pushl (TI_sysenter_return-THREAD_SIZE+8+4*4)(%esp)
+       CFI_ADJUST_CFA_OFFSET 4
 /*
  * Load the potential sixth argument from user stack.
  * Careful about security.
index 67f42e11629e45e355f0bd1ad09201ce200bf8f7..6719420451c622fc2c50fb3b694028b4d8c58abd 100644 (file)
@@ -215,7 +215,7 @@ static ssize_t adomain_read(struct file * file, char __user * buf,
 }
 
 
-static struct file_operations active_domain_ops = {
+static const struct file_operations active_domain_ops = {
        .read           = adomain_read,
        .write          = adomain_write,
 };
@@ -308,7 +308,7 @@ static ssize_t pdomain_read(struct file * file, char __user * buf,
        return retval;
 }
 
-static struct file_operations passive_domain_ops = {
+static const struct file_operations passive_domain_ops = {
        .read           = pdomain_read,
        .write          = pdomain_write,
 };
index 2594419f4e311677e6465d77ada8c89ff312b0ca..3876c027b43d6285ff2306548eb8f974d7ff646b 100644 (file)
@@ -33,7 +33,7 @@
 #include "common.h"
 
 #define vbd_sz(_v)   ((_v)->bdev->bd_part ?                            \
-       (_v)->bdev->bd_part->nr_sects : (_v)->bdev->bd_disk->capacity)
+       (_v)->bdev->bd_part->nr_sects : get_capacity((_v)->bdev->bd_disk))
 
 unsigned long long vbd_size(struct vbd *vbd)
 {
index f24a000fed5728a6b57a0afc44d6b26564803ac7..f6a33eb2faa92632728248b1723fef77c2c5a68b 100644 (file)
@@ -957,7 +957,7 @@ static int req_increase(void)
 
 static void mmap_req_del(int mmap)
 {
-       BUG_ON(!spin_is_locked(&pending_free_lock));
+       assert_spin_locked(&pending_free_lock);
 
        kfree(pending_reqs[mmap]);
        pending_reqs[mmap] = NULL;
index deb5f99183681ac626998887bc5f09e0c018700a..80bd1bb2e3bdbc47e38d55006fc5a3b5e2a6030e 100644 (file)
@@ -48,10 +48,6 @@ cpumask_t cpu_initialized_map;
 struct cpuinfo_x86 cpu_data[NR_CPUS] __cacheline_aligned;
 EXPORT_SYMBOL(cpu_data);
 
-#ifdef CONFIG_HOTPLUG_CPU
-DEFINE_PER_CPU(int, cpu_state) = { 0 };
-#endif
-
 static DEFINE_PER_CPU(int, resched_irq);
 static DEFINE_PER_CPU(int, callfunc_irq);
 static char resched_name[NR_CPUS][15];
@@ -345,7 +341,7 @@ void __init smp_prepare_cpus(unsigned int max_cpus)
 #ifdef __x86_64__
                cpu_pda(cpu)->pcurrent = idle;
                cpu_pda(cpu)->cpunumber = cpu;
-               clear_ti_thread_flag(idle->thread_info, TIF_FORK);
+               clear_tsk_thread_flag(idle, TIF_FORK);
 #endif
 
                irq_ctx_init(cpu);