Skip to content

Commit 706afce

Browse files
masahir0yglaubitz
authored andcommitted
sh: Fix -Wmissing-include-dirs warnings for various platforms
The 0day bot reports a lot of warnings (or errors due to CONFIG_WERROR) like this: cc1: error: arch/sh/include/mach-hp6xx: No such file or directory [-Werror=missing-include-dirs] Indeed, arch/sh/include/mach-hp6xx does not exist. While -Wmissing-include-dirs is only a W=1 warning, it may be annoying when CONFIG_BTRFS_FS is enabled because fs/btrfs/Makefile unconditionally adds this warning option. arch/sh/Makefile defines machdir-y for two purposes: - Build platform code in arch/sh/boards/mach-*/ - Add arch/sh/include/mach-*/ to the header search path For the latter, some platforms use arch/sh/include/mach-common/ instead of having its own arch/sh/include/mach-*/. Drop unneeded machdir-y to omit non-existing include directories. To build arch/sh/boards/mach-*/, use the standard obj-y syntax in arch/sh/boards/Makefile. Reported-by: kernel test robot <[email protected]> Link: https://lore.kernel.org/oe-kbuild-all/[email protected]/ Signed-off-by: Masahiro Yamada <[email protected]> Acked-by: Randy Dunlap <[email protected]> Tested-by: Randy Dunlap <[email protected]> Reviewed-by: John Paul Adrian Glaubitz <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: John Paul Adrian Glaubitz <[email protected]>
1 parent a8ac296 commit 706afce

File tree

2 files changed

+20
-17
lines changed

2 files changed

+20
-17
lines changed

arch/sh/Makefile

Lines changed: 1 addition & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -116,31 +116,15 @@ export ld-bfd
116116

117117
# Mach groups
118118
machdir-$(CONFIG_SOLUTION_ENGINE) += mach-se
119-
machdir-$(CONFIG_SH_HP6XX) += mach-hp6xx
120119
machdir-$(CONFIG_SH_DREAMCAST) += mach-dreamcast
121120
machdir-$(CONFIG_SH_SH03) += mach-sh03
122-
machdir-$(CONFIG_SH_RTS7751R2D) += mach-r2d
123-
machdir-$(CONFIG_SH_HIGHLANDER) += mach-highlander
124121
machdir-$(CONFIG_SH_MIGOR) += mach-migor
125-
machdir-$(CONFIG_SH_AP325RXA) += mach-ap325rxa
126122
machdir-$(CONFIG_SH_KFR2R09) += mach-kfr2r09
127123
machdir-$(CONFIG_SH_ECOVEC) += mach-ecovec24
128-
machdir-$(CONFIG_SH_SDK7780) += mach-sdk7780
129124
machdir-$(CONFIG_SH_SDK7786) += mach-sdk7786
130125
machdir-$(CONFIG_SH_X3PROTO) += mach-x3proto
131-
machdir-$(CONFIG_SH_SH7763RDP) += mach-sh7763rdp
132-
machdir-$(CONFIG_SH_SH4202_MICRODEV) += mach-microdev
133126
machdir-$(CONFIG_SH_LANDISK) += mach-landisk
134-
machdir-$(CONFIG_SH_LBOX_RE2) += mach-lboxre2
135-
machdir-$(CONFIG_SH_RSK) += mach-rsk
136-
137-
ifneq ($(machdir-y),)
138-
core-y += $(addprefix arch/sh/boards/, \
139-
$(filter-out ., $(patsubst %,%/,$(machdir-y))))
140-
endif
141-
142-
# Common machine type headers. Not part of the arch/sh/boards/ hierarchy.
143-
machdir-y += mach-common
127+
machdir-y += mach-common
144128

145129
# Companion chips
146130
core-$(CONFIG_HD6446X_SERIES) += arch/sh/cchips/hd6446x/

arch/sh/boards/Makefile

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,3 +18,22 @@ obj-$(CONFIG_SH_APSH4A3A) += board-apsh4a3a.o
1818
obj-$(CONFIG_SH_APSH4AD0A) += board-apsh4ad0a.o
1919

2020
obj-$(CONFIG_SH_DEVICE_TREE) += of-generic.o
21+
22+
obj-$(CONFIG_SOLUTION_ENGINE) += mach-se/
23+
obj-$(CONFIG_SH_HP6XX) += mach-hp6xx/
24+
obj-$(CONFIG_SH_DREAMCAST) += mach-dreamcast/
25+
obj-$(CONFIG_SH_SH03) += mach-sh03/
26+
obj-$(CONFIG_SH_RTS7751R2D) += mach-r2d/
27+
obj-$(CONFIG_SH_HIGHLANDER) += mach-highlander/
28+
obj-$(CONFIG_SH_MIGOR) += mach-migor/
29+
obj-$(CONFIG_SH_AP325RXA) += mach-ap325rxa/
30+
obj-$(CONFIG_SH_KFR2R09) += mach-kfr2r09/
31+
obj-$(CONFIG_SH_ECOVEC) += mach-ecovec24/
32+
obj-$(CONFIG_SH_SDK7780) += mach-sdk7780/
33+
obj-$(CONFIG_SH_SDK7786) += mach-sdk7786/
34+
obj-$(CONFIG_SH_X3PROTO) += mach-x3proto/
35+
obj-$(CONFIG_SH_SH7763RDP) += mach-sh7763rdp/
36+
obj-$(CONFIG_SH_SH4202_MICRODEV)+= mach-microdev/
37+
obj-$(CONFIG_SH_LANDISK) += mach-landisk/
38+
obj-$(CONFIG_SH_LBOX_RE2) += mach-lboxre2/
39+
obj-$(CONFIG_SH_RSK) += mach-rsk/

0 commit comments

Comments
 (0)