From: Masahiro Yamada <yamada.masahiro@socionext.com>
To: Jessica Yu <jeyu@kernel.org>
Cc: Linux Kernel Mailing List <linux-kernel@vger.kernel.org>,
Matthias Maennich <maennich@google.com>
Subject: Re: [PATCH 3/4] nsdeps: remove stale .ns_deps files before generating new ones
Date: Tue, 29 Oct 2019 19:45:09 +0900 [thread overview]
Message-ID: <CAK7LNARpb8nU8EqBnLRCpstnFuw3YJ5UENu7PRza=H2YvCav-Q@mail.gmail.com> (raw)
In-Reply-To: <20191028151427.31612-3-jeyu@kernel.org>
On Tue, Oct 29, 2019 at 12:14 AM Jessica Yu <jeyu@kernel.org> 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 <jeyu@kernel.org>
> ---
> 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
next prev parent reply other threads:[~2019-10-29 10:45 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-10-28 15:14 [PATCH 1/4] scripts/nsdeps: use $MODORDER to obtain correct modules.order path Jessica Yu
2019-10-28 15:14 ` [PATCH 2/4] scripts/nsdeps: don't prepend $srctree if *.mod already contains full paths Jessica Yu
2019-10-29 8:59 ` Masahiro Yamada
2019-10-28 15:14 ` [PATCH 3/4] nsdeps: remove stale .ns_deps files before generating new ones Jessica Yu
2019-10-29 10:45 ` Masahiro Yamada [this message]
2019-10-28 15:14 ` [PATCH 4/4] scripts/nsdeps: make sure to pass all module source files to spatch Jessica Yu
2019-10-29 12:57 ` Masahiro Yamada
2019-10-30 16:17 ` Jessica Yu
2019-10-31 12:27 ` Masahiro Yamada
2019-10-31 13:41 ` Jessica Yu
2019-11-01 5:56 ` Masahiro Yamada
2019-11-05 12:52 ` Jessica Yu
2019-11-05 12:57 ` Masahiro Yamada
2019-10-29 12:48 ` [PATCH 1/4] scripts/nsdeps: use $MODORDER to obtain correct modules.order path Masahiro Yamada
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to='CAK7LNARpb8nU8EqBnLRCpstnFuw3YJ5UENu7PRza=H2YvCav-Q@mail.gmail.com' \
--to=yamada.masahiro@socionext.com \
--cc=jeyu@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=maennich@google.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).