linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 1/4] sh: fix -Wmissing-include-dirs warnings for various platforms
@ 2023-02-19 14:15 Masahiro Yamada
  2023-02-19 14:15 ` [PATCH 2/4] sh: move build rule of cchips/hd6446x/ to arch/sh/Kbuild Masahiro Yamada
                   ` (6 more replies)
  0 siblings, 7 replies; 18+ messages in thread
From: Masahiro Yamada @ 2023-02-19 14:15 UTC (permalink / raw)
  To: linux-kbuild
  Cc: linux-kernel, Randy Dunlap, Masahiro Yamada, kernel test robot,
	Rich Felker, Yoshinori Sato, linux-sh

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.

-Wmissing-include-dirs is W=1 warning, but 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 not include non-existing include directory.

To build arch/sh/boards/mach-*/, use the standard obj-y syntax in
arch/sh/boards/Makefile.

Reported-by: kernel test robot <lkp@intel.com>
Link: https://lore.kernel.org/oe-kbuild-all/202302190641.30VVXnPb-lkp@intel.com/
Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>
---

 arch/sh/Makefile        | 18 +-----------------
 arch/sh/boards/Makefile | 19 +++++++++++++++++++
 2 files changed, 20 insertions(+), 17 deletions(-)

diff --git a/arch/sh/Makefile b/arch/sh/Makefile
index 5c8776482530..a9cad5137f92 100644
--- a/arch/sh/Makefile
+++ b/arch/sh/Makefile
@@ -116,31 +116,15 @@ export ld-bfd
 
 # Mach groups
 machdir-$(CONFIG_SOLUTION_ENGINE)		+= mach-se
-machdir-$(CONFIG_SH_HP6XX)			+= mach-hp6xx
 machdir-$(CONFIG_SH_DREAMCAST)			+= mach-dreamcast
 machdir-$(CONFIG_SH_SH03)			+= mach-sh03
-machdir-$(CONFIG_SH_RTS7751R2D)			+= mach-r2d
-machdir-$(CONFIG_SH_HIGHLANDER)			+= mach-highlander
 machdir-$(CONFIG_SH_MIGOR)			+= mach-migor
-machdir-$(CONFIG_SH_AP325RXA)			+= mach-ap325rxa
 machdir-$(CONFIG_SH_KFR2R09)			+= mach-kfr2r09
 machdir-$(CONFIG_SH_ECOVEC)			+= mach-ecovec24
-machdir-$(CONFIG_SH_SDK7780)			+= mach-sdk7780
 machdir-$(CONFIG_SH_SDK7786)			+= mach-sdk7786
 machdir-$(CONFIG_SH_X3PROTO)			+= mach-x3proto
-machdir-$(CONFIG_SH_SH7763RDP)			+= mach-sh7763rdp
-machdir-$(CONFIG_SH_SH4202_MICRODEV)		+= mach-microdev
 machdir-$(CONFIG_SH_LANDISK)			+= mach-landisk
-machdir-$(CONFIG_SH_LBOX_RE2)			+= mach-lboxre2
-machdir-$(CONFIG_SH_RSK)			+= mach-rsk
-
-ifneq ($(machdir-y),)
-core-y	+= $(addprefix arch/sh/boards/, \
-	     $(filter-out ., $(patsubst %,%/,$(machdir-y))))
-endif
-
-# Common machine type headers. Not part of the arch/sh/boards/ hierarchy.
-machdir-y	+= mach-common
+machdir-y					+= mach-common
 
 # Companion chips
 core-$(CONFIG_HD6446X_SERIES)	+= arch/sh/cchips/hd6446x/
diff --git a/arch/sh/boards/Makefile b/arch/sh/boards/Makefile
index 4002a22a7c40..b57219436ace 100644
--- a/arch/sh/boards/Makefile
+++ b/arch/sh/boards/Makefile
@@ -18,3 +18,22 @@ obj-$(CONFIG_SH_APSH4A3A)	+= board-apsh4a3a.o
 obj-$(CONFIG_SH_APSH4AD0A)	+= board-apsh4ad0a.o
 
 obj-$(CONFIG_SH_DEVICE_TREE)	+= of-generic.o
+
+obj-$(CONFIG_SOLUTION_ENGINE)	+= mach-se/
+obj-$(CONFIG_SH_HP6XX)		+= mach-hp6xx/
+obj-$(CONFIG_SH_DREAMCAST)	+= mach-dreamcast/
+obj-$(CONFIG_SH_SH03)		+= mach-sh03/
+obj-$(CONFIG_SH_RTS7751R2D)	+= mach-r2d/
+obj-$(CONFIG_SH_HIGHLANDER)	+= mach-highlander/
+obj-$(CONFIG_SH_MIGOR)		+= mach-migor/
+obj-$(CONFIG_SH_AP325RXA)	+= mach-ap325rxa/
+obj-$(CONFIG_SH_KFR2R09)	+= mach-kfr2r09/
+obj-$(CONFIG_SH_ECOVEC)		+= mach-ecovec24/
+obj-$(CONFIG_SH_SDK7780)	+= mach-sdk7780/
+obj-$(CONFIG_SH_SDK7786)	+= mach-sdk7786/
+obj-$(CONFIG_SH_X3PROTO)	+= mach-x3proto/
+obj-$(CONFIG_SH_SH7763RDP)	+= mach-sh7763rdp/
+obj-$(CONFIG_SH_SH4202_MICRODEV)+= mach-microdev/
+obj-$(CONFIG_SH_LANDISK)	+= mach-landisk/
+obj-$(CONFIG_SH_LBOX_RE2)	+= mach-lboxre2/
+obj-$(CONFIG_SH_RSK)		+= mach-rsk/
-- 
2.34.1


^ permalink raw reply related	[flat|nested] 18+ messages in thread

* [PATCH 2/4] sh: move build rule of cchips/hd6446x/ to arch/sh/Kbuild
  2023-02-19 14:15 [PATCH 1/4] sh: fix -Wmissing-include-dirs warnings for various platforms Masahiro Yamada
@ 2023-02-19 14:15 ` Masahiro Yamada
  2023-02-19 17:05   ` Randy Dunlap
  2023-07-04  5:28   ` John Paul Adrian Glaubitz
  2023-02-19 14:15 ` [PATCH 3/4] sh: refactor header include path addition Masahiro Yamada
                   ` (5 subsequent siblings)
  6 siblings, 2 replies; 18+ messages in thread
From: Masahiro Yamada @ 2023-02-19 14:15 UTC (permalink / raw)
  To: linux-kbuild
  Cc: linux-kernel, Randy Dunlap, Masahiro Yamada, Rich Felker,
	Yoshinori Sato, linux-sh

This is the last user of core-y in ARCH=sh.

Use the standard obj-y syntax.

Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>
---

 arch/sh/Kbuild   | 2 ++
 arch/sh/Makefile | 3 ---
 2 files changed, 2 insertions(+), 3 deletions(-)

diff --git a/arch/sh/Kbuild b/arch/sh/Kbuild
index be171880977e..056efec72c2a 100644
--- a/arch/sh/Kbuild
+++ b/arch/sh/Kbuild
@@ -3,5 +3,7 @@ obj-y				+= kernel/ mm/ boards/
 obj-$(CONFIG_SH_FPU_EMU)	+= math-emu/
 obj-$(CONFIG_USE_BUILTIN_DTB)	+= boot/dts/
 
+obj-$(CONFIG_HD6446X_SERIES)	+= cchips/hd6446x/
+
 # for cleaning
 subdir- += boot
diff --git a/arch/sh/Makefile b/arch/sh/Makefile
index a9cad5137f92..0625796cfe7f 100644
--- a/arch/sh/Makefile
+++ b/arch/sh/Makefile
@@ -126,9 +126,6 @@ machdir-$(CONFIG_SH_X3PROTO)			+= mach-x3proto
 machdir-$(CONFIG_SH_LANDISK)			+= mach-landisk
 machdir-y					+= mach-common
 
-# Companion chips
-core-$(CONFIG_HD6446X_SERIES)	+= arch/sh/cchips/hd6446x/
-
 #
 # CPU header paths
 #
-- 
2.34.1


^ permalink raw reply related	[flat|nested] 18+ messages in thread

* [PATCH 3/4] sh: refactor header include path addition
  2023-02-19 14:15 [PATCH 1/4] sh: fix -Wmissing-include-dirs warnings for various platforms Masahiro Yamada
  2023-02-19 14:15 ` [PATCH 2/4] sh: move build rule of cchips/hd6446x/ to arch/sh/Kbuild Masahiro Yamada
@ 2023-02-19 14:15 ` Masahiro Yamada
  2023-02-19 17:05   ` Randy Dunlap
  2023-07-04  5:29   ` John Paul Adrian Glaubitz
  2023-02-19 14:15 ` [PATCH 4/4] sh: remove compiler flag duplication Masahiro Yamada
                   ` (4 subsequent siblings)
  6 siblings, 2 replies; 18+ messages in thread
From: Masahiro Yamada @ 2023-02-19 14:15 UTC (permalink / raw)
  To: linux-kbuild
  Cc: linux-kernel, Randy Dunlap, Masahiro Yamada, Rich Felker,
	Yoshinori Sato, linux-sh

Shorten the code. No functional change intended.

Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>
---

 arch/sh/Makefile | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/arch/sh/Makefile b/arch/sh/Makefile
index 0625796cfe7f..f1c6aace8acb 100644
--- a/arch/sh/Makefile
+++ b/arch/sh/Makefile
@@ -145,8 +145,7 @@ cpuincdir-y			+= cpu-common	# Must be last
 
 drivers-y			+= arch/sh/drivers/
 
-cflags-y	+= $(foreach d, $(cpuincdir-y), -I $(srctree)/arch/sh/include/$(d)) \
-		   $(foreach d, $(machdir-y), -I $(srctree)/arch/sh/include/$(d))
+cflags-y	+= $(addprefix -I $(srctree)/arch/sh/include/, $(cpuincdir-y) $(machdir-y))
 
 KBUILD_CFLAGS		+= -pipe $(cflags-y)
 KBUILD_CPPFLAGS		+= $(cflags-y)
-- 
2.34.1


^ permalink raw reply related	[flat|nested] 18+ messages in thread

* [PATCH 4/4] sh: remove compiler flag duplication
  2023-02-19 14:15 [PATCH 1/4] sh: fix -Wmissing-include-dirs warnings for various platforms Masahiro Yamada
  2023-02-19 14:15 ` [PATCH 2/4] sh: move build rule of cchips/hd6446x/ to arch/sh/Kbuild Masahiro Yamada
  2023-02-19 14:15 ` [PATCH 3/4] sh: refactor header include path addition Masahiro Yamada
@ 2023-02-19 14:15 ` Masahiro Yamada
  2023-02-19 17:05   ` Randy Dunlap
  2023-07-04  5:32   ` John Paul Adrian Glaubitz
  2023-02-19 14:40 ` [PATCH 1/4] sh: fix -Wmissing-include-dirs warnings for various platforms John Paul Adrian Glaubitz
                   ` (3 subsequent siblings)
  6 siblings, 2 replies; 18+ messages in thread
From: Masahiro Yamada @ 2023-02-19 14:15 UTC (permalink / raw)
  To: linux-kbuild
  Cc: linux-kernel, Randy Dunlap, Masahiro Yamada, Rich Felker,
	Yoshinori Sato, linux-sh

Every compiler flag added by arch/sh/Makefile is passed to the
compiler twice.

$(KBUILD_CPPFLAGS) + $(KBUILD_CFLAGS) is used for compiling *.c
$(KBUILD_CPPFLAGS) + $(KBUILD_AFLAGS) is used for compiling *.S

Given the above, adding $(cflags-y) to all of KBUILD_{CPP/C/A}FLAGS
ends up with duplication.

Add -I options to $(KBUILD_CPPFLAGS), and the rest of $(cflags-y)
to KBUILD_{C,A}FLAGS.

Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>
---

 arch/sh/Makefile | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

diff --git a/arch/sh/Makefile b/arch/sh/Makefile
index f1c6aace8acb..cab2f9c011a8 100644
--- a/arch/sh/Makefile
+++ b/arch/sh/Makefile
@@ -145,10 +145,8 @@ cpuincdir-y			+= cpu-common	# Must be last
 
 drivers-y			+= arch/sh/drivers/
 
-cflags-y	+= $(addprefix -I $(srctree)/arch/sh/include/, $(cpuincdir-y) $(machdir-y))
-
+KBUILD_CPPFLAGS		+= $(addprefix -I $(srctree)/arch/sh/include/, $(cpuincdir-y) $(machdir-y))
 KBUILD_CFLAGS		+= -pipe $(cflags-y)
-KBUILD_CPPFLAGS		+= $(cflags-y)
 KBUILD_AFLAGS		+= $(cflags-y)
 
 ifeq ($(CONFIG_MCOUNT),y)
-- 
2.34.1


^ permalink raw reply related	[flat|nested] 18+ messages in thread

* Re: [PATCH 1/4] sh: fix -Wmissing-include-dirs warnings for various platforms
  2023-02-19 14:15 [PATCH 1/4] sh: fix -Wmissing-include-dirs warnings for various platforms Masahiro Yamada
                   ` (2 preceding siblings ...)
  2023-02-19 14:15 ` [PATCH 4/4] sh: remove compiler flag duplication Masahiro Yamada
@ 2023-02-19 14:40 ` John Paul Adrian Glaubitz
  2023-02-19 16:54   ` Masahiro Yamada
  2023-06-25  7:56   ` Masahiro Yamada
  2023-02-19 17:05 ` Randy Dunlap
                   ` (2 subsequent siblings)
  6 siblings, 2 replies; 18+ messages in thread
From: John Paul Adrian Glaubitz @ 2023-02-19 14:40 UTC (permalink / raw)
  To: Masahiro Yamada, linux-kbuild
  Cc: linux-kernel, Randy Dunlap, kernel test robot, Rich Felker,
	Yoshinori Sato, linux-sh

Hi Masahiro!

On Sun, 2023-02-19 at 23:15 +0900, Masahiro Yamada wrote:
> 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.
> 
> -Wmissing-include-dirs is W=1 warning, but 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 not include non-existing include directory.
> 
> To build arch/sh/boards/mach-*/, use the standard obj-y syntax in
> arch/sh/boards/Makefile.
> 
> Reported-by: kernel test robot <lkp@intel.com>
> Link: https://lore.kernel.org/oe-kbuild-all/202302190641.30VVXnPb-lkp@intel.com/
> Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>
> ---

Thanks for your patches! I'm still waiting for my kernel.org account to be created,
so I can set up my own linux-sh tree. I hope that happens next week. There are already
some patches piling up.

Adrian

-- 
 .''`.  John Paul Adrian Glaubitz
: :' :  Debian Developer
`. `'   Physicist
  `-    GPG: 62FF 8A75 84E0 2956 9546  0006 7426 3B37 F5B5 F913

^ permalink raw reply	[flat|nested] 18+ messages in thread

* Re: [PATCH 1/4] sh: fix -Wmissing-include-dirs warnings for various platforms
  2023-02-19 14:40 ` [PATCH 1/4] sh: fix -Wmissing-include-dirs warnings for various platforms John Paul Adrian Glaubitz
@ 2023-02-19 16:54   ` Masahiro Yamada
  2023-06-25  7:56   ` Masahiro Yamada
  1 sibling, 0 replies; 18+ messages in thread
From: Masahiro Yamada @ 2023-02-19 16:54 UTC (permalink / raw)
  To: John Paul Adrian Glaubitz
  Cc: linux-kbuild, linux-kernel, Randy Dunlap, kernel test robot,
	Rich Felker, Yoshinori Sato, linux-sh

On Sun, Feb 19, 2023 at 11:40 PM John Paul Adrian Glaubitz
<glaubitz@physik.fu-berlin.de> wrote:
>
> Hi Masahiro!
>
> On Sun, 2023-02-19 at 23:15 +0900, Masahiro Yamada wrote:
> > 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.
> >
> > -Wmissing-include-dirs is W=1 warning, but 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 not include non-existing include directory.
> >
> > To build arch/sh/boards/mach-*/, use the standard obj-y syntax in
> > arch/sh/boards/Makefile.
> >
> > Reported-by: kernel test robot <lkp@intel.com>
> > Link: https://lore.kernel.org/oe-kbuild-all/202302190641.30VVXnPb-lkp@intel.com/
> > Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>
> > ---
>
> Thanks for your patches! I'm still waiting for my kernel.org account to be created,
> so I can set up my own linux-sh tree. I hope that happens next week. There are already
> some patches piling up.
>
> Adrian


That's good news.

I just thought arch/sh is no longer maintained.
(I saw a patch for the entire removal of arch/sh/ somewhere).

I leave this series up to you.




> --
>  .''`.  John Paul Adrian Glaubitz
> : :' :  Debian Developer
> `. `'   Physicist
>   `-    GPG: 62FF 8A75 84E0 2956 9546  0006 7426 3B37 F5B5 F913



-- 
Best Regards
Masahiro Yamada

^ permalink raw reply	[flat|nested] 18+ messages in thread

* Re: [PATCH 1/4] sh: fix -Wmissing-include-dirs warnings for various platforms
  2023-02-19 14:15 [PATCH 1/4] sh: fix -Wmissing-include-dirs warnings for various platforms Masahiro Yamada
                   ` (3 preceding siblings ...)
  2023-02-19 14:40 ` [PATCH 1/4] sh: fix -Wmissing-include-dirs warnings for various platforms John Paul Adrian Glaubitz
@ 2023-02-19 17:05 ` Randy Dunlap
  2023-07-04  5:26 ` John Paul Adrian Glaubitz
  2023-07-05 17:08 ` John Paul Adrian Glaubitz
  6 siblings, 0 replies; 18+ messages in thread
From: Randy Dunlap @ 2023-02-19 17:05 UTC (permalink / raw)
  To: Masahiro Yamada, linux-kbuild
  Cc: linux-kernel, kernel test robot, Rich Felker, Yoshinori Sato, linux-sh



On 2/19/23 06:15, Masahiro Yamada wrote:
> 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.
> 
> -Wmissing-include-dirs is W=1 warning, but 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 not include non-existing include directory.
> 
> To build arch/sh/boards/mach-*/, use the standard obj-y syntax in
> arch/sh/boards/Makefile.
> 
> Reported-by: kernel test robot <lkp@intel.com>
> Link: https://lore.kernel.org/oe-kbuild-all/202302190641.30VVXnPb-lkp@intel.com/
> Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>

Acked-by: Randy Dunlap <rdunlap@infradead.org>
Tested-by: Randy Dunlap <rdunlap@infradead.org>

Thanks.

> ---
> 
>  arch/sh/Makefile        | 18 +-----------------
>  arch/sh/boards/Makefile | 19 +++++++++++++++++++
>  2 files changed, 20 insertions(+), 17 deletions(-)
> 
> diff --git a/arch/sh/Makefile b/arch/sh/Makefile
> index 5c8776482530..a9cad5137f92 100644
> --- a/arch/sh/Makefile
> +++ b/arch/sh/Makefile
> @@ -116,31 +116,15 @@ export ld-bfd
>  
>  # Mach groups
>  machdir-$(CONFIG_SOLUTION_ENGINE)		+= mach-se
> -machdir-$(CONFIG_SH_HP6XX)			+= mach-hp6xx
>  machdir-$(CONFIG_SH_DREAMCAST)			+= mach-dreamcast
>  machdir-$(CONFIG_SH_SH03)			+= mach-sh03
> -machdir-$(CONFIG_SH_RTS7751R2D)			+= mach-r2d
> -machdir-$(CONFIG_SH_HIGHLANDER)			+= mach-highlander
>  machdir-$(CONFIG_SH_MIGOR)			+= mach-migor
> -machdir-$(CONFIG_SH_AP325RXA)			+= mach-ap325rxa
>  machdir-$(CONFIG_SH_KFR2R09)			+= mach-kfr2r09
>  machdir-$(CONFIG_SH_ECOVEC)			+= mach-ecovec24
> -machdir-$(CONFIG_SH_SDK7780)			+= mach-sdk7780
>  machdir-$(CONFIG_SH_SDK7786)			+= mach-sdk7786
>  machdir-$(CONFIG_SH_X3PROTO)			+= mach-x3proto
> -machdir-$(CONFIG_SH_SH7763RDP)			+= mach-sh7763rdp
> -machdir-$(CONFIG_SH_SH4202_MICRODEV)		+= mach-microdev
>  machdir-$(CONFIG_SH_LANDISK)			+= mach-landisk
> -machdir-$(CONFIG_SH_LBOX_RE2)			+= mach-lboxre2
> -machdir-$(CONFIG_SH_RSK)			+= mach-rsk
> -
> -ifneq ($(machdir-y),)
> -core-y	+= $(addprefix arch/sh/boards/, \
> -	     $(filter-out ., $(patsubst %,%/,$(machdir-y))))
> -endif
> -
> -# Common machine type headers. Not part of the arch/sh/boards/ hierarchy.
> -machdir-y	+= mach-common
> +machdir-y					+= mach-common
>  
>  # Companion chips
>  core-$(CONFIG_HD6446X_SERIES)	+= arch/sh/cchips/hd6446x/
> diff --git a/arch/sh/boards/Makefile b/arch/sh/boards/Makefile
> index 4002a22a7c40..b57219436ace 100644
> --- a/arch/sh/boards/Makefile
> +++ b/arch/sh/boards/Makefile
> @@ -18,3 +18,22 @@ obj-$(CONFIG_SH_APSH4A3A)	+= board-apsh4a3a.o
>  obj-$(CONFIG_SH_APSH4AD0A)	+= board-apsh4ad0a.o
>  
>  obj-$(CONFIG_SH_DEVICE_TREE)	+= of-generic.o
> +
> +obj-$(CONFIG_SOLUTION_ENGINE)	+= mach-se/
> +obj-$(CONFIG_SH_HP6XX)		+= mach-hp6xx/
> +obj-$(CONFIG_SH_DREAMCAST)	+= mach-dreamcast/
> +obj-$(CONFIG_SH_SH03)		+= mach-sh03/
> +obj-$(CONFIG_SH_RTS7751R2D)	+= mach-r2d/
> +obj-$(CONFIG_SH_HIGHLANDER)	+= mach-highlander/
> +obj-$(CONFIG_SH_MIGOR)		+= mach-migor/
> +obj-$(CONFIG_SH_AP325RXA)	+= mach-ap325rxa/
> +obj-$(CONFIG_SH_KFR2R09)	+= mach-kfr2r09/
> +obj-$(CONFIG_SH_ECOVEC)		+= mach-ecovec24/
> +obj-$(CONFIG_SH_SDK7780)	+= mach-sdk7780/
> +obj-$(CONFIG_SH_SDK7786)	+= mach-sdk7786/
> +obj-$(CONFIG_SH_X3PROTO)	+= mach-x3proto/
> +obj-$(CONFIG_SH_SH7763RDP)	+= mach-sh7763rdp/
> +obj-$(CONFIG_SH_SH4202_MICRODEV)+= mach-microdev/
> +obj-$(CONFIG_SH_LANDISK)	+= mach-landisk/
> +obj-$(CONFIG_SH_LBOX_RE2)	+= mach-lboxre2/
> +obj-$(CONFIG_SH_RSK)		+= mach-rsk/

-- 
~Randy

^ permalink raw reply	[flat|nested] 18+ messages in thread

* Re: [PATCH 2/4] sh: move build rule of cchips/hd6446x/ to arch/sh/Kbuild
  2023-02-19 14:15 ` [PATCH 2/4] sh: move build rule of cchips/hd6446x/ to arch/sh/Kbuild Masahiro Yamada
@ 2023-02-19 17:05   ` Randy Dunlap
  2023-07-04  5:28   ` John Paul Adrian Glaubitz
  1 sibling, 0 replies; 18+ messages in thread
From: Randy Dunlap @ 2023-02-19 17:05 UTC (permalink / raw)
  To: Masahiro Yamada, linux-kbuild
  Cc: linux-kernel, Rich Felker, Yoshinori Sato, linux-sh



On 2/19/23 06:15, Masahiro Yamada wrote:
> This is the last user of core-y in ARCH=sh.
> 
> Use the standard obj-y syntax.
> 
> Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>

Acked-by: Randy Dunlap <rdunlap@infradead.org>
Tested-by: Randy Dunlap <rdunlap@infradead.org>

Thanks.

> ---
> 
>  arch/sh/Kbuild   | 2 ++
>  arch/sh/Makefile | 3 ---
>  2 files changed, 2 insertions(+), 3 deletions(-)
> 
> diff --git a/arch/sh/Kbuild b/arch/sh/Kbuild
> index be171880977e..056efec72c2a 100644
> --- a/arch/sh/Kbuild
> +++ b/arch/sh/Kbuild
> @@ -3,5 +3,7 @@ obj-y				+= kernel/ mm/ boards/
>  obj-$(CONFIG_SH_FPU_EMU)	+= math-emu/
>  obj-$(CONFIG_USE_BUILTIN_DTB)	+= boot/dts/
>  
> +obj-$(CONFIG_HD6446X_SERIES)	+= cchips/hd6446x/
> +
>  # for cleaning
>  subdir- += boot
> diff --git a/arch/sh/Makefile b/arch/sh/Makefile
> index a9cad5137f92..0625796cfe7f 100644
> --- a/arch/sh/Makefile
> +++ b/arch/sh/Makefile
> @@ -126,9 +126,6 @@ machdir-$(CONFIG_SH_X3PROTO)			+= mach-x3proto
>  machdir-$(CONFIG_SH_LANDISK)			+= mach-landisk
>  machdir-y					+= mach-common
>  
> -# Companion chips
> -core-$(CONFIG_HD6446X_SERIES)	+= arch/sh/cchips/hd6446x/
> -
>  #
>  # CPU header paths
>  #

-- 
~Randy

^ permalink raw reply	[flat|nested] 18+ messages in thread

* Re: [PATCH 3/4] sh: refactor header include path addition
  2023-02-19 14:15 ` [PATCH 3/4] sh: refactor header include path addition Masahiro Yamada
@ 2023-02-19 17:05   ` Randy Dunlap
  2023-07-04  5:29   ` John Paul Adrian Glaubitz
  1 sibling, 0 replies; 18+ messages in thread
From: Randy Dunlap @ 2023-02-19 17:05 UTC (permalink / raw)
  To: Masahiro Yamada, linux-kbuild
  Cc: linux-kernel, Rich Felker, Yoshinori Sato, linux-sh



On 2/19/23 06:15, Masahiro Yamada wrote:
> Shorten the code. No functional change intended.
> 
> Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>

Acked-by: Randy Dunlap <rdunlap@infradead.org>
Tested-by: Randy Dunlap <rdunlap@infradead.org>

Thanks.

> ---
> 
>  arch/sh/Makefile | 3 +--
>  1 file changed, 1 insertion(+), 2 deletions(-)
> 
> diff --git a/arch/sh/Makefile b/arch/sh/Makefile
> index 0625796cfe7f..f1c6aace8acb 100644
> --- a/arch/sh/Makefile
> +++ b/arch/sh/Makefile
> @@ -145,8 +145,7 @@ cpuincdir-y			+= cpu-common	# Must be last
>  
>  drivers-y			+= arch/sh/drivers/
>  
> -cflags-y	+= $(foreach d, $(cpuincdir-y), -I $(srctree)/arch/sh/include/$(d)) \
> -		   $(foreach d, $(machdir-y), -I $(srctree)/arch/sh/include/$(d))
> +cflags-y	+= $(addprefix -I $(srctree)/arch/sh/include/, $(cpuincdir-y) $(machdir-y))
>  
>  KBUILD_CFLAGS		+= -pipe $(cflags-y)
>  KBUILD_CPPFLAGS		+= $(cflags-y)

-- 
~Randy

^ permalink raw reply	[flat|nested] 18+ messages in thread

* Re: [PATCH 4/4] sh: remove compiler flag duplication
  2023-02-19 14:15 ` [PATCH 4/4] sh: remove compiler flag duplication Masahiro Yamada
@ 2023-02-19 17:05   ` Randy Dunlap
  2023-07-04  5:32   ` John Paul Adrian Glaubitz
  1 sibling, 0 replies; 18+ messages in thread
From: Randy Dunlap @ 2023-02-19 17:05 UTC (permalink / raw)
  To: Masahiro Yamada, linux-kbuild
  Cc: linux-kernel, Rich Felker, Yoshinori Sato, linux-sh



On 2/19/23 06:15, Masahiro Yamada wrote:
> Every compiler flag added by arch/sh/Makefile is passed to the
> compiler twice.
> 
> $(KBUILD_CPPFLAGS) + $(KBUILD_CFLAGS) is used for compiling *.c
> $(KBUILD_CPPFLAGS) + $(KBUILD_AFLAGS) is used for compiling *.S
> 
> Given the above, adding $(cflags-y) to all of KBUILD_{CPP/C/A}FLAGS
> ends up with duplication.
> 
> Add -I options to $(KBUILD_CPPFLAGS), and the rest of $(cflags-y)
> to KBUILD_{C,A}FLAGS.
> 
> Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>

Acked-by: Randy Dunlap <rdunlap@infradead.org>
Tested-by: Randy Dunlap <rdunlap@infradead.org>

Thanks.

> ---
> 
>  arch/sh/Makefile | 4 +---
>  1 file changed, 1 insertion(+), 3 deletions(-)
> 
> diff --git a/arch/sh/Makefile b/arch/sh/Makefile
> index f1c6aace8acb..cab2f9c011a8 100644
> --- a/arch/sh/Makefile
> +++ b/arch/sh/Makefile
> @@ -145,10 +145,8 @@ cpuincdir-y			+= cpu-common	# Must be last
>  
>  drivers-y			+= arch/sh/drivers/
>  
> -cflags-y	+= $(addprefix -I $(srctree)/arch/sh/include/, $(cpuincdir-y) $(machdir-y))
> -
> +KBUILD_CPPFLAGS		+= $(addprefix -I $(srctree)/arch/sh/include/, $(cpuincdir-y) $(machdir-y))
>  KBUILD_CFLAGS		+= -pipe $(cflags-y)
> -KBUILD_CPPFLAGS		+= $(cflags-y)
>  KBUILD_AFLAGS		+= $(cflags-y)
>  
>  ifeq ($(CONFIG_MCOUNT),y)

-- 
~Randy

^ permalink raw reply	[flat|nested] 18+ messages in thread

* Re: [PATCH 1/4] sh: fix -Wmissing-include-dirs warnings for various platforms
  2023-02-19 14:40 ` [PATCH 1/4] sh: fix -Wmissing-include-dirs warnings for various platforms John Paul Adrian Glaubitz
  2023-02-19 16:54   ` Masahiro Yamada
@ 2023-06-25  7:56   ` Masahiro Yamada
  2023-06-25  8:11     ` John Paul Adrian Glaubitz
  2023-06-25 21:07     ` John Paul Adrian Glaubitz
  1 sibling, 2 replies; 18+ messages in thread
From: Masahiro Yamada @ 2023-06-25  7:56 UTC (permalink / raw)
  To: John Paul Adrian Glaubitz
  Cc: linux-kbuild, linux-kernel, Randy Dunlap, kernel test robot,
	Rich Felker, Yoshinori Sato, linux-sh

On Sun, Feb 19, 2023 at 11:40 PM John Paul Adrian Glaubitz
<glaubitz@physik.fu-berlin.de> wrote:
>
> Hi Masahiro!
>
> On Sun, 2023-02-19 at 23:15 +0900, Masahiro Yamada wrote:
> > 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.
> >
> > -Wmissing-include-dirs is W=1 warning, but 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 not include non-existing include directory.
> >
> > To build arch/sh/boards/mach-*/, use the standard obj-y syntax in
> > arch/sh/boards/Makefile.
> >
> > Reported-by: kernel test robot <lkp@intel.com>
> > Link: https://lore.kernel.org/oe-kbuild-all/202302190641.30VVXnPb-lkp@intel.com/
> > Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>
> > ---
>
> Thanks for your patches! I'm still waiting for my kernel.org account to be created,
> so I can set up my own linux-sh tree. I hope that happens next week. There are already
> some patches piling up.


So, what has happened since then?






>
> Adrian
>
> --
>  .''`.  John Paul Adrian Glaubitz
> : :' :  Debian Developer
> `. `'   Physicist
>   `-    GPG: 62FF 8A75 84E0 2956 9546  0006 7426 3B37 F5B5 F913



-- 
Best Regards
Masahiro Yamada

^ permalink raw reply	[flat|nested] 18+ messages in thread

* Re: [PATCH 1/4] sh: fix -Wmissing-include-dirs warnings for various platforms
  2023-06-25  7:56   ` Masahiro Yamada
@ 2023-06-25  8:11     ` John Paul Adrian Glaubitz
  2023-06-25 21:07     ` John Paul Adrian Glaubitz
  1 sibling, 0 replies; 18+ messages in thread
From: John Paul Adrian Glaubitz @ 2023-06-25  8:11 UTC (permalink / raw)
  To: Masahiro Yamada
  Cc: linux-kbuild, linux-kernel, Randy Dunlap, kernel test robot,
	Rich Felker, Yoshinori Sato, linux-sh



> On Jun 25, 2023, at 9:57 AM, Masahiro Yamada <masahiroy@kernel.org> wrote:
> 
> On Sun, Feb 19, 2023 at 11:40 PM John Paul Adrian Glaubitz
> <glaubitz@physik.fu-berlin.de> wrote:
>> 
>> Hi Masahiro!
>> 
>>> On Sun, 2023-02-19 at 23:15 +0900, Masahiro Yamada wrote:
>>> 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.
>>> 
>>> -Wmissing-include-dirs is W=1 warning, but 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 not include non-existing include directory.
>>> 
>>> To build arch/sh/boards/mach-*/, use the standard obj-y syntax in
>>> arch/sh/boards/Makefile.
>>> 
>>> Reported-by: kernel test robot <lkp@intel.com>
>>> Link: https://lore.kernel.org/oe-kbuild-all/202302190641.30VVXnPb-lkp@intel.com/
>>> Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>
>>> ---
>> 
>> Thanks for your patches! I'm still waiting for my kernel.org account to be created,
>> so I can set up my own linux-sh tree. I hope that happens next week. There are already
>> some patches piling up.
> 
> 
> So, what has happened since then?

Sorry, these somehow went off my radar.

I’ll have a look later today.

Adrian

^ permalink raw reply	[flat|nested] 18+ messages in thread

* Re: [PATCH 1/4] sh: fix -Wmissing-include-dirs warnings for various platforms
  2023-06-25  7:56   ` Masahiro Yamada
  2023-06-25  8:11     ` John Paul Adrian Glaubitz
@ 2023-06-25 21:07     ` John Paul Adrian Glaubitz
  1 sibling, 0 replies; 18+ messages in thread
From: John Paul Adrian Glaubitz @ 2023-06-25 21:07 UTC (permalink / raw)
  To: Masahiro Yamada
  Cc: linux-kbuild, linux-kernel, Randy Dunlap, kernel test robot,
	Rich Felker, Yoshinori Sato, linux-sh

Hi Masahiro!

On Sun, 2023-06-25 at 16:56 +0900, Masahiro Yamada wrote:
> On Sun, Feb 19, 2023 at 11:40 PM John Paul Adrian Glaubitz
> <glaubitz@physik.fu-berlin.de> wrote:
> > 
> > Hi Masahiro!
> > 
> > On Sun, 2023-02-19 at 23:15 +0900, Masahiro Yamada wrote:
> > > 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.
> > > 
> > > -Wmissing-include-dirs is W=1 warning, but 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 not include non-existing include directory.
> > > 
> > > To build arch/sh/boards/mach-*/, use the standard obj-y syntax in
> > > arch/sh/boards/Makefile.
> > > 
> > > Reported-by: kernel test robot <lkp@intel.com>
> > > Link: https://lore.kernel.org/oe-kbuild-all/202302190641.30VVXnPb-lkp@intel.com/
> > > Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>
> > > ---
> > 
> > Thanks for your patches! I'm still waiting for my kernel.org account to be created,
> > so I can set up my own linux-sh tree. I hope that happens next week. There are already
> > some patches piling up.
> 
> 
> So, what has happened since then?

I'll review and test these tomorrow when I'm back in the office.

Unless there are any issues, I am going to pick the series up for 6.5.

Adrian

-- 
 .''`.  John Paul Adrian Glaubitz
: :' :  Debian Developer
`. `'   Physicist
  `-    GPG: 62FF 8A75 84E0 2956 9546  0006 7426 3B37 F5B5 F913

^ permalink raw reply	[flat|nested] 18+ messages in thread

* Re: [PATCH 1/4] sh: fix -Wmissing-include-dirs warnings for various platforms
  2023-02-19 14:15 [PATCH 1/4] sh: fix -Wmissing-include-dirs warnings for various platforms Masahiro Yamada
                   ` (4 preceding siblings ...)
  2023-02-19 17:05 ` Randy Dunlap
@ 2023-07-04  5:26 ` John Paul Adrian Glaubitz
  2023-07-05 17:08 ` John Paul Adrian Glaubitz
  6 siblings, 0 replies; 18+ messages in thread
From: John Paul Adrian Glaubitz @ 2023-07-04  5:26 UTC (permalink / raw)
  To: Masahiro Yamada, linux-kbuild
  Cc: linux-kernel, Randy Dunlap, kernel test robot, Rich Felker,
	Yoshinori Sato, linux-sh

Hi Masahiro!

On Sun, 2023-02-19 at 23:15 +0900, Masahiro Yamada wrote:
> 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.
> 
> -Wmissing-include-dirs is W=1 warning, but 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 not include non-existing include directory.
> 
> To build arch/sh/boards/mach-*/, use the standard obj-y syntax in
> arch/sh/boards/Makefile.
> 
> Reported-by: kernel test robot <lkp@intel.com>
> Link: https://lore.kernel.org/oe-kbuild-all/202302190641.30VVXnPb-lkp@intel.com/
> Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>
> ---
> 
>  arch/sh/Makefile        | 18 +-----------------
>  arch/sh/boards/Makefile | 19 +++++++++++++++++++
>  2 files changed, 20 insertions(+), 17 deletions(-)
> 
> diff --git a/arch/sh/Makefile b/arch/sh/Makefile
> index 5c8776482530..a9cad5137f92 100644
> --- a/arch/sh/Makefile
> +++ b/arch/sh/Makefile
> @@ -116,31 +116,15 @@ export ld-bfd
>  
>  # Mach groups
>  machdir-$(CONFIG_SOLUTION_ENGINE)		+= mach-se
> -machdir-$(CONFIG_SH_HP6XX)			+= mach-hp6xx
>  machdir-$(CONFIG_SH_DREAMCAST)			+= mach-dreamcast
>  machdir-$(CONFIG_SH_SH03)			+= mach-sh03
> -machdir-$(CONFIG_SH_RTS7751R2D)			+= mach-r2d
> -machdir-$(CONFIG_SH_HIGHLANDER)			+= mach-highlander
>  machdir-$(CONFIG_SH_MIGOR)			+= mach-migor
> -machdir-$(CONFIG_SH_AP325RXA)			+= mach-ap325rxa
>  machdir-$(CONFIG_SH_KFR2R09)			+= mach-kfr2r09
>  machdir-$(CONFIG_SH_ECOVEC)			+= mach-ecovec24
> -machdir-$(CONFIG_SH_SDK7780)			+= mach-sdk7780
>  machdir-$(CONFIG_SH_SDK7786)			+= mach-sdk7786
>  machdir-$(CONFIG_SH_X3PROTO)			+= mach-x3proto
> -machdir-$(CONFIG_SH_SH7763RDP)			+= mach-sh7763rdp
> -machdir-$(CONFIG_SH_SH4202_MICRODEV)		+= mach-microdev
>  machdir-$(CONFIG_SH_LANDISK)			+= mach-landisk
> -machdir-$(CONFIG_SH_LBOX_RE2)			+= mach-lboxre2
> -machdir-$(CONFIG_SH_RSK)			+= mach-rsk
> -
> -ifneq ($(machdir-y),)
> -core-y	+= $(addprefix arch/sh/boards/, \
> -	     $(filter-out ., $(patsubst %,%/,$(machdir-y))))
> -endif
> -
> -# Common machine type headers. Not part of the arch/sh/boards/ hierarchy.
> -machdir-y	+= mach-common
> +machdir-y					+= mach-common
>  
>  # Companion chips
>  core-$(CONFIG_HD6446X_SERIES)	+= arch/sh/cchips/hd6446x/
> diff --git a/arch/sh/boards/Makefile b/arch/sh/boards/Makefile
> index 4002a22a7c40..b57219436ace 100644
> --- a/arch/sh/boards/Makefile
> +++ b/arch/sh/boards/Makefile
> @@ -18,3 +18,22 @@ obj-$(CONFIG_SH_APSH4A3A)	+= board-apsh4a3a.o
>  obj-$(CONFIG_SH_APSH4AD0A)	+= board-apsh4ad0a.o
>  
>  obj-$(CONFIG_SH_DEVICE_TREE)	+= of-generic.o
> +
> +obj-$(CONFIG_SOLUTION_ENGINE)	+= mach-se/
> +obj-$(CONFIG_SH_HP6XX)		+= mach-hp6xx/
> +obj-$(CONFIG_SH_DREAMCAST)	+= mach-dreamcast/
> +obj-$(CONFIG_SH_SH03)		+= mach-sh03/
> +obj-$(CONFIG_SH_RTS7751R2D)	+= mach-r2d/
> +obj-$(CONFIG_SH_HIGHLANDER)	+= mach-highlander/
> +obj-$(CONFIG_SH_MIGOR)		+= mach-migor/
> +obj-$(CONFIG_SH_AP325RXA)	+= mach-ap325rxa/
> +obj-$(CONFIG_SH_KFR2R09)	+= mach-kfr2r09/
> +obj-$(CONFIG_SH_ECOVEC)		+= mach-ecovec24/
> +obj-$(CONFIG_SH_SDK7780)	+= mach-sdk7780/
> +obj-$(CONFIG_SH_SDK7786)	+= mach-sdk7786/
> +obj-$(CONFIG_SH_X3PROTO)	+= mach-x3proto/
> +obj-$(CONFIG_SH_SH7763RDP)	+= mach-sh7763rdp/
> +obj-$(CONFIG_SH_SH4202_MICRODEV)+= mach-microdev/
> +obj-$(CONFIG_SH_LANDISK)	+= mach-landisk/
> +obj-$(CONFIG_SH_LBOX_RE2)	+= mach-lboxre2/
> +obj-$(CONFIG_SH_RSK)		+= mach-rsk/

Can you fix the tabs so that the mach directories are all aligned?

Other than that:

Reviewed-by: John Paul Adrian Glaubitz <glaubitz@physik.fu-berlin.de>

Adrian

-- 
 .''`.  John Paul Adrian Glaubitz
: :' :  Debian Developer
`. `'   Physicist
  `-    GPG: 62FF 8A75 84E0 2956 9546  0006 7426 3B37 F5B5 F913

^ permalink raw reply	[flat|nested] 18+ messages in thread

* Re: [PATCH 2/4] sh: move build rule of cchips/hd6446x/ to arch/sh/Kbuild
  2023-02-19 14:15 ` [PATCH 2/4] sh: move build rule of cchips/hd6446x/ to arch/sh/Kbuild Masahiro Yamada
  2023-02-19 17:05   ` Randy Dunlap
@ 2023-07-04  5:28   ` John Paul Adrian Glaubitz
  1 sibling, 0 replies; 18+ messages in thread
From: John Paul Adrian Glaubitz @ 2023-07-04  5:28 UTC (permalink / raw)
  To: Masahiro Yamada, linux-kbuild
  Cc: linux-kernel, Randy Dunlap, Rich Felker, Yoshinori Sato, linux-sh

Hi Masahiro!

On Sun, 2023-02-19 at 23:15 +0900, Masahiro Yamada wrote:
> This is the last user of core-y in ARCH=sh.
> 
> Use the standard obj-y syntax.
> 
> Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>
> ---
> 
>  arch/sh/Kbuild   | 2 ++
>  arch/sh/Makefile | 3 ---
>  2 files changed, 2 insertions(+), 3 deletions(-)
> 
> diff --git a/arch/sh/Kbuild b/arch/sh/Kbuild
> index be171880977e..056efec72c2a 100644
> --- a/arch/sh/Kbuild
> +++ b/arch/sh/Kbuild
> @@ -3,5 +3,7 @@ obj-y				+= kernel/ mm/ boards/
>  obj-$(CONFIG_SH_FPU_EMU)	+= math-emu/
>  obj-$(CONFIG_USE_BUILTIN_DTB)	+= boot/dts/
>  
> +obj-$(CONFIG_HD6446X_SERIES)	+= cchips/hd6446x/
> +
>  # for cleaning
>  subdir- += boot
> diff --git a/arch/sh/Makefile b/arch/sh/Makefile
> index a9cad5137f92..0625796cfe7f 100644
> --- a/arch/sh/Makefile
> +++ b/arch/sh/Makefile
> @@ -126,9 +126,6 @@ machdir-$(CONFIG_SH_X3PROTO)			+= mach-x3proto
>  machdir-$(CONFIG_SH_LANDISK)			+= mach-landisk
>  machdir-y					+= mach-common
>  
> -# Companion chips
> -core-$(CONFIG_HD6446X_SERIES)	+= arch/sh/cchips/hd6446x/
> -
>  #
>  # CPU header paths
>  #

Reviewed-by: John Paul Adrian Glaubitz <glaubitz@physik.fu-berlin.de>

-- 
 .''`.  John Paul Adrian Glaubitz
: :' :  Debian Developer
`. `'   Physicist
  `-    GPG: 62FF 8A75 84E0 2956 9546  0006 7426 3B37 F5B5 F913

^ permalink raw reply	[flat|nested] 18+ messages in thread

* Re: [PATCH 3/4] sh: refactor header include path addition
  2023-02-19 14:15 ` [PATCH 3/4] sh: refactor header include path addition Masahiro Yamada
  2023-02-19 17:05   ` Randy Dunlap
@ 2023-07-04  5:29   ` John Paul Adrian Glaubitz
  1 sibling, 0 replies; 18+ messages in thread
From: John Paul Adrian Glaubitz @ 2023-07-04  5:29 UTC (permalink / raw)
  To: Masahiro Yamada, linux-kbuild
  Cc: linux-kernel, Randy Dunlap, Rich Felker, Yoshinori Sato, linux-sh

On Sun, 2023-02-19 at 23:15 +0900, Masahiro Yamada wrote:
> Shorten the code. No functional change intended.
> 
> Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>
> ---
> 
>  arch/sh/Makefile | 3 +--
>  1 file changed, 1 insertion(+), 2 deletions(-)
> 
> diff --git a/arch/sh/Makefile b/arch/sh/Makefile
> index 0625796cfe7f..f1c6aace8acb 100644
> --- a/arch/sh/Makefile
> +++ b/arch/sh/Makefile
> @@ -145,8 +145,7 @@ cpuincdir-y			+= cpu-common	# Must be last
>  
>  drivers-y			+= arch/sh/drivers/
>  
> -cflags-y	+= $(foreach d, $(cpuincdir-y), -I $(srctree)/arch/sh/include/$(d)) \
> -		   $(foreach d, $(machdir-y), -I $(srctree)/arch/sh/include/$(d))
> +cflags-y	+= $(addprefix -I $(srctree)/arch/sh/include/, $(cpuincdir-y) $(machdir-y))
>  
>  KBUILD_CFLAGS		+= -pipe $(cflags-y)
>  KBUILD_CPPFLAGS		+= $(cflags-y)

Reviewed-by: John Paul Adrian Glaubitz <glaubitz@physik.fu-berlin.de>

-- 
 .''`.  John Paul Adrian Glaubitz
: :' :  Debian Developer
`. `'   Physicist
  `-    GPG: 62FF 8A75 84E0 2956 9546  0006 7426 3B37 F5B5 F913

^ permalink raw reply	[flat|nested] 18+ messages in thread

* Re: [PATCH 4/4] sh: remove compiler flag duplication
  2023-02-19 14:15 ` [PATCH 4/4] sh: remove compiler flag duplication Masahiro Yamada
  2023-02-19 17:05   ` Randy Dunlap
@ 2023-07-04  5:32   ` John Paul Adrian Glaubitz
  1 sibling, 0 replies; 18+ messages in thread
From: John Paul Adrian Glaubitz @ 2023-07-04  5:32 UTC (permalink / raw)
  To: Masahiro Yamada, linux-kbuild
  Cc: linux-kernel, Randy Dunlap, Rich Felker, Yoshinori Sato, linux-sh

On Sun, 2023-02-19 at 23:15 +0900, Masahiro Yamada wrote:
> Every compiler flag added by arch/sh/Makefile is passed to the
> compiler twice.
> 
> $(KBUILD_CPPFLAGS) + $(KBUILD_CFLAGS) is used for compiling *.c
> $(KBUILD_CPPFLAGS) + $(KBUILD_AFLAGS) is used for compiling *.S
> 
> Given the above, adding $(cflags-y) to all of KBUILD_{CPP/C/A}FLAGS
> ends up with duplication.
> 
> Add -I options to $(KBUILD_CPPFLAGS), and the rest of $(cflags-y)
> to KBUILD_{C,A}FLAGS.
> 
> Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>
> ---
> 
>  arch/sh/Makefile | 4 +---
>  1 file changed, 1 insertion(+), 3 deletions(-)
> 
> diff --git a/arch/sh/Makefile b/arch/sh/Makefile
> index f1c6aace8acb..cab2f9c011a8 100644
> --- a/arch/sh/Makefile
> +++ b/arch/sh/Makefile
> @@ -145,10 +145,8 @@ cpuincdir-y			+= cpu-common	# Must be last
>  
>  drivers-y			+= arch/sh/drivers/
>  
> -cflags-y	+= $(addprefix -I $(srctree)/arch/sh/include/, $(cpuincdir-y) $(machdir-y))
> -
> +KBUILD_CPPFLAGS		+= $(addprefix -I $(srctree)/arch/sh/include/, $(cpuincdir-y) $(machdir-y))
>  KBUILD_CFLAGS		+= -pipe $(cflags-y)
> -KBUILD_CPPFLAGS		+= $(cflags-y)
>  KBUILD_AFLAGS		+= $(cflags-y)
>  
>  ifeq ($(CONFIG_MCOUNT),y)

Reviewed-by: John Paul Adrian Glaubitz <glaubitz@physik.fu-berlin.de>

-- 
 .''`.  John Paul Adrian Glaubitz
: :' :  Debian Developer
`. `'   Physicist
  `-    GPG: 62FF 8A75 84E0 2956 9546  0006 7426 3B37 F5B5 F913

^ permalink raw reply	[flat|nested] 18+ messages in thread

* Re: [PATCH 1/4] sh: fix -Wmissing-include-dirs warnings for various platforms
  2023-02-19 14:15 [PATCH 1/4] sh: fix -Wmissing-include-dirs warnings for various platforms Masahiro Yamada
                   ` (5 preceding siblings ...)
  2023-07-04  5:26 ` John Paul Adrian Glaubitz
@ 2023-07-05 17:08 ` John Paul Adrian Glaubitz
  6 siblings, 0 replies; 18+ messages in thread
From: John Paul Adrian Glaubitz @ 2023-07-05 17:08 UTC (permalink / raw)
  To: Masahiro Yamada, linux-kbuild
  Cc: linux-kernel, Randy Dunlap, kernel test robot, Rich Felker,
	Yoshinori Sato, linux-sh

On Sun, 2023-02-19 at 23:15 +0900, Masahiro Yamada wrote:
> 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.
> 
> -Wmissing-include-dirs is W=1 warning, but 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 not include non-existing include directory.
> 
> To build arch/sh/boards/mach-*/, use the standard obj-y syntax in
> arch/sh/boards/Makefile.
> 
> Reported-by: kernel test robot <lkp@intel.com>
> Link: https://lore.kernel.org/oe-kbuild-all/202302190641.30VVXnPb-lkp@intel.com/
> Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>
> ---
> 
>  arch/sh/Makefile        | 18 +-----------------
>  arch/sh/boards/Makefile | 19 +++++++++++++++++++
>  2 files changed, 20 insertions(+), 17 deletions(-)
> 
> diff --git a/arch/sh/Makefile b/arch/sh/Makefile
> index 5c8776482530..a9cad5137f92 100644
> --- a/arch/sh/Makefile
> +++ b/arch/sh/Makefile
> @@ -116,31 +116,15 @@ export ld-bfd
>  
>  # Mach groups
>  machdir-$(CONFIG_SOLUTION_ENGINE)		+= mach-se
> -machdir-$(CONFIG_SH_HP6XX)			+= mach-hp6xx
>  machdir-$(CONFIG_SH_DREAMCAST)			+= mach-dreamcast
>  machdir-$(CONFIG_SH_SH03)			+= mach-sh03
> -machdir-$(CONFIG_SH_RTS7751R2D)			+= mach-r2d
> -machdir-$(CONFIG_SH_HIGHLANDER)			+= mach-highlander
>  machdir-$(CONFIG_SH_MIGOR)			+= mach-migor
> -machdir-$(CONFIG_SH_AP325RXA)			+= mach-ap325rxa
>  machdir-$(CONFIG_SH_KFR2R09)			+= mach-kfr2r09
>  machdir-$(CONFIG_SH_ECOVEC)			+= mach-ecovec24
> -machdir-$(CONFIG_SH_SDK7780)			+= mach-sdk7780
>  machdir-$(CONFIG_SH_SDK7786)			+= mach-sdk7786
>  machdir-$(CONFIG_SH_X3PROTO)			+= mach-x3proto
> -machdir-$(CONFIG_SH_SH7763RDP)			+= mach-sh7763rdp
> -machdir-$(CONFIG_SH_SH4202_MICRODEV)		+= mach-microdev
>  machdir-$(CONFIG_SH_LANDISK)			+= mach-landisk
> -machdir-$(CONFIG_SH_LBOX_RE2)			+= mach-lboxre2
> -machdir-$(CONFIG_SH_RSK)			+= mach-rsk
> -
> -ifneq ($(machdir-y),)
> -core-y	+= $(addprefix arch/sh/boards/, \
> -	     $(filter-out ., $(patsubst %,%/,$(machdir-y))))
> -endif
> -
> -# Common machine type headers. Not part of the arch/sh/boards/ hierarchy.
> -machdir-y	+= mach-common
> +machdir-y					+= mach-common
>  
>  # Companion chips
>  core-$(CONFIG_HD6446X_SERIES)	+= arch/sh/cchips/hd6446x/
> diff --git a/arch/sh/boards/Makefile b/arch/sh/boards/Makefile
> index 4002a22a7c40..b57219436ace 100644
> --- a/arch/sh/boards/Makefile
> +++ b/arch/sh/boards/Makefile
> @@ -18,3 +18,22 @@ obj-$(CONFIG_SH_APSH4A3A)	+= board-apsh4a3a.o
>  obj-$(CONFIG_SH_APSH4AD0A)	+= board-apsh4ad0a.o
>  
>  obj-$(CONFIG_SH_DEVICE_TREE)	+= of-generic.o
> +
> +obj-$(CONFIG_SOLUTION_ENGINE)	+= mach-se/
> +obj-$(CONFIG_SH_HP6XX)		+= mach-hp6xx/
> +obj-$(CONFIG_SH_DREAMCAST)	+= mach-dreamcast/
> +obj-$(CONFIG_SH_SH03)		+= mach-sh03/
> +obj-$(CONFIG_SH_RTS7751R2D)	+= mach-r2d/
> +obj-$(CONFIG_SH_HIGHLANDER)	+= mach-highlander/
> +obj-$(CONFIG_SH_MIGOR)		+= mach-migor/
> +obj-$(CONFIG_SH_AP325RXA)	+= mach-ap325rxa/
> +obj-$(CONFIG_SH_KFR2R09)	+= mach-kfr2r09/
> +obj-$(CONFIG_SH_ECOVEC)		+= mach-ecovec24/
> +obj-$(CONFIG_SH_SDK7780)	+= mach-sdk7780/
> +obj-$(CONFIG_SH_SDK7786)	+= mach-sdk7786/
> +obj-$(CONFIG_SH_X3PROTO)	+= mach-x3proto/
> +obj-$(CONFIG_SH_SH7763RDP)	+= mach-sh7763rdp/
> +obj-$(CONFIG_SH_SH4202_MICRODEV)+= mach-microdev/
> +obj-$(CONFIG_SH_LANDISK)	+= mach-landisk/
> +obj-$(CONFIG_SH_LBOX_RE2)	+= mach-lboxre2/
> +obj-$(CONFIG_SH_RSK)		+= mach-rsk/

Applied to my for-next tree for 6.5. PR will be sent tomorrow.

Thanks,
Adrian

-- 
 .''`.  John Paul Adrian Glaubitz
: :' :  Debian Developer
`. `'   Physicist
  `-    GPG: 62FF 8A75 84E0 2956 9546  0006 7426 3B37 F5B5 F913

^ permalink raw reply	[flat|nested] 18+ messages in thread

end of thread, other threads:[~2023-07-05 17:08 UTC | newest]

Thread overview: 18+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-02-19 14:15 [PATCH 1/4] sh: fix -Wmissing-include-dirs warnings for various platforms Masahiro Yamada
2023-02-19 14:15 ` [PATCH 2/4] sh: move build rule of cchips/hd6446x/ to arch/sh/Kbuild Masahiro Yamada
2023-02-19 17:05   ` Randy Dunlap
2023-07-04  5:28   ` John Paul Adrian Glaubitz
2023-02-19 14:15 ` [PATCH 3/4] sh: refactor header include path addition Masahiro Yamada
2023-02-19 17:05   ` Randy Dunlap
2023-07-04  5:29   ` John Paul Adrian Glaubitz
2023-02-19 14:15 ` [PATCH 4/4] sh: remove compiler flag duplication Masahiro Yamada
2023-02-19 17:05   ` Randy Dunlap
2023-07-04  5:32   ` John Paul Adrian Glaubitz
2023-02-19 14:40 ` [PATCH 1/4] sh: fix -Wmissing-include-dirs warnings for various platforms John Paul Adrian Glaubitz
2023-02-19 16:54   ` Masahiro Yamada
2023-06-25  7:56   ` Masahiro Yamada
2023-06-25  8:11     ` John Paul Adrian Glaubitz
2023-06-25 21:07     ` John Paul Adrian Glaubitz
2023-02-19 17:05 ` Randy Dunlap
2023-07-04  5:26 ` John Paul Adrian Glaubitz
2023-07-05 17:08 ` John Paul Adrian Glaubitz

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).