Skip to content

Commit fc2898e

Browse files
Dr. David Alan Gilberthtejun
authored andcommitted
workqueue: Remove unused work_on_cpu_safe
The last use of the work_on_cpu_safe() macro was removed recently by commit 9cda46b ("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 <[email protected]> Signed-off-by: Tejun Heo <[email protected]>
1 parent f11113d commit fc2898e

File tree

2 files changed

+0
-38
lines changed

2 files changed

+0
-38
lines changed

include/linux/workqueue.h

Lines changed: 0 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -847,19 +847,6 @@ long work_on_cpu_key(int cpu, long (*fn)(void *),
847847
work_on_cpu_key(_cpu, _fn, _arg, &__key); \
848848
})
849849

850-
long work_on_cpu_safe_key(int cpu, long (*fn)(void *),
851-
void *arg, struct lock_class_key *key);
852-
853-
/*
854-
* A new key is defined for each caller to make sure the work
855-
* associated with the function doesn't share its locking class.
856-
*/
857-
#define work_on_cpu_safe(_cpu, _fn, _arg) \
858-
({ \
859-
static struct lock_class_key __key; \
860-
\
861-
work_on_cpu_safe_key(_cpu, _fn, _arg, &__key); \
862-
})
863850
#endif /* CONFIG_SMP */
864851

865852
#ifdef CONFIG_FREEZER

kernel/workqueue.c

Lines changed: 0 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -6771,31 +6771,6 @@ long work_on_cpu_key(int cpu, long (*fn)(void *),
67716771
return wfc.ret;
67726772
}
67736773
EXPORT_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-
*/
6787-
long 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-
}
6798-
EXPORT_SYMBOL_GPL(work_on_cpu_safe_key);
67996774
#endif /* CONFIG_SMP */
68006775

68016776
#ifdef CONFIG_FREEZER

0 commit comments

Comments
 (0)