Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

generic-ipi: Kill unnecessary variable - csd_flags

After commit 8969a5ede0f9e17da4b943712429aef2c9bcd82b
("generic-ipi: remove kmalloc()"), wait = 0 can be guaranteed,
and all callsites of generic_exec_single() do an unconditional
csd_lock() now.

So csd_flags is unnecessary now. Remove it.

Signed-off-by: Xie XiuQi <xiexiuqi@huawei.com>
Signed-off-by: Peter Zijlstra <peterz@infradead.org>
Cc: Oleg Nesterov <oleg@redhat.com>
Cc: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Nick Piggin <npiggin@suse.de>
Cc: Jens Axboe <jens.axboe@oracle.com>
Cc: "Paul E. McKenney" <paulmck@linux.vnet.ibm.com>
Cc: Rusty Russell <rusty@rustcorp.com.au>
Link: http://lkml.kernel.org/r/51F72DA1.7010401@huawei.com
Signed-off-by: Ingo Molnar <mingo@kernel.org>

authored by

Xie XiuQi and committed by
Ingo Molnar
46591962 323f54ed

+1 -13
+1 -13
kernel/smp.c
··· 186 186 187 187 while (!list_empty(&list)) { 188 188 struct call_single_data *csd; 189 - unsigned int csd_flags; 190 189 191 190 csd = list_entry(list.next, struct call_single_data, list); 192 191 list_del(&csd->list); 193 192 194 - /* 195 - * 'csd' can be invalid after this call if flags == 0 196 - * (when called through generic_exec_single()), 197 - * so save them away before making the call: 198 - */ 199 - csd_flags = csd->flags; 200 - 201 193 csd->func(csd->info); 202 194 203 - /* 204 - * Unlocked CSDs are valid through generic_exec_single(): 205 - */ 206 - if (csd_flags & CSD_FLAG_LOCK) 207 - csd_unlock(csd); 195 + csd_unlock(csd); 208 196 } 209 197 } 210 198