]> git.baikalelectronics.ru Git - kernel.git/commitdiff
kbuild: warn redundant generic-y
authorMasahiro Yamada <yamada.masahiro@socionext.com>
Sun, 17 Mar 2019 02:01:08 +0000 (11:01 +0900)
committerMasahiro Yamada <yamada.masahiro@socionext.com>
Sun, 17 Mar 2019 03:56:31 +0000 (12:56 +0900)
The generic-y is redundant under the following condition:

 - arch has its own implementation

 - the same header is added to generated-y

 - the same header is added to mandatory-y

If a redundant generic-y is found, the warning like follows is displayed:

  scripts/Makefile.asm-generic:20: redundant generic-y found in arch/arm/include/asm/Kbuild: timex.h

I fixed up arch Kbuild files found by this.

Suggested-by: Sam Ravnborg <sam@ravnborg.org>
Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
12 files changed:
arch/arm/include/asm/Kbuild
arch/h8300/include/asm/Kbuild
arch/ia64/include/uapi/asm/Kbuild
arch/openrisc/include/asm/Kbuild
arch/parisc/include/asm/Kbuild
arch/powerpc/include/asm/Kbuild
arch/s390/include/asm/Kbuild
arch/s390/include/uapi/asm/Kbuild
arch/x86/include/uapi/asm/Kbuild
arch/xtensa/include/asm/Kbuild
arch/xtensa/include/uapi/asm/Kbuild
scripts/Makefile.asm-generic

index 1d66db9c9db532f3c23b2ace02a18fbce7e66da5..a8a4eb7f6dae0371940a9cc70c077e2194fb02bc 100644 (file)
@@ -18,7 +18,6 @@ generic-y += segment.h
 generic-y += serial.h
 generic-y += simd.h
 generic-y += sizes.h
-generic-y += timex.h
 generic-y += trace_clock.h
 
 generated-y += mach-types.h
index 961c1dc064e167748428ed6b6e95acf97ad66d8f..3e7c8ecf151e13841d0c3e491f3927aa1586434c 100644 (file)
@@ -17,7 +17,6 @@ generic-y += fb.h
 generic-y += ftrace.h
 generic-y += futex.h
 generic-y += hardirq.h
-generic-y += hash.h
 generic-y += hw_irq.h
 generic-y += irq_regs.h
 generic-y += irq_work.h
index b71c5f787783b70a06bbdf18dd0a9a48c568803a..5b819e53c397cd9afe570aa64a2f777d85fd6cb9 100644 (file)
@@ -2,4 +2,3 @@ include include/uapi/asm-generic/Kbuild.asm
 
 generated-y += unistd_64.h
 generic-y += kvm_para.h
-generic-y += socket.h
index 1f04844b6b82d2233be080cabfe7ca36db7ea4b8..5a73e2956ac46953ac9e1cf2404c3d0996617602 100644 (file)
@@ -15,7 +15,6 @@ generic-y += fb.h
 generic-y += ftrace.h
 generic-y += hardirq.h
 generic-y += hw_irq.h
-generic-y += irq.h
 generic-y += irq_regs.h
 generic-y += irq_work.h
 generic-y += kdebug.h
@@ -35,7 +34,6 @@ generic-y += qrwlock.h
 generic-y += sections.h
 generic-y += segment.h
 generic-y += shmparam.h
-generic-y += string.h
 generic-y += switch_to.h
 generic-y += topology.h
 generic-y += trace_clock.h
index 0b1e354c8c24cee1cb46289a1471b76a3bbb8a9c..6f49e77d82a2a48673356355e38a411794ff51bb 100644 (file)
@@ -1,7 +1,6 @@
 generated-y += syscall_table_32.h
 generated-y += syscall_table_64.h
 generated-y += syscall_table_c32.h
-generic-y += barrier.h
 generic-y += current.h
 generic-y += device.h
 generic-y += div64.h
@@ -20,7 +19,6 @@ generic-y += percpu.h
 generic-y += preempt.h
 generic-y += seccomp.h
 generic-y += segment.h
-generic-y += topology.h
 generic-y += trace_clock.h
 generic-y += user.h
 generic-y += vga.h
index 77ff7fb24823a4416df86fedd90a9a7ddb38c0a6..a0c132bedfae86965c2f7c850098b65420c2c5fc 100644 (file)
@@ -5,7 +5,6 @@ generated-y += syscall_table_spu.h
 generic-y += div64.h
 generic-y += export.h
 generic-y += irq_regs.h
-generic-y += irq_work.h
 generic-y += local64.h
 generic-y += mcs_spinlock.h
 generic-y += preempt.h
index e3239772887aa2cb5a1080d6b2f567dfa1049bed..12d77cb11fe5a96269a7bde5fe6b8c6f11a23ea8 100644 (file)
@@ -20,7 +20,6 @@ generic-y += local.h
 generic-y += local64.h
 generic-y += mcs_spinlock.h
 generic-y += mm-arch-hooks.h
-generic-y += preempt.h
 generic-y += rwsem.h
 generic-y += trace_clock.h
 generic-y += unaligned.h
index 6b0f30b14642669f2323736c7a2959f571f78b76..da3e0d48abbc3314269dcc5b3069e8759ce16ec4 100644 (file)
@@ -3,4 +3,3 @@ include include/uapi/asm-generic/Kbuild.asm
 
 generated-y += unistd_32.h
 generated-y += unistd_64.h
-generic-y += socket.h
index efe701b7c6cebfe2da7f5ecd9126b0669ed27101..f6648e9928b316b79f7fa7fffe55284d26466283 100644 (file)
@@ -3,4 +3,3 @@ include include/uapi/asm-generic/Kbuild.asm
 generated-y += unistd_32.h
 generated-y += unistd_64.h
 generated-y += unistd_x32.h
-generic-y += socket.h
index d939e13e8d846fe5d1a24f4948caae1ff798a36a..42b6cb3d16f7b9666baf44daf0a63757786d729b 100644 (file)
@@ -15,7 +15,6 @@ generic-y += irq_work.h
 generic-y += kdebug.h
 generic-y += kmap_types.h
 generic-y += kprobes.h
-generic-y += linkage.h
 generic-y += local.h
 generic-y += local64.h
 generic-y += mcs_spinlock.h
index 6b43e5049ff7e42f3c0344f824ff8e9f8cb9ca11..960bf1e4be530b383da54074990d7a05dd9f34e2 100644 (file)
@@ -2,4 +2,3 @@ include include/uapi/asm-generic/Kbuild.asm
 
 generated-y += unistd_32.h
 generic-y += kvm_para.h
-generic-y += socket.h
index a62d2823f6cfe6ffe7f269131fd3f19f78f2516c..c7d2b7acad26c2a2bf52c0d66f5c086d6a51a99c 100644 (file)
@@ -14,6 +14,12 @@ src := $(subst /generated,,$(obj))
 
 include scripts/Kbuild.include
 
+redundant := $(filter $(mandatory-y) $(generated-y), $(generic-y))
+redundant += $(foreach f, $(generic-y), $(if $(wildcard $(srctree)/$(src)/$(f)),$(f)))
+redundant := $(sort $(redundant))
+$(if $(redundant),\
+       $(warning redundant generic-y found in $(src)/Kbuild: $(redundant)))
+
 # If arch does not implement mandatory headers, fallback to asm-generic ones.
 mandatory-y := $(filter-out $(generated-y), $(mandatory-y))
 generic-y   += $(foreach f, $(mandatory-y), $(if $(wildcard $(srctree)/$(src)/$(f)),,$(f)))