Received: by 2002:a25:31c3:0:0:0:0:0 with SMTP id x186csp168744ybx; Mon, 4 Nov 2019 17:59:20 -0800 (PST) X-Google-Smtp-Source: APXvYqzEyiCL46KRLdvHxDx+7bRvJIt5ba10aEBzwtdjcAvjRXGoHRVkQ4GkUnJIGHbaBPCywCgp X-Received: by 2002:aa7:dd9a:: with SMTP id g26mr10218592edv.85.1572919160772; Mon, 04 Nov 2019 17:59:20 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1572919160; cv=none; d=google.com; s=arc-20160816; b=m1/dW8oNPlxr48FFhSrtYQ7LtdA6DMZadbhEH+wDW7ry6IGk8Yxf0rC5A77cixPp9v JjVbEFJgpEGmOpzoR/ji5lPj29s/0mV2DN4q4Vo3mLmZ8udJoQb5IYRwnRanrXXHfsZl vzfNXEhDnsp8y+pz8Uj4ElJEf59MfXs0gH7EF8kpAxfFKNQLUf4Yu+Ix+zFKULMOhDra K3eNnZg16hIltVERf74dm1OGrlQFbRKH4BPcWCyo9cOGpFoH4a+MzYPkhpxFGhRWnbNr /pBCzDLXvnGTJbzFIEen4u29Ug/dpILanWV0MvM3sjkU6+e6gmLiAfurwXnlPb06VBQj EkXA== 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=wnNLKDcLbY3/yKFW6RfxoG2eNTucv+kYwn7VETE2Ss4=; b=TF2STe73azUDg1ZZC1+/GHPuwFa4e54kewf3o9/tYyLExiPuUb2Ckx3mj2j8E6oJGU BMda3cDvsmwM42wTPG3IXsymQHcOs+1Bt4ul6NOjRVgIy8yKruOH48LxsFXMQTg94L8X 28xVo9yKCQ54aWG8C6npax5nXmpnU6OEhkP74MOHh5NjG/fjE9sL2mNsAQrl9GFPwa88 meYy0Qu21oLJrA1kz3tl8dmigxg7dIu2IVHPD8o6v69YlkLWmYsXEgNTKtpE5Y+O/31K 0ZoAdvng/yaw9JhrLgQVNo42++s18xqm38NjC6/yIssd0k6IhJiUaTtTpvDHA8XVOpC/ vZlg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@nifty.com header.s=dec2015msa header.b=EGNHG3Gf; 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 d13si8584386edb.362.2019.11.04.17.58.57; Mon, 04 Nov 2019 17:59:20 -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=EGNHG3Gf; 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 S1729827AbfKEB5z (ORCPT + 99 others); Mon, 4 Nov 2019 20:57:55 -0500 Received: from conssluserg-05.nifty.com ([210.131.2.90]:25816 "EHLO conssluserg-05.nifty.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729597AbfKEB5z (ORCPT ); Mon, 4 Nov 2019 20:57:55 -0500 Received: from mail-vs1-f54.google.com (mail-vs1-f54.google.com [209.85.217.54]) (authenticated) by conssluserg-05.nifty.com with ESMTP id xA51ve2p032734; Tue, 5 Nov 2019 10:57:41 +0900 DKIM-Filter: OpenDKIM Filter v2.10.3 conssluserg-05.nifty.com xA51ve2p032734 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nifty.com; s=dec2015msa; t=1572919061; bh=wnNLKDcLbY3/yKFW6RfxoG2eNTucv+kYwn7VETE2Ss4=; h=References:In-Reply-To:From:Date:Subject:To:Cc:From; b=EGNHG3Gf56RamlIbWHuLeOWObCMMRhDJbFCPltyeSCQ/fp+jBIyW3Xg51a8GBioJZ g25/G6GhcdmEtPCM6HCU12tEGZsN2umDShfxqwkY736okcSEXatODaIJdZhMyBgKbC Q8Ybjy0U+nJUSnzkUebOZtlBXMQzDmOQgBi6uSRWk8xQMpjaVE76zinEzUox7rGa5/ Zepr/Ao266Co8YxuqDdssK9rByY9cenRyhQdK5ySrztrK9YjPt3ieoiwKcmsjAyt/L tSaIqgMHmLY36NOASFPaFv6NIKpxpNvE1AiZa0NGsdv2S0SevI1sZAlU+B47x8UMmB eJ4tklhr2l5zQ== X-Nifty-SrcIP: [209.85.217.54] Received: by mail-vs1-f54.google.com with SMTP id k15so12395176vsp.2; Mon, 04 Nov 2019 17:57:41 -0800 (PST) X-Gm-Message-State: APjAAAU/k64xMlPmMAVWUr7NVaz+38TsfaLt33IPhcOL23VelnntkwaL f13WelwN8Qt30Zl+CG7X205vHAHOXfo0usaQgNY= X-Received: by 2002:a67:2d08:: with SMTP id t8mr14547734vst.155.1572919059960; Mon, 04 Nov 2019 17:57:39 -0800 (PST) MIME-Version: 1.0 References: <20191101081148.23274-1-yamada.masahiro@socionext.com> <20191101081148.23274-3-yamada.masahiro@socionext.com> In-Reply-To: From: Masahiro Yamada Date: Tue, 5 Nov 2019 10:57:04 +0900 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [PATCH v2 2/3] ARM: decompressor: simplify libfdt builds To: Rob Herring Cc: DTML , Frank Rowand , "moderated list:ARM/FREESCALE IMX / MXC ARM ARCHITECTURE" , David Gibson , linuxppc-dev , Russell King , "linux-kernel@vger.kernel.org" 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 Tue, Nov 5, 2019 at 10:04 AM Rob Herring wrote: > > On Fri, Nov 1, 2019 at 3:12 AM Masahiro Yamada > wrote: > > > > Copying source files during the build time may not end up with > > as clean code as you expect. > > > > lib/fdt*.c simply wrap scripts/dtc/libfdt/fdt*.c, and it works > > nicely. Let's follow that approach for the arm decompressor, too. > > > > Add four wrappers, arch/arm/boot/compressed/fdt*.c and remove the > > Makefile messes. > > > > Another nice thing is we no longer need to maintain the separate > > libfdt_env.h since we can include , and the > > diff stat also looks nice. > > > > Signed-off-by: Masahiro Yamada > > --- > > > > Changes in v2: None > > > > arch/arm/boot/compressed/.gitignore | 9 ------- > > arch/arm/boot/compressed/Makefile | 33 +++++++------------------ > > arch/arm/boot/compressed/atags_to_fdt.c | 1 + > > arch/arm/boot/compressed/fdt.c | 2 ++ > > arch/arm/boot/compressed/fdt_ro.c | 2 ++ > > arch/arm/boot/compressed/fdt_rw.c | 2 ++ > > arch/arm/boot/compressed/fdt_wip.c | 2 ++ > > arch/arm/boot/compressed/libfdt_env.h | 22 ----------------- > > 8 files changed, 18 insertions(+), 55 deletions(-) > > create mode 100644 arch/arm/boot/compressed/fdt.c > > create mode 100644 arch/arm/boot/compressed/fdt_ro.c > > create mode 100644 arch/arm/boot/compressed/fdt_rw.c > > create mode 100644 arch/arm/boot/compressed/fdt_wip.c > > delete mode 100644 arch/arm/boot/compressed/libfdt_env.h > > Looks fine to me other than my question on licensing on patch 1. > > Who did you want to take the series? I can take it with Russell's ack. Rob, I'd like you to take the whole of this patch set if there is no objection. Russell, Is this patch OK with you? > > > > -$(addprefix $(obj)/,$(libfdt_objs) atags_to_fdt.o): \ > > - $(addprefix $(obj)/,$(libfdt_hdrs)) > > +OBJS += $(libfdt_objs) > > Seems like this file could benefit from doing 'OBJS-$(CONFIG_*)' style > variables. I agree, but this kind of refactoring is not the main interest of this series. It should be done by a separate patch if it is desired. > > diff --git a/arch/arm/boot/compressed/fdt.c b/arch/arm/boot/compressed/fdt.c > > new file mode 100644 > > index 000000000000..f8ea7a201ab1 > > --- /dev/null > > +++ b/arch/arm/boot/compressed/fdt.c > > @@ -0,0 +1,2 @@ > > +// SPDX-License-Identifier: GPL-2.0-only > > +#include "../../../../lib/fdt.c" > > diff --git a/arch/arm/boot/compressed/fdt_ro.c b/arch/arm/boot/compressed/fdt_ro.c > > new file mode 100644 > > index 000000000000..93970a4ad5ae > > --- /dev/null > > +++ b/arch/arm/boot/compressed/fdt_ro.c > > @@ -0,0 +1,2 @@ > > +// SPDX-License-Identifier: GPL-2.0-only > > +#include "../../../../lib/fdt_ro.c" > > diff --git a/arch/arm/boot/compressed/fdt_rw.c b/arch/arm/boot/compressed/fdt_rw.c > > new file mode 100644 > > index 000000000000..f7c6b8b7e01c > > --- /dev/null > > +++ b/arch/arm/boot/compressed/fdt_rw.c > > @@ -0,0 +1,2 @@ > > +// SPDX-License-Identifier: GPL-2.0-only > > +#include "../../../../lib/fdt_rw.c" > > diff --git a/arch/arm/boot/compressed/fdt_wip.c b/arch/arm/boot/compressed/fdt_wip.c > > new file mode 100644 > > index 000000000000..048d2c7a088d > > --- /dev/null > > +++ b/arch/arm/boot/compressed/fdt_wip.c > > @@ -0,0 +1,2 @@ > > +// SPDX-License-Identifier: GPL-2.0-only > > +#include "../../../../lib/fdt_wip.c" I gave GPL-2.0-only to this, but it should be the same as lib/fdt*.c, which is now being discussed in 1/3. -- Best Regards Masahiro Yamada