Received: by 2002:a25:d7c1:0:0:0:0:0 with SMTP id o184csp4238612ybg; Tue, 29 Oct 2019 04:18:59 -0700 (PDT) X-Google-Smtp-Source: APXvYqyTYpPzHKVn52J2tYjAQnki4qrWNVHLevaov4MdM05+EMU+7e2NmE4QmAVjPrNbX4LGrVut X-Received: by 2002:a17:906:488c:: with SMTP id v12mr2656384ejq.290.1572347939396; Tue, 29 Oct 2019 04:18:59 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1572347939; cv=none; d=google.com; s=arc-20160816; b=pDPvfvhm7UjCoacFdeOYrt9820PRAWm/ZEggOu10+nSoxTwkindI/ZFRIki4L8gnw4 OeSf01qMpEdUIwMGRMz4m7hQa5RSWVDyWkLEqKMHOw2lf6mLAJgNvlPCLezMg3VVfQtm GEF8qnx5ph5TTvwGGDOcqulQ1aLXzOrVa0BN/naIZxgEN1276YurK2mKAQJ4Z6kEftL5 K5wwLA6Jp0zgv/WJM5deg75136dYBO5LSh1YszvEsqHr+RQUvPcHyw1zJuqw02XzzSeQ M10K4hx0ptOhcX0wj/TKRVaZdR8vb78MdB7GfZkfUDAHqXZVglu4OOekBzSlzuPbHFhN 5EXw== 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=ABgtHQoYN+OnWaETIQoMwES94nPToZvZJ0rO3T4xCq0=; b=Kc9/CgHP6zjfmg2qxRCDbcAhUEWLWjaS77VQw4vkYp8ncQqjFROax9stasSF0ZoXwN LYK5MkxxpLaBRc1vKDIuLbYb21qhOMb2IT4/UyXcJVwkeEQv2gDzcUtfKO3QRjFvjWxy +JAMuhszSAABQfeNvHlos+XnRANCqsNefWcu6eI2eTX/p7fB1s1lH8iTH7UlnUfCvUpU qcdLeMsonjjHeTlwo3p/nOSwhth6ZQ2mRrAr8Kqy7zcpd4O6L6PfkWRGJjctcUGfdqcn t+cbXmxuXtUaZzvFCPr9Or6EY2XS9Fxhr/aU5pPfQ+uA22AhJJ62N6fJLr4f+xCM4UPL gB2Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@nifty.com header.s=dec2015msa header.b=0ZK1Ea1H; 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 e1si8173023ejf.28.2019.10.29.04.18.35; Tue, 29 Oct 2019 04:18:59 -0700 (PDT) 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=0ZK1Ea1H; 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 S1727533AbfJ2Kpu (ORCPT + 99 others); Tue, 29 Oct 2019 06:45:50 -0400 Received: from conssluserg-02.nifty.com ([210.131.2.81]:54759 "EHLO conssluserg-02.nifty.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726175AbfJ2Kpu (ORCPT ); Tue, 29 Oct 2019 06:45:50 -0400 Received: from mail-ua1-f41.google.com (mail-ua1-f41.google.com [209.85.222.41]) (authenticated) by conssluserg-02.nifty.com with ESMTP id x9TAjllJ013769 for ; Tue, 29 Oct 2019 19:45:47 +0900 DKIM-Filter: OpenDKIM Filter v2.10.3 conssluserg-02.nifty.com x9TAjllJ013769 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nifty.com; s=dec2015msa; t=1572345948; bh=ABgtHQoYN+OnWaETIQoMwES94nPToZvZJ0rO3T4xCq0=; h=References:In-Reply-To:From:Date:Subject:To:Cc:From; b=0ZK1Ea1HGyUC9VI9FxAlxXqejhflruqc+9jiOsRbQgXp+sQhJ3T+ASUvATJme46vY p/Ve40hriQiqA4MWw8Jk6Gpq40rvULPKwRVsqdAM28BcRPqDOeHbhhelKvmNlU86np 2P1tFfd6pOgDsFrxqYcpWA3OABuy+7hrjuHy6KcHESDGFKsieFG0ZeSv9aXa9cUeVc gXqjvPzHnGs3XZiYqjwh7jRZkR9CUi+b021BFAkDowCvvyAf3XAf4QXacBpjVpJtLa Q/GJ8KX7a7L/3na01pFeWpufRGqxvY3iNztm+KelGQpw0/fIqYRjC2laD2W97fQdlw OV7lj05eD3A6A== X-Nifty-SrcIP: [209.85.222.41] Received: by mail-ua1-f41.google.com with SMTP id q4so1493831uap.8 for ; Tue, 29 Oct 2019 03:45:47 -0700 (PDT) X-Gm-Message-State: APjAAAUoGKhuexGdF2D4QY1FE4H2DU07B+cC2C1Su1rLalWuGYxN48X7 UKrUyQC8EvmNRnbBo4C8sIfT0IoVz0VXSCO4mGM= X-Received: by 2002:a9f:2382:: with SMTP id 2mr10901980uao.95.1572345946290; Tue, 29 Oct 2019 03:45:46 -0700 (PDT) MIME-Version: 1.0 References: <20191028151427.31612-1-jeyu@kernel.org> <20191028151427.31612-3-jeyu@kernel.org> In-Reply-To: <20191028151427.31612-3-jeyu@kernel.org> From: Masahiro Yamada Date: Tue, 29 Oct 2019 19:45:09 +0900 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [PATCH 3/4] nsdeps: remove stale .ns_deps files before generating new ones To: Jessica Yu Cc: Linux Kernel Mailing List , Matthias Maennich 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, Oct 29, 2019 at 12:14 AM Jessica Yu wrote: > > When adding or removing namespaces, calling `make` does not necessarily > remove existing stale .ns_deps files. That is, one could remove a > namespace, call make, and while modpost writes the correct, new .ns_deps > files, stale ones are not removed from the source tree, thus producing > incorrect results when running `make nsdeps`, i.e., inserting > MODULE_IMPORT_NS() statements for namespaces that have been removed. > Clean up old .ns_deps files before generating new ones with modpost. Hmm, correct. But, removing *.ns_deps every time is not an elegant solution. I want to try a different approach. > > Signed-off-by: Jessica Yu > --- > Makefile | 2 ++ > 1 file changed, 2 insertions(+) > > diff --git a/Makefile b/Makefile > index ffd7a912fc46..22f9894b346b 100644 > --- a/Makefile > +++ b/Makefile > @@ -1685,6 +1685,8 @@ tags TAGS cscope gtags: FORCE > PHONY += nsdeps > > nsdeps: modules > + @find $(if $(KBUILD_EXTMOD), $(KBUILD_EXTMOD), .) $(RCS_FIND_IGNORE) \ > + -name '*.ns_deps' -type f -print | xargs rm -f > $(Q)$(MAKE) -f $(srctree)/scripts/Makefile.modpost nsdeps > $(Q)$(CONFIG_SHELL) $(srctree)/scripts/$@ > > -- > 2.16.4 > -- Best Regards Masahiro Yamada