From patchwork Wed Jul 25 05:16:11 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Masahiro Yamada X-Patchwork-Id: 949020 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=none (mailfrom) smtp.mailfrom=lists.infradead.org (client-ip=2607:7c80:54:e::133; helo=bombadil.infradead.org; envelope-from=linux-um-bounces+incoming=patchwork.ozlabs.org@lists.infradead.org; receiver=) Authentication-Results: ozlabs.org; dmarc=none (p=none dis=none) header.from=socionext.com Authentication-Results: ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="RnuNC094"; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=nifty.com header.i=@nifty.com header.b="zF8CJD0o"; dkim-atps=neutral Received: from bombadil.infradead.org (bombadil.infradead.org [IPv6:2607:7c80:54:e::133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 41b3QP1SVTz9s0R for ; Wed, 25 Jul 2018 15:17:49 +1000 (AEST) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:MIME-Version:Cc:List-Subscribe: List-Help:List-Post:List-Archive:List-Unsubscribe:List-Id:References: In-Reply-To:Message-Id:Date:Subject:To:From:Reply-To:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:List-Owner; bh=vB+zS5+qGN/ktzxrxROvuoEfZv+WIhd+ZMLsl8Ul7VU=; b=RnuNC0943MXaBTizAFcnTwG1rp ZfDnPR0lPOMxDneZyKWVzGZCHuPA4lHIbHSE7hjOrpIzfbJnqVUxh/JP9BLVwcJXKCAKTXgrVN/xk 8jZGd85GKrv4ivfYFhVAVtmSNIvAP7AvQ2I1QYWJ5NCK+c44fj48MclNxzEesPR4NbSDehu0Y0fbX zqzbQAdkmAcePMMrpcUPA8fL9DunR31wtX8uG+8Yg0uZfdeRMvyz3OnCE7MLmvzYZBbecl7J18iaR hGTtk6v870M1FiJVRgLNATL8FutMoXhb+Yq7hM+smVHXdMrZDXV676bSRpqu0jQRAbw1NltAYPp7Y 5RlXhETQ==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.90_1 #2 (Red Hat Linux)) id 1fiCBA-0006tV-7r; Wed, 25 Jul 2018 05:17:40 +0000 Received: from conuserg-08.nifty.com ([210.131.2.75]) by bombadil.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1fiCAv-0006gZ-CD for linux-um@lists.infradead.org; Wed, 25 Jul 2018 05:17:27 +0000 Received: from pug.e01.socionext.com (p14092-ipngnfx01kyoto.kyoto.ocn.ne.jp [153.142.97.92]) (authenticated) by conuserg-08.nifty.com with ESMTP id w6P5Gs8I018750; Wed, 25 Jul 2018 14:16:55 +0900 DKIM-Filter: OpenDKIM Filter v2.10.3 conuserg-08.nifty.com w6P5Gs8I018750 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nifty.com; s=dec2015msa; t=1532495816; bh=s8GyG+1gOk1oIIEW6Ve60Hw/YCvJwi+om/gh+CBcOWc=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=zF8CJD0o5DRHJoSUgoL6FnAUaW5sBhK8lEnXpEVCCkmX5fabkJ/qJr9l6gCiZx9q6 u0htOgo1C91rWuICrSZd3uUlo55C80CpfZD+2paRZMW41rREjjHFlvGElX1tcbhBY+ 9RbDszAX2AVKTiT+Enep6tNga0SYhdgLh1p6SIt5tYhDi4dCplHhZZxJs4wmWMeUsj if4wETihFKNexwy5TdcAM+V9YmzVglt5ZrFPBBmppsMOSeSG36Enx/JyXMpFealmgl 4iJr54BOCu68l9jBpjOb+VnB9zbahWh3scdLEe5op2X2m5Cz/iZ/qMPjWmMGqX/xHy +HelxWXRk/wWw== X-Nifty-SrcIP: [153.142.97.92] From: Masahiro Yamada To: linux-kbuild@vger.kernel.org Subject: [PATCH 2/2] kbuild: do not redirect the first prerequisite for filechk Date: Wed, 25 Jul 2018 14:16:11 +0900 Message-Id: <1532495771-10255-2-git-send-email-yamada.masahiro@socionext.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1532495771-10255-1-git-send-email-yamada.masahiro@socionext.com> References: <1532495771-10255-1-git-send-email-yamada.masahiro@socionext.com> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20180724_221725_747042_ABCF0F24 X-CRM114-Status: UNSURE ( 8.81 ) X-CRM114-Notice: Please train this message. X-Spam-Score: 1.0 (+) X-Spam-Report: SpamAssassin version 3.4.1 on bombadil.infradead.org summary: Content analysis details: (1.0 points) pts rule name description ---- ---------------------- -------------------------------------------------- -0.0 RCVD_IN_DNSWL_NONE RBL: Sender listed at http://www.dnswl.org/, no trust [210.131.2.75 listed in list.dnswl.org] 1.0 SPF_SOFTFAIL SPF: sender does not match SPF record (softfail) -0.1 DKIM_VALID Message has at least one valid DKIM or DK signature 0.1 DKIM_SIGNED Message has a DKIM or DK signature, not necessarily valid X-BeenThere: linux-um@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: linux-s390@vger.kernel.org, Michal Marek , Heiko Carstens , Jeff Dike , linux-um@lists.infradead.org, linux-kernel@vger.kernel.org, Masahiro Yamada , Hendrik Brueckner , Richard Weinberger , Martin Schwidefsky , Sam Ravnborg MIME-Version: 1.0 Sender: "linux-um" Errors-To: linux-um-bounces+incoming=patchwork.ozlabs.org@lists.infradead.org Currently, filechk unconditionally opens the first prerequisite and redirects it as the stdin of a filechk_* rule. Hence, every target using $(call filechk,...) must list something as the first prerequisite even if it is unneeded. '< $<' is actually unneeded in most cases. Each rule can explicitly adds it if necessary. Signed-off-by: Masahiro Yamada --- Makefile | 2 +- arch/s390/kernel/syscalls/Makefile | 6 +++--- arch/um/Makefile | 2 +- scripts/Kbuild.include | 2 +- scripts/Makefile.lib | 2 +- 5 files changed, 7 insertions(+), 7 deletions(-) diff --git a/Makefile b/Makefile index 67d9d20..af863f1 100644 --- a/Makefile +++ b/Makefile @@ -1116,7 +1116,7 @@ define filechk_version.h echo '#define KERNEL_VERSION(a,b,c) (((a) << 16) + ((b) << 8) + (c))';) endef -$(version_h): $(srctree)/Makefile FORCE +$(version_h): FORCE $(call filechk,version.h) $(Q)rm -f $(old_version_h) diff --git a/arch/s390/kernel/syscalls/Makefile b/arch/s390/kernel/syscalls/Makefile index 8ff96c0..4d929ed 100644 --- a/arch/s390/kernel/syscalls/Makefile +++ b/arch/s390/kernel/syscalls/Makefile @@ -25,15 +25,15 @@ _dummy := $(shell [ -d '$(uapi)' ] || mkdir -p '$(uapi)') \ $(shell [ -d '$(kapi)' ] || mkdir -p '$(kapi)') define filechk_syshdr - $(CONFIG_SHELL) '$(systbl)' -H -a $(syshdr_abi_$(basetarget)) -f "$2" + $(CONFIG_SHELL) '$(systbl)' -H -a $(syshdr_abi_$(basetarget)) -f "$2" < $< endef define filechk_sysnr - $(CONFIG_SHELL) '$(systbl)' -N -a $(sysnr_abi_$(basetarget)) + $(CONFIG_SHELL) '$(systbl)' -N -a $(sysnr_abi_$(basetarget)) < $< endef define filechk_syscalls - $(CONFIG_SHELL) '$(systbl)' -S + $(CONFIG_SHELL) '$(systbl)' -S < $< endef syshdr_abi_unistd_32 := common,32 diff --git a/arch/um/Makefile b/arch/um/Makefile index e54dda8..8c35261 100644 --- a/arch/um/Makefile +++ b/arch/um/Makefile @@ -169,7 +169,7 @@ define filechk_gen-asm-offsets echo " *"; \ echo " */"; \ echo ""; \ - sed -ne "/^->/{s:^->\([^ ]*\) [\$$#]*\([^ ]*\) \(.*\):#define \1 \2 /* \3 */:; s:->::; p;}"; \ + sed -ne "/^->/{s:^->\([^ ]*\) [\$$#]*\([^ ]*\) \(.*\):#define \1 \2 /* \3 */:; s:->::; p;}" < $<; \ echo ""; ) endef diff --git a/scripts/Kbuild.include b/scripts/Kbuild.include index 86321f0..0bee89c 100644 --- a/scripts/Kbuild.include +++ b/scripts/Kbuild.include @@ -56,7 +56,7 @@ kecho := $($(quiet)kecho) define filechk $(Q)set -e; \ mkdir -p $(dir $@); \ - $(filechk_$(1)) < $< > $@.tmp; \ + $(filechk_$(1)) > $@.tmp; \ if [ -r $@ ] && cmp -s $@ $@.tmp; then \ rm -f $@.tmp; \ else \ diff --git a/scripts/Makefile.lib b/scripts/Makefile.lib index 1bb594f..4b2f89f 100644 --- a/scripts/Makefile.lib +++ b/scripts/Makefile.lib @@ -416,7 +416,7 @@ define filechk_offsets echo " * This file was generated by Kbuild"; \ echo " */"; \ echo ""; \ - sed -ne $(sed-offsets); \ + sed -ne $(sed-offsets) < $<; \ echo ""; \ echo "#endif" ) endef