mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Nathan Chancellor <nathan@kernel.org>
To: Chris Down <chris@chrisdown.name>
Cc: Jiapeng Chong <jiapeng.chong@linux.alibaba.com>,
	mcgrof@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 10:01:02 -0700	[thread overview]
Message-ID: <Y+0PzlA0LijhfD8R@dev-arch.thelio-3990X> (raw)
In-Reply-To: <Y+0MsMomkcDBdjNI@chrisdown.name>

On Wed, Feb 15, 2023 at 04:47:44PM +0000, Chris Down wrote:
> 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?

Not after commit 2ece476a2346 ("module: replace module_layout with
module_memory") in -next. This patch should have a fixes tag, even if
the warning is currently hidden behind W=1.

> > 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
> > 

  reply	other threads:[~2023-02-15 17:01 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-02-10  6:42 Jiapeng Chong
2023-02-15 16:47 ` Chris Down
2023-02-15 17:01   ` Nathan Chancellor [this message]
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+0PzlA0LijhfD8R@dev-arch.thelio-3990X \
    --to=nathan@kernel.org \
    --cc=abaci@linux.alibaba.com \
    --cc=bpf@vger.kernel.org \
    --cc=chris@chrisdown.name \
    --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=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

all inboxes | Powered by JetHome®