From patchwork Sun Feb 19 14:15:52 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Masahiro Yamada X-Patchwork-Id: 13145888 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id CBD42C61DA4 for ; Sun, 19 Feb 2023 14:16:28 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230061AbjBSOQ2 (ORCPT ); Sun, 19 Feb 2023 09:16:28 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:57866 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229781AbjBSOQX (ORCPT ); Sun, 19 Feb 2023 09:16:23 -0500 Received: from ams.source.kernel.org (ams.source.kernel.org [IPv6:2604:1380:4601:e00::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 6EF46E3AB; Sun, 19 Feb 2023 06:16:21 -0800 (PST) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ams.source.kernel.org (Postfix) with ESMTPS id 039E9B803F1; Sun, 19 Feb 2023 14:16:20 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id A6BB0C433D2; Sun, 19 Feb 2023 14:16:16 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1676816178; bh=mHhx5AehWJHYHcZ1xrAE18qXym1Yn6rcKDqM/8buz3s=; h=From:To:Cc:Subject:Date:From; b=INJl1Ttznv53s+8dfVHbD/3/M04BQRCYsZJx2Z8t9jg/AeBgQmESXbqcjd9IHzgWa cyJCzC6EKBCjfd8sg/o/mbStbqiWsnPnzDjISXS/QjsbmKEEA7maMxciJz9vNNllOh 4nDD6KbEnzlkQZs3yHJCsd+4w3KBSRQi2Tur9/OZRCMMBINM/yszSzDKu8WxD/JPHL AwBzaothdRzBtp4L1z+c05AGRkcZov6qO9lBOtGiWlRu6ecaK+GYZOCcu/UJLbRdCa 1rOb7VmEBZppNkEw/asfs80tqL0+vx2BC7LgmVTMycVYUu3dty9JMjV2+KG8FlE/Vg /7rLomjyjzVQA== From: Masahiro Yamada To: linux-kbuild@vger.kernel.org Cc: linux-kernel@vger.kernel.org, Randy Dunlap , Masahiro Yamada , kernel test robot , Rich Felker , Yoshinori Sato , linux-sh@vger.kernel.org Subject: [PATCH 1/4] sh: fix -Wmissing-include-dirs warnings for various platforms Date: Sun, 19 Feb 2023 23:15:52 +0900 Message-Id: <20230219141555.2308306-1-masahiroy@kernel.org> X-Mailer: git-send-email 2.34.1 MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-kbuild@vger.kernel.org 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 Link: https://lore.kernel.org/oe-kbuild-all/202302190641.30VVXnPb-lkp@intel.com/ Signed-off-by: Masahiro Yamada Acked-by: Randy Dunlap Tested-by: Randy Dunlap Reviewed-by: John Paul Adrian Glaubitz --- 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/ From patchwork Sun Feb 19 14:15:53 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Masahiro Yamada X-Patchwork-Id: 13145887 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 8DD17C05027 for ; Sun, 19 Feb 2023 14:16:28 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229613AbjBSOQ1 (ORCPT ); Sun, 19 Feb 2023 09:16:27 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:57868 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229839AbjBSOQX (ORCPT ); Sun, 19 Feb 2023 09:16:23 -0500 Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id A6EC4E3BF; Sun, 19 Feb 2023 06:16:21 -0800 (PST) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id 3D7EF60C1E; Sun, 19 Feb 2023 14:16:21 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id E6175C4339B; Sun, 19 Feb 2023 14:16:18 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1676816180; bh=BqvNL4z/UoB9dOUirlrYrge5KkBaM56X6vW7byxa1NQ=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=Eh9g1i6ltIJaKeZXIFwrhYBOVzbBH+s9K5nOu/rEnBU6ihKJpvfiFj6jd0oqV/kGi tdgKxBc2d2ui0a/g1q4xXzE8rv9wHdHHl5czwzztpttn+3DxDErdE3oCkW5c2UbIyz 89Fk+OZkAqGZZovU6ZGPe+bvLq0wD0ltzBfj8meuiiV1nm2LX+uNSB1kzEQaz2jPp6 aCapvZnrsli7QqfgivSeLm73M6gH3N7x46ctYe3rRceiAZWoIcTWqjpQ4ht42RlapX /ERBCENd2fvXn/kD1Uyn9cfl9AKqLm1Tckwp0WZA3uzOo5oNVZ9Yg4DvxTsLCRXFnA 1oTtxU+hTTEWg== From: Masahiro Yamada To: linux-kbuild@vger.kernel.org Cc: linux-kernel@vger.kernel.org, Randy Dunlap , Masahiro Yamada , Rich Felker , Yoshinori Sato , linux-sh@vger.kernel.org Subject: [PATCH 2/4] sh: move build rule of cchips/hd6446x/ to arch/sh/Kbuild Date: Sun, 19 Feb 2023 23:15:53 +0900 Message-Id: <20230219141555.2308306-2-masahiroy@kernel.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20230219141555.2308306-1-masahiroy@kernel.org> References: <20230219141555.2308306-1-masahiroy@kernel.org> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-kbuild@vger.kernel.org This is the last user of core-y in ARCH=sh. Use the standard obj-y syntax. Signed-off-by: Masahiro Yamada Acked-by: Randy Dunlap Tested-by: Randy Dunlap Reviewed-by: John Paul Adrian Glaubitz --- 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 # From patchwork Sun Feb 19 14:15:54 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Masahiro Yamada X-Patchwork-Id: 13145889 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 8DBCFC64ED9 for ; Sun, 19 Feb 2023 14:16:29 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230072AbjBSOQ2 (ORCPT ); Sun, 19 Feb 2023 09:16:28 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:57874 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229851AbjBSOQ1 (ORCPT ); Sun, 19 Feb 2023 09:16:27 -0500 Received: from sin.source.kernel.org (sin.source.kernel.org [IPv6:2604:1380:40e1:4800::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 54C08E3AB; Sun, 19 Feb 2023 06:16:26 -0800 (PST) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by sin.source.kernel.org (Postfix) with ESMTPS id 4A6B0CE0A2C; Sun, 19 Feb 2023 14:16:24 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 17897C433EF; Sun, 19 Feb 2023 14:16:20 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1676816182; bh=iWMd5wrtVPvc8Hq0qKNuEJ6Iz+dFfZvSN+y/ZKP5/jQ=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=kLPmV5URKbngJEMO+9f5JJ5r541PYQUP0VC4agmu5KYvgdSnc6LS8gXbOGGm6F3Vn 4mD3iv77Xu9j4KGsOecwUOYhoKKHfAzL9KBmiMsMfpLll9exf9eFX6uf0k1mnoA6Fp pTD2ZbfwnRPiwYl9ISPXfVa/WwFEV1CpErcfXhjH1mytDiMlV2TrQHee4QFiBmphOM 4oMObvwqWaI/JIbfSX37bMEmqTr4aQMP+r3XZvyDdXvcjteIaASNr1FsR1wtCixAC9 A14tWryoGRceMmOB8b5cPjlLX8w9kJ6sGr67sQgfWJhB4pY7MzRI/i47EtFKwIDb8F yq6MAuLkpiNlg== From: Masahiro Yamada To: linux-kbuild@vger.kernel.org Cc: linux-kernel@vger.kernel.org, Randy Dunlap , Masahiro Yamada , Rich Felker , Yoshinori Sato , linux-sh@vger.kernel.org Subject: [PATCH 3/4] sh: refactor header include path addition Date: Sun, 19 Feb 2023 23:15:54 +0900 Message-Id: <20230219141555.2308306-3-masahiroy@kernel.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20230219141555.2308306-1-masahiroy@kernel.org> References: <20230219141555.2308306-1-masahiroy@kernel.org> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-kbuild@vger.kernel.org Shorten the code. No functional change intended. Signed-off-by: Masahiro Yamada Acked-by: Randy Dunlap Tested-by: Randy Dunlap Reviewed-by: John Paul Adrian Glaubitz --- 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) From patchwork Sun Feb 19 14:15:55 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Masahiro Yamada X-Patchwork-Id: 13145890 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 5D61DC677F1 for ; Sun, 19 Feb 2023 14:16:30 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230081AbjBSOQ3 (ORCPT ); Sun, 19 Feb 2023 09:16:29 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:57880 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230071AbjBSOQ2 (ORCPT ); Sun, 19 Feb 2023 09:16:28 -0500 Received: from ams.source.kernel.org (ams.source.kernel.org [145.40.68.75]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id A76F8E3AB; Sun, 19 Feb 2023 06:16:27 -0800 (PST) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ams.source.kernel.org (Postfix) with ESMTPS id 1AA47B808BC; Sun, 19 Feb 2023 14:16:26 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 09A25C4339B; Sun, 19 Feb 2023 14:16:22 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1676816184; bh=OnHesLJjuM4ndL0bx3IO8J099WVFzKW7b0gcW6zf1HY=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=a6MPY1We5Gq+eXc22qp3LVBeZjtQ1Z9K4zYmKOTvBgVXpowHgmidtMRl1lnjX+aHe cSwsOa/qSSgrAzai3J6hOjqO7LeJjSxQ6oT/URE6opE63Aff3BmdfC0ENb9J1rixzT PHWkYFqeV33fWe0ka3FmpdvF7j8kHwzG01HzNZDrJ0a5ednegxyLc/GpMafMluz80x g7dyQAGoHWthtQ+b7M6pDjzdEW/ekzY0vhkK6vtGsxwjILKNnG99lWS/fFhh9QUdkS cgES0y3+Bqv99Lk08ydycZp0whkYF4a4j6ajTrlIgfmiR8l/llkW/wifvURuSel9WM Kkj0Z+DaVdGqA== From: Masahiro Yamada To: linux-kbuild@vger.kernel.org Cc: linux-kernel@vger.kernel.org, Randy Dunlap , Masahiro Yamada , Rich Felker , Yoshinori Sato , linux-sh@vger.kernel.org Subject: [PATCH 4/4] sh: remove compiler flag duplication Date: Sun, 19 Feb 2023 23:15:55 +0900 Message-Id: <20230219141555.2308306-4-masahiroy@kernel.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20230219141555.2308306-1-masahiroy@kernel.org> References: <20230219141555.2308306-1-masahiroy@kernel.org> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-kbuild@vger.kernel.org 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 Acked-by: Randy Dunlap Tested-by: Randy Dunlap Reviewed-by: John Paul Adrian Glaubitz --- 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)