From patchwork Fri May 28 03:52:09 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Masahiro Yamada X-Patchwork-Id: 12286151 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-17.4 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,INCLUDES_CR_TRAILER,INCLUDES_PATCH,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS,USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 7AEB4C4707F for ; Fri, 28 May 2021 03:54:21 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 3FA106139A for ; Fri, 28 May 2021 03:54:21 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 3FA106139A Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=kernel.org Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:Message-Id:Date:Subject:Cc :To:From:Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To:References: List-Owner; bh=PNt/rpA99vIHafAqckqKfmV0LWg97nyCSH1PQxRcD/s=; b=kYm6NWwW9RqSFM tACo/IC3ILXLVsZ2Rzh+uiTBNWrCJFYqh60SMY1OESnf0eyAE9aRTRe/bXMhEtkgy701tsneSoRob aDAq4+1ENHSLz9W1eV42pTnl4e8mHG/MuTEqX0xO5VqZhuNWaHwU2sfmKoV4BTaG/mWstQwcjTlw2 YwdGu+uzemJOLA6zEO/ttxsTYiRcWs7CnBlppauNXFz7pjCiEUsKpCFJHKConWkmqIqG+gGmK27ki t7UnoloA/a7Yf1mm9917g8no+GE03VmmQqbjH88wMYkVovOzAvQQQj7f94UAR4e2ilaCYMjX6EUUl S9PLLkgHaQQzookNk62g==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1lmTYQ-00BiE1-2b; Fri, 28 May 2021 03:52:58 +0000 Received: from conuserg-07.nifty.com ([210.131.2.74]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1lmTYI-00BiAq-Tw for linux-arm-kernel@lists.infradead.org; Fri, 28 May 2021 03:52:55 +0000 Received: from localhost.localdomain (133-32-232-101.west.xps.vectant.ne.jp [133.32.232.101]) (authenticated) by conuserg-07.nifty.com with ESMTP id 14S3qBFA024800; Fri, 28 May 2021 12:52:11 +0900 DKIM-Filter: OpenDKIM Filter v2.10.3 conuserg-07.nifty.com 14S3qBFA024800 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nifty.com; s=dec2015msa; t=1622173932; bh=6KU0Trdq4K/2P2XIJXTR2lASBtxZgHuNXe5Ass8LYl0=; h=From:To:Cc:Subject:Date:From; b=JAJHkxp//xw4Wqbhb/9kqDKs2tLxQZ73tURX5+OKK3V53N63Bv03Ou3tEqihb1kTl WE4EpdMmWKXiOUvn5JP5w/xZEHXVcHAyZYKwMIvauG+jE9nHC6fzsuSRfAhc1oWngo zgQxvGIGngx5g2+buY/3JxtCp7FuLoIeksQNLG/B1zOb9S7+JE6JKtttIi4knbwwKA km1d/L0yR0sv+HZOrcFrbV0MTrj5vvZ64GucpuKqJWb6o4GwTPI+beUFDTma9SsngR QHbnFkXasYuqWqwgOGGYMvj0UaQqMAfcYWLMB6+z9k6sW/evR662edScTa0SpzbAPA J1bpONW2UPkfg== X-Nifty-SrcIP: [133.32.232.101] From: Masahiro Yamada To: patches@arm.linux.org.uk Cc: linux-kernel@vger.kernel.org, Masahiro Yamada , Linus Walleij , Russell King , linux-arm-kernel@lists.infradead.org Subject: [PATCH] ARM: simplify the build rule of mach-types.h Date: Fri, 28 May 2021 12:52:09 +0900 Message-Id: <20210528035209.2157823-1-masahiroy@kernel.org> X-Mailer: git-send-email 2.27.0 MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20210527_205251_209711_899376BA X-CRM114-Status: UNSURE ( 9.90 ) X-CRM114-Notice: Please train this message. X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org The directory of mach-types.h is created a couple of lines above: _dummy := $(shell [ -d '$(kapi)' ] || mkdir -p '$(kapi)') \ The 'mkdir -p' command is redundant. scripts/Kbuild.include defines real-prereqs as a shorthand for $(filter-out $(PHONY),$^). Let's use it to simplify the code. Signed-off-by: Masahiro Yamada Reviewed-by: Linus Walleij --- KernelVersion: v5.13-rc1 arch/arm/tools/Makefile | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/arch/arm/tools/Makefile b/arch/arm/tools/Makefile index 87de1f63f649..057639019059 100644 --- a/arch/arm/tools/Makefile +++ b/arch/arm/tools/Makefile @@ -33,8 +33,7 @@ _dummy := $(shell [ -d '$(kapi)' ] || mkdir -p '$(kapi)') \ $(shell [ -d '$(uapi)' ] || mkdir -p '$(uapi)') quiet_cmd_gen_mach = GEN $@ - cmd_gen_mach = mkdir -p $(dir $@) && \ - $(AWK) -f $(filter-out $(PHONY),$^) > $@ + cmd_gen_mach = $(AWK) -f $(real-prereqs) > $@ $(kapi)/mach-types.h: $(src)/gen-mach-types $(src)/mach-types FORCE $(call if_changed,gen_mach)