Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp1558436imu; Wed, 23 Jan 2019 20:30:50 -0800 (PST) X-Google-Smtp-Source: ALg8bN44XMJktuVJJUjSlEEbt1c0SVMtj5hCEiXt8HeJuBAhtgDC0zZHwccCHau3O5b7JRyFfgvY X-Received: by 2002:a63:8c0d:: with SMTP id m13mr4604864pgd.422.1548304250440; Wed, 23 Jan 2019 20:30:50 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1548304250; cv=none; d=google.com; s=arc-20160816; b=UE+J9W3fyos5SnsakhggORa33BqkCXoylM/DK70h3csdIn2bn7QB+oTzX3WBGW8zgp C82zQ4Pcn7Pw0Kv0IWOonAJON1rUL9BDEJ39We8k9G/bpAIBb5dwO0pfDs5EOzKCdLP6 jzCpQEmj/DWQUc3snp85an7JQqn+hTtKAP5AApvqnySwsle7aK2EebB7l9rXT36NrUDZ XF9aGS3jSkWivCHSX5h6huC6JsV0iynx5tn7SsCVEBhBTLhLKcDbdBoosoY4ZISqz9D2 raGqHSgmiCdqN05iR6yVt2GhgrVrjqdBV+AmfRw3KNQcjsmFk2Qtfgag+DMFCLilKybH 8pqA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:dkim-signature:dkim-filter; bh=WBMO0N7O44VpX5ttR2NArBNAx1FCiRWJE1QnCFcqW3k=; b=g61lyli0Bf4F72I3aH0VPtoDhPy8aubBzM4OJbeZnwB8Wf2Wv/YUhqfcRdGJN7l1hn KrFomWVHNUI1DKjrXIAfAkq/AqjBMxTRdB3Aj4A+VSBJIW7bMflsaY/s1mspgOq+d+He IdeJ+/lCGPBbW/3p0/Fvd0LxQrHA9lSKvGYT4/vMhQbnJ9CwwBY1ZCUiSvc1DsQ4cEod QXUSkIOcoJUF4rYeM44oRfC1HsXkHE3aJ2a2RxeSRi4HJSNHNFYYDGDcbjd4i6JXBLr2 seCgrkBRAD5CHj0tC58WSLT4wUJFbmxTOFTp9FrAFqq8iWM12PUulGmtYRxJ8DOgJl+i D9EQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@nifty.com header.s=dec2015msa header.b=TOt2kaH3; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id d11si21787111pla.335.2019.01.23.20.30.35; Wed, 23 Jan 2019 20:30:50 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@nifty.com header.s=dec2015msa header.b=TOt2kaH3; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727309AbfAXE2s (ORCPT + 99 others); Wed, 23 Jan 2019 23:28:48 -0500 Received: from conssluserg-03.nifty.com ([210.131.2.82]:64731 "EHLO conssluserg-03.nifty.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726249AbfAXE2s (ORCPT ); Wed, 23 Jan 2019 23:28:48 -0500 Received: from mail-vs1-f44.google.com (mail-vs1-f44.google.com [209.85.217.44]) (authenticated) by conssluserg-03.nifty.com with ESMTP id x0O4SVZJ011188; Thu, 24 Jan 2019 13:28:31 +0900 DKIM-Filter: OpenDKIM Filter v2.10.3 conssluserg-03.nifty.com x0O4SVZJ011188 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nifty.com; s=dec2015msa; t=1548304111; bh=WBMO0N7O44VpX5ttR2NArBNAx1FCiRWJE1QnCFcqW3k=; h=References:In-Reply-To:From:Date:Subject:To:Cc:From; b=TOt2kaH3N6lPrN8EsS3H6zutwsCW52uWX/5yHsdGPEuSOoyM96IE/iZtBD40wtK1+ bPu8yDgnMBpkSe0oVwSrgNIvqzeIAVJ3f7dVCg9RRss2X9zsTW+DNlZ/QHr7+fJdNj 7JU60gDORikvtqfEd0N2tJtSqqvggxFMAsNX9Zs22gXWCMDfSehq8AqmizIZ/0exTH k3kccofm0wltfVArngJXcIHovSyuBHCFGL2JWqVq5XUJqqcaoPsdrQSvPOEMuebAwv 4bqZX+XspJFtoSxqwZV+5cQ6eITGLAgevnRqNV0r2wmkCgercnzivTHNvnBMMj121r ycuUnuNtWo3Dg== X-Nifty-SrcIP: [209.85.217.44] Received: by mail-vs1-f44.google.com with SMTP id b74so2740169vsd.9; Wed, 23 Jan 2019 20:28:31 -0800 (PST) X-Gm-Message-State: AJcUukcaVw2jFppLuR9D7t1yQHMd8P7Hz06AF7EULqRqxnmFg4lWBJDT PnWcZLy2gTFb4NXPYSTT/bEuaaYVr2HRljlTrKQ= X-Received: by 2002:a67:485:: with SMTP id 127mr2148288vse.54.1548304110425; Wed, 23 Jan 2019 20:28:30 -0800 (PST) MIME-Version: 1.0 References: <1547719364-18849-1-git-send-email-yamada.masahiro@socionext.com> In-Reply-To: <1547719364-18849-1-git-send-email-yamada.masahiro@socionext.com> From: Masahiro Yamada Date: Thu, 24 Jan 2019 13:27:54 +0900 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [PATCH v2 1/4] kbuild: simplify rules of data compression with size appending To: Linux Kbuild mailing list Cc: Martin Schwidefsky , linux-s390 , Michal Marek , Linux Kernel Mailing List Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, Jan 17, 2019 at 7:03 PM Masahiro Yamada wrote: > > All the callers of size_append pass $(filter-out FORCE,$^). > Move $(filter-out FORCE,$^) to the definition of size_append. > > This makes the callers cleaner because $(call ...) is unneeded > for a macro with no argument. > > Signed-off-by: Masahiro Yamada > --- Series, applied to linux-kbuild. > Changes in v2: None > > scripts/Makefile.lib | 18 +++++++----------- > 1 file changed, 7 insertions(+), 11 deletions(-) > > diff --git a/scripts/Makefile.lib b/scripts/Makefile.lib > index ecad15b..ebaa348 100644 > --- a/scripts/Makefile.lib > +++ b/scripts/Makefile.lib > @@ -321,7 +321,7 @@ dtc-tmp = $(subst $(comma),_,$(dot-target).dts.tmp) > # append the size as a 32-bit littleendian number as gzip does. > size_append = printf $(shell \ > dec_size=0; \ > -for F in $1; do \ > +for F in $(filter-out FORCE,$^); do \ > fsize=$$($(CONFIG_SHELL) $(srctree)/scripts/file-size.sh $$F); \ > dec_size=$$(expr $$dec_size + $$fsize); \ > done; \ > @@ -335,23 +335,20 @@ printf "%08x\n" $$dec_size | \ > ) > > quiet_cmd_bzip2 = BZIP2 $@ > -cmd_bzip2 = (cat $(filter-out FORCE,$^) | \ > - bzip2 -9 && $(call size_append, $(filter-out FORCE,$^))) > $@ > + cmd_bzip2 = (cat $(filter-out FORCE,$^) | bzip2 -9 && $(size_append)) > $@ > > # Lzma > # --------------------------------------------------------------------------- > > quiet_cmd_lzma = LZMA $@ > -cmd_lzma = (cat $(filter-out FORCE,$^) | \ > - lzma -9 && $(call size_append, $(filter-out FORCE,$^))) > $@ > + cmd_lzma = (cat $(filter-out FORCE,$^) | lzma -9 && $(size_append)) > $@ > > quiet_cmd_lzo = LZO $@ > -cmd_lzo = (cat $(filter-out FORCE,$^) | \ > - lzop -9 && $(call size_append, $(filter-out FORCE,$^))) > $@ > + cmd_lzo = (cat $(filter-out FORCE,$^) | lzop -9 && $(size_append)) > $@ > > quiet_cmd_lz4 = LZ4 $@ > -cmd_lz4 = (cat $(filter-out FORCE,$^) | \ > - lz4c -l -c1 stdin stdout && $(call size_append, $(filter-out FORCE,$^))) > $@ > + cmd_lz4 = (cat $(filter-out FORCE,$^) | lz4c -l -c1 stdin stdout && \ > + $(size_append)) > $@ > > # U-Boot mkimage > # --------------------------------------------------------------------------- > @@ -394,8 +391,7 @@ quiet_cmd_uimage = UIMAGE $@ > # decompression mode. A BCJ filter isn't used either. > quiet_cmd_xzkern = XZKERN $@ > cmd_xzkern = (cat $(filter-out FORCE,$^) | \ > - sh $(srctree)/scripts/xz_wrap.sh && \ > - $(call size_append, $(filter-out FORCE,$^))) > $@ > + sh $(srctree)/scripts/xz_wrap.sh && $(size_append)) > $@ > > quiet_cmd_xzmisc = XZMISC $@ > cmd_xzmisc = (cat $(filter-out FORCE,$^) | \ > -- > 2.7.4 > -- Best Regards Masahiro Yamada