From: Matthias Maennich <maennich@google.com>
To: Masahiro Yamada <yamada.masahiro@socionext.com>
Cc: linux-kbuild@vger.kernel.org, Jessica Yu <jeyu@kernel.org>,
Matthias Kaehlcke <mka@chromium.org>,
Michal Marek <michal.lkml@markovi.net>,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH 4/4] mospost: remove unneeded local variable in contains_namespace()
Date: Tue, 5 Nov 2019 13:47:42 +0000 [thread overview]
Message-ID: <20191105134742.GC65671@google.com> (raw)
In-Reply-To: <20191029123809.29301-5-yamada.masahiro@socionext.com>
Hi!
On Tue, Oct 29, 2019 at 09:38:09PM +0900, Masahiro Yamada wrote:
>The local variable, ns_entry, is unneeded.
>
>While I was here, I also cleaned up the comparison with NULL or 0.
>
>Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
>---
This was not directly sent to me, hence I missed it.
Nevertheless, please feel free to add
Reviewed-by: Matthias Maennich <maennich@google.com>
Cheers,
Matthias
>
> scripts/mod/modpost.c | 6 ++----
> 1 file changed, 2 insertions(+), 4 deletions(-)
>
>diff --git a/scripts/mod/modpost.c b/scripts/mod/modpost.c
>index f7425f5d4ab0..f70b924f379f 100644
>--- a/scripts/mod/modpost.c
>+++ b/scripts/mod/modpost.c
>@@ -239,10 +239,8 @@ static struct symbol *find_symbol(const char *name)
> static bool contains_namespace(struct namespace_list *list,
> const char *namespace)
> {
>- struct namespace_list *ns_entry;
>-
>- for (ns_entry = list; ns_entry != NULL; ns_entry = ns_entry->next)
>- if (strcmp(ns_entry->namespace, namespace) == 0)
>+ for (; list; list = list->next)
>+ if (!strcmp(list->namespace, namespace))
> return true;
>
> return false;
>--
>2.17.1
>
next prev parent reply other threads:[~2019-11-05 13:47 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-10-29 12:38 [PATCH 0/4] More nsdeps improvements Masahiro Yamada
2019-10-29 12:38 ` [PATCH 1/4] modpost: do not invoke extra modpost for nsdeps Masahiro Yamada
2019-11-05 16:37 ` Matthias Maennich
2019-10-29 12:38 ` [PATCH 2/4] modpost: dump missing namespaces into a single modules.nsdeps file Masahiro Yamada
2019-10-30 20:11 ` Jessica Yu
2019-10-31 11:20 ` Jessica Yu
2019-10-31 11:53 ` Masahiro Yamada
2019-11-06 15:24 ` Matthias Maennich
2019-10-29 12:38 ` [PATCH 3/4] scripts/nsdeps: support nsdeps for external module builds Masahiro Yamada
2019-10-30 17:02 ` Jessica Yu
2019-11-06 16:12 ` Matthias Maennich
2019-10-29 12:38 ` [PATCH 4/4] mospost: remove unneeded local variable in contains_namespace() Masahiro Yamada
2019-11-05 13:47 ` Matthias Maennich [this message]
2019-11-06 15:39 ` Masahiro Yamada
2019-10-30 20:14 ` [PATCH 0/4] More nsdeps improvements Jessica Yu
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=20191105134742.GC65671@google.com \
--to=maennich@google.com \
--cc=jeyu@kernel.org \
--cc=linux-kbuild@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=michal.lkml@markovi.net \
--cc=mka@chromium.org \
--cc=yamada.masahiro@socionext.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).