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.
Unified · Split
| @@ -847,19 +847,6 @@ long work_on_cpu_key(int cpu, long (*fn)(void *), · 846 unmodified lines | |||
| 847 | work_on_cpu_key(_cpu, _fn, _arg, &__key); \ | 847 | work_on_cpu_key(_cpu, _fn, _arg, &__key); \ |
| 848 | }) | 848 | }) |
| 849 | 849 | ||
| 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 | }) | ||
| 863 | #endif /* CONFIG_SMP */ | 850 | #endif /* CONFIG_SMP */ |
| 864 | 851 | ||
| 865 | #ifdef CONFIG_FREEZER | 852 | #ifdef CONFIG_FREEZER |
| @@ -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 | } |
| 6773 | EXPORT_SYMBOL_GPL(work_on_cpu_key); | 6773 | 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); | ||
| 6799 | #endif /* CONFIG_SMP */ | 6774 | #endif /* CONFIG_SMP */ |
| 6800 | 6775 | ||
| 6801 | #ifdef CONFIG_FREEZER | 6776 | #ifdef CONFIG_FREEZER |