Received: by 2002:a25:d7c1:0:0:0:0:0 with SMTP id o184csp3513347ybg; Mon, 28 Oct 2019 14:08:48 -0700 (PDT) X-Google-Smtp-Source: APXvYqzGt4MTP25fz3h/oo8Q9E9aAg0gWHCFmuvlbTj6MvwDog6JHrWDSiGQuOw8UTayvZtLzO/C X-Received: by 2002:aa7:c5c5:: with SMTP id h5mr5067496eds.87.1572296928414; Mon, 28 Oct 2019 14:08:48 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1572296928; cv=none; d=google.com; s=arc-20160816; b=xSxupcx/W+ZCaf1vdhgvYNZqu81NdwMJbG7rKivXr4o3G1GXaDJWghYza5BJoBWlqx bAtJyfvUvxB5jXqpID/22TTgy/XXTVVEvSC3OHEGl8XL1dDFx5UK9MgJkitzmg6xJpY/ UXz7p4zohWt7Qa9cisRQcjwr1MxMwTL1fPGakkyjWQ0MN6Sx51sWojv6hv3G3pKjCp3m q05nRWYNVq9nhUI+ME653AtQO6r1ejWkVw13KqjNi4b0DsG/IOjNrW/UXbTE9pZgD2f7 YEbfHoDlIJ5n24uRD36GNYUqPvLyxHcDxtrI/d4G1Sl0KeKox2AjRDJOrI7xfxxtvOUh tf6A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:references:in-reply-to:message-id:date :subject:cc:to:from:dkim-signature; bh=YYNIBfFBDEK7byEfHgvIcbxJVU5mo/7xQ32uWwym1ao=; b=ruoLO2/Plmm1bFTk14WzH25yPK+yIYIvzvxJJ3CwVfWegvl9QFduPyiguBHFc9tNOM +0qy6s7Io0p1kQ+gIg1dMTV6dkD0WURHFmx7trm5dGQKgOCdoEhuTDWT9Zfv/gNFOlU7 8J3PnNVlHpX8twPnln8/lc6TIKtzXmdeu4DBKG/3Iv8GdVd037DhVNIz3BxVh4/mh0tM ZOgnkDxMfqiDwUV4Tj5UxjrGhoZevbaoAnMA5CcxAfZJFMHd21uxJ/59XcdvWSBHkeFZ HXrS9D7iP4vRr83kbkV2/SuPSXBbyrbk10qlQ6fA+XJ0N1aVXutH8fftT4Fa50Vpmhgr +nFQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=cCvVusph; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id f21si8290841edf.277.2019.10.28.14.08.24; Mon, 28 Oct 2019 14:08:48 -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=@kernel.org header.s=default header.b=cCvVusph; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2390619AbfJ1POo (ORCPT + 99 others); Mon, 28 Oct 2019 11:14:44 -0400 Received: from mail.kernel.org ([198.145.29.99]:48706 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726196AbfJ1POo (ORCPT ); Mon, 28 Oct 2019 11:14:44 -0400 Received: from linux-8ccs.suse.cz (charybdis-ext.suse.de [195.135.221.2]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 2681020830; Mon, 28 Oct 2019 15:14:43 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1572275684; bh=fcw6MA5Xb54tTu35HsCkCgMilzhNxa+Djhk1dazMxfQ=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=cCvVusphcFPpK3Tz0wGK1AKcAIPx4vHho3K/C8R0wBZi0BDU6ulRdO+Uex0pPjoLG yeZrwN4iHBwagFu7ilaoQPLsxd1DpQ37mBpsY78pAP9UOrW82IwtrSF6SRkZ2fVqeI 9Ud+cmvZmrqvhmD663fu9vqsV4EB8YtpMAZhUwNM= From: Jessica Yu To: linux-kernel@vger.kernel.org Cc: Matthias Maennich , Masahiro Yamada , Jessica Yu Subject: [PATCH 3/4] nsdeps: remove stale .ns_deps files before generating new ones Date: Mon, 28 Oct 2019 16:14:26 +0100 Message-Id: <20191028151427.31612-3-jeyu@kernel.org> X-Mailer: git-send-email 2.16.4 In-Reply-To: <20191028151427.31612-1-jeyu@kernel.org> References: <20191028151427.31612-1-jeyu@kernel.org> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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. 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