From: Chris Down <chris@chrisdown.name>
To: Jiapeng Chong <jiapeng.chong@linux.alibaba.com>
Cc: mcgrof@kernel.org, nathan@kernel.org, ndesaulniers@google.com,
trix@redhat.com, linux-modules@vger.kernel.org,
linux-kernel@vger.kernel.org, bpf@vger.kernel.org,
llvm@lists.linux.dev, Abaci Robot <abaci@linux.alibaba.com>
Subject: Re: [PATCH] module: Remove the unused function within
Date: Wed, 15 Feb 2023 16:47:44 +0000 [thread overview]
Message-ID: <Y+0MsMomkcDBdjNI@chrisdown.name> (raw)
In-Reply-To: <20230210064243.116335-1-jiapeng.chong@linux.alibaba.com>
Jiapeng Chong writes:
>The function within is defined in the main.c file, but not called
>elsewhere, so remove this unused function.
Huh? It's used by __module_text_address(), no?
>kernel/module/main.c:3007:19: warning: unused function 'within'.
>
>Reported-by: Abaci Robot <abaci@linux.alibaba.com>
>Link: https://bugzilla.openanolis.cn/show_bug.cgi?id=4035
>Signed-off-by: Jiapeng Chong <jiapeng.chong@linux.alibaba.com>
>---
> kernel/module/main.c | 5 -----
> 1 file changed, 5 deletions(-)
>
>diff --git a/kernel/module/main.c b/kernel/module/main.c
>index c598f11e7016..062065568b40 100644
>--- a/kernel/module/main.c
>+++ b/kernel/module/main.c
>@@ -3004,11 +3004,6 @@ SYSCALL_DEFINE3(finit_module, int, fd, const char __user *, uargs, int, flags)
> return load_module(&info, uargs, flags);
> }
>
>-static inline int within(unsigned long addr, void *start, unsigned long size)
>-{
>- return ((void *)addr >= start && (void *)addr < start + size);
>-}
>-
> /* Keep in sync with MODULE_FLAGS_BUF_SIZE !!! */
> char *module_flags(struct module *mod, char *buf, bool show_state)
> {
>--
>2.20.1.7.g153144c
>
next prev parent reply other threads:[~2023-02-15 16:47 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-02-10 6:42 [PATCH] module: Remove the unused function within Jiapeng Chong
2023-02-15 16:47 ` Chris Down [this message]
2023-02-15 17:01 ` Nathan Chancellor
2023-02-15 17:23 ` Chris Down
2023-02-15 18:57 ` Song Liu
2023-02-21 21:21 ` Luis Chamberlain
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=Y+0MsMomkcDBdjNI@chrisdown.name \
--to=chris@chrisdown.name \
--cc=abaci@linux.alibaba.com \
--cc=bpf@vger.kernel.org \
--cc=jiapeng.chong@linux.alibaba.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-modules@vger.kernel.org \
--cc=llvm@lists.linux.dev \
--cc=mcgrof@kernel.org \
--cc=nathan@kernel.org \
--cc=ndesaulniers@google.com \
--cc=trix@redhat.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).