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

kernel: remove platform_has() infrastructure

The only use case of the platform_has() infrastructure has been
removed again, so remove the whole feature.

Signed-off-by: Juergen Gross <jgross@suse.com>
Tested-by: Oleksandr Tyshchenko <oleksandr_tyshchenko@epam.com> # Arm64 guest using Xen
Reviewed-by: Stefano Stabellini <sstabellini@kernel.org>
Link: https://lore.kernel.org/r/20220622063838.8854-3-jgross@suse.com
Signed-off-by: Juergen Gross <jgross@suse.com>

+1 -60
-8
MAINTAINERS
··· 15953 15953 F: Documentation/devicetree/bindings/iio/chemical/plantower,pms7003.yaml 15954 15954 F: drivers/iio/chemical/pms7003.c 15955 15955 15956 - PLATFORM FEATURE INFRASTRUCTURE 15957 - M: Juergen Gross <jgross@suse.com> 15958 - S: Maintained 15959 - F: arch/*/include/asm/platform-feature.h 15960 - F: include/asm-generic/platform-feature.h 15961 - F: include/linux/platform-feature.h 15962 - F: kernel/platform-feature.c 15963 - 15964 15956 PLDMFW LIBRARY 15965 15957 M: Jacob Keller <jacob.e.keller@intel.com> 15966 15958 S: Maintained
-1
include/asm-generic/Kbuild
··· 44 44 mandatory-y += pci.h 45 45 mandatory-y += percpu.h 46 46 mandatory-y += pgalloc.h 47 - mandatory-y += platform-feature.h 48 47 mandatory-y += preempt.h 49 48 mandatory-y += rwonce.h 50 49 mandatory-y += sections.h
-8
include/asm-generic/platform-feature.h
··· 1 - /* SPDX-License-Identifier: GPL-2.0 */ 2 - #ifndef _ASM_GENERIC_PLATFORM_FEATURE_H 3 - #define _ASM_GENERIC_PLATFORM_FEATURE_H 4 - 5 - /* Number of arch specific feature flags. */ 6 - #define PLATFORM_ARCH_FEAT_N 0 7 - 8 - #endif /* _ASM_GENERIC_PLATFORM_FEATURE_H */
-15
include/linux/platform-feature.h
··· 1 - /* SPDX-License-Identifier: GPL-2.0 */ 2 - #ifndef _PLATFORM_FEATURE_H 3 - #define _PLATFORM_FEATURE_H 4 - 5 - #include <linux/bitops.h> 6 - #include <asm/platform-feature.h> 7 - 8 - /* The platform features are starting with the architecture specific ones. */ 9 - #define PLATFORM_FEAT_N (0 + PLATFORM_ARCH_FEAT_N) 10 - 11 - void platform_set(unsigned int feature); 12 - void platform_clear(unsigned int feature); 13 - bool platform_has(unsigned int feature); 14 - 15 - #endif /* _PLATFORM_FEATURE_H */
+1 -1
kernel/Makefile
··· 7 7 cpu.o exit.o softirq.o resource.o \ 8 8 sysctl.o capability.o ptrace.o user.o \ 9 9 signal.o sys.o umh.o workqueue.o pid.o task_work.o \ 10 - extable.o params.o platform-feature.o \ 10 + extable.o params.o \ 11 11 kthread.o sys_ni.o nsproxy.o \ 12 12 notifier.o ksysfs.o cred.o reboot.o \ 13 13 async.o range.o smpboot.o ucount.o regset.o
-27
kernel/platform-feature.c
··· 1 - // SPDX-License-Identifier: GPL-2.0 2 - 3 - #include <linux/bitops.h> 4 - #include <linux/cache.h> 5 - #include <linux/export.h> 6 - #include <linux/platform-feature.h> 7 - 8 - #define PLATFORM_FEAT_ARRAY_SZ BITS_TO_LONGS(PLATFORM_FEAT_N) 9 - static unsigned long __read_mostly platform_features[PLATFORM_FEAT_ARRAY_SZ]; 10 - 11 - void platform_set(unsigned int feature) 12 - { 13 - set_bit(feature, platform_features); 14 - } 15 - EXPORT_SYMBOL_GPL(platform_set); 16 - 17 - void platform_clear(unsigned int feature) 18 - { 19 - clear_bit(feature, platform_features); 20 - } 21 - EXPORT_SYMBOL_GPL(platform_clear); 22 - 23 - bool platform_has(unsigned int feature) 24 - { 25 - return test_bit(feature, platform_features); 26 - } 27 - EXPORT_SYMBOL_GPL(platform_has);