]> git.ipfire.org Git - thirdparty/kernel/linux.git/commitdiff
workqueue: Remove unused work_on_cpu_safe
authorDr. David Alan Gilbert <linux@treblig.org>
Mon, 23 Jun 2025 00:30:49 +0000 (01:30 +0100)
committerTejun Heo <tj@kernel.org>
Mon, 23 Jun 2025 18:07:06 +0000 (08:07 -1000)
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.

Signed-off-by: Dr. David Alan Gilbert <linux@treblig.org>
Signed-off-by: Tejun Heo <tj@kernel.org>
include/linux/workqueue.h
kernel/workqueue.c

index 83d158bb2791339f56b7fae9cd882f25c108ead3..45d5dd470ff609a95dc9f54d2eaa93b7c003d7e8 100644 (file)
@@ -847,19 +847,6 @@ long work_on_cpu_key(int cpu, long (*fn)(void *),
        work_on_cpu_key(_cpu, _fn, _arg, &__key);       \
 })
 
-long work_on_cpu_safe_key(int cpu, long (*fn)(void *),
-                         void *arg, struct lock_class_key *key);
-
-/*
- * A new key is defined for each caller to make sure the work
- * associated with the function doesn't share its locking class.
- */
-#define work_on_cpu_safe(_cpu, _fn, _arg)              \
-({                                                     \
-       static struct lock_class_key __key;             \
-                                                       \
-       work_on_cpu_safe_key(_cpu, _fn, _arg, &__key);  \
-})
 #endif /* CONFIG_SMP */
 
 #ifdef CONFIG_FREEZER
index 086452e339c48b5e010625eeac56dc8f130c1cc1..12c3080332bdbd83a362849f0b78252181b437ec 100644 (file)
@@ -6771,31 +6771,6 @@ long work_on_cpu_key(int cpu, long (*fn)(void *),
        return wfc.ret;
 }
 EXPORT_SYMBOL_GPL(work_on_cpu_key);
-
-/**
- * work_on_cpu_safe_key - run a function in thread context on a particular cpu
- * @cpu: the cpu to run on
- * @fn:  the function to run
- * @arg: the function argument
- * @key: The lock class key for lock debugging purposes
- *
- * Disables CPU hotplug and calls work_on_cpu(). The caller must not hold
- * any locks which would prevent @fn from completing.
- *
- * Return: The value @fn returns.
- */
-long work_on_cpu_safe_key(int cpu, long (*fn)(void *),
-                         void *arg, struct lock_class_key *key)
-{
-       long ret = -ENODEV;
-
-       cpus_read_lock();
-       if (cpu_online(cpu))
-               ret = work_on_cpu_key(cpu, fn, arg, key);
-       cpus_read_unlock();
-       return ret;
-}
-EXPORT_SYMBOL_GPL(work_on_cpu_safe_key);
 #endif /* CONFIG_SMP */
 
 #ifdef CONFIG_FREEZER