diff mbox series

[3/4] sh: refactor header include path addition

Message ID 20230219141555.2308306-3-masahiroy@kernel.org (mailing list archive)
State New, archived
Headers show
Series [1/4] sh: fix -Wmissing-include-dirs warnings for various platforms | expand

Commit Message

Masahiro Yamada Feb. 19, 2023, 2:15 p.m. UTC
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(-)

Comments

Randy Dunlap Feb. 19, 2023, 5:05 p.m. UTC | #1
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)
John Paul Adrian Glaubitz July 4, 2023, 5:29 a.m. UTC | #2
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>
diff mbox series

Patch

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)