mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Jiapeng Chong <jiapeng.chong@linux.alibaba.com>
To: mcgrof@kernel.org
Cc: chris@chrisdown.name, 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,
	Jiapeng Chong <jiapeng.chong@linux.alibaba.com>,
	Abaci Robot <abaci@linux.alibaba.com>
Subject: [PATCH] module: Remove the unused function within
Date: Fri, 10 Feb 2023 14:42:43 +0800	[thread overview]
Message-ID: <20230210064243.116335-1-jiapeng.chong@linux.alibaba.com> (raw)

The function within is defined in the main.c file, but not called
elsewhere, so remove this unused function.

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-10  6:43 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-02-10  6:42 Jiapeng Chong [this message]
2023-02-15 16:47 ` Chris Down
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=20230210064243.116335-1-jiapeng.chong@linux.alibaba.com \
    --to=jiapeng.chong@linux.alibaba.com \
    --cc=abaci@linux.alibaba.com \
    --cc=bpf@vger.kernel.org \
    --cc=chris@chrisdown.name \
    --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

all inboxes | Powered by JetHome®