kernel/smp.c: remove 'priv' of call_single_data
authorliguang <[email protected]>
Tue, 30 Apr 2013 22:27:26 +0000 (15:27 -0700)
committerLinus Torvalds <[email protected]>
Wed, 1 May 2013 00:04:03 +0000 (17:04 -0700)
The 'priv' field is redundant; we can pass data via 'info'.

Signed-off-by: liguang <[email protected]>
Cc: Peter Zijlstra <[email protected]>
Cc: Oleg Nesterov <[email protected]>
Cc: Ingo Molnar <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
include/linux/smp.h
kernel/softirq.c

index 3e07a7df6478a18ffa188c5cc4d1bc7d287fba49..e6564c1dc552c6ca72b9b3b276fdb455a10bc716 100644 (file)
@@ -20,7 +20,6 @@ struct call_single_data {
        smp_call_func_t func;
        void *info;
        u16 flags;
-       u16 priv;
 };
 
 /* total number of cpus in this system (may exceed NR_CPUS) */
index 14d7758074aadf4d1c43947ecef675e8bb6c044e..aa82723c72027a86e67914e8a7b765613c06fbc6 100644 (file)
@@ -620,8 +620,7 @@ static void remote_softirq_receive(void *data)
        unsigned long flags;
        int softirq;
 
-       softirq = cp->priv;
-
+       softirq = *(int *)cp->info;
        local_irq_save(flags);
        __local_trigger(cp, softirq);
        local_irq_restore(flags);
@@ -631,9 +630,8 @@ static int __try_remote_softirq(struct call_single_data *cp, int cpu, int softir
 {
        if (cpu_online(cpu)) {
                cp->func = remote_softirq_receive;
-               cp->info = cp;
+               cp->info = &softirq;
                cp->flags = 0;
-               cp->priv = softirq;
 
                __smp_call_function_single(cpu, cp, 0);
                return 0;