History

workqueue: Remove unused work_on_cpu_safe

The last use of the work_on_cpu_safe() macro was removed recently by commit 9cda46babdfe ("crypto: n2 - remove Niagara2 SPU driver") Remove it, and the work_on_cpu_safe_key() function it calls.

Dr. David Alan Gilbert committed 1 year ago

Commit fc2898e1 parent f11113d2 files · +0 −38Browse files

Showing the changes to kernel/workqueue.c (1 of 2 files). Show all

Unified · Split

kernel/workqueue.c+0−25
@@ -6771,31 +6771,6 @@ long work_on_cpu_key(int cpu, long (*fn)(void *), · 6770 unmodified lines
6771 return wfc.ret;6771 return wfc.ret;
6772}6772}
6773EXPORT_SYMBOL_GPL(work_on_cpu_key);6773EXPORT_SYMBOL_GPL(work_on_cpu_key);
6774
6775/**
6776 * work_on_cpu_safe_key - run a function in thread context on a particular cpu
6777 * @cpu: the cpu to run on
6778 * @fn: the function to run
6779 * @arg: the function argument
6780 * @key: The lock class key for lock debugging purposes
6781 *
6782 * Disables CPU hotplug and calls work_on_cpu(). The caller must not hold
6783 * any locks which would prevent @fn from completing.
6784 *
6785 * Return: The value @fn returns.
6786 */
6787long work_on_cpu_safe_key(int cpu, long (*fn)(void *),
6788 void *arg, struct lock_class_key *key)
6789{
6790 long ret = -ENODEV;
6791
6792 cpus_read_lock();
6793 if (cpu_online(cpu))
6794 ret = work_on_cpu_key(cpu, fn, arg, key);
6795 cpus_read_unlock();
6796 return ret;
6797}
6798EXPORT_SYMBOL_GPL(work_on_cpu_safe_key);
6799#endif /* CONFIG_SMP */6774#endif /* CONFIG_SMP */
6800 6775
6801#ifdef CONFIG_FREEZER6776#ifdef CONFIG_FREEZER