* [PATCH -next] module: Remove unused macros module_addr_min/max
@ 2022-09-24 7:22 Chen Zhongjin
2022-09-26 5:50 ` Christophe Leroy
2022-09-30 11:37 ` Miroslav Benes
0 siblings, 2 replies; 4+ messages in thread
From: Chen Zhongjin @ 2022-09-24 7:22 UTC (permalink / raw)
To: linux-kernel, linux-modules; +Cc: mcgrof, chenzhongjin
Unused macros reported by [-Wunused-macros].
These macros are introduced to record the bound address of modules.
'80b8bf436990 ("module: Always have struct mod_tree_root")'
This commit has made struct mod_tree_root always exist, which means
we can always referencing mod_tree derectly rather than using this
macro.
So they are useless, remove them for code cleaning.
Signed-off-by: Chen Zhongjin <chenzhongjin@huawei.com>
---
kernel/module/main.c | 3 ---
1 file changed, 3 deletions(-)
diff --git a/kernel/module/main.c b/kernel/module/main.c
index a4e4d84b6f4e..96dcc950da60 100644
--- a/kernel/module/main.c
+++ b/kernel/module/main.c
@@ -84,9 +84,6 @@ struct mod_tree_root mod_data_tree __cacheline_aligned = {
};
#endif
-#define module_addr_min mod_tree.addr_min
-#define module_addr_max mod_tree.addr_max
-
struct symsearch {
const struct kernel_symbol *start, *stop;
const s32 *crcs;
--
2.17.1
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PATCH -next] module: Remove unused macros module_addr_min/max
2022-09-24 7:22 [PATCH -next] module: Remove unused macros module_addr_min/max Chen Zhongjin
@ 2022-09-26 5:50 ` Christophe Leroy
2022-09-30 11:37 ` Miroslav Benes
1 sibling, 0 replies; 4+ messages in thread
From: Christophe Leroy @ 2022-09-26 5:50 UTC (permalink / raw)
To: Chen Zhongjin, linux-kernel, linux-modules; +Cc: mcgrof
Le 24/09/2022 à 09:22, Chen Zhongjin a écrit :
> Unused macros reported by [-Wunused-macros].
>
> These macros are introduced to record the bound address of modules.
>
> '80b8bf436990 ("module: Always have struct mod_tree_root")'
> This commit has made struct mod_tree_root always exist, which means
> we can always referencing mod_tree derectly rather than using this
> macro.
>
> So they are useless, remove them for code cleaning.
Yeah, it looks like this removal got lost during a rebase.
Should have been part of 55ce556dbf92 ("module: Remove module_addr_min
and module_addr_max")
Reviewed-by: Christophe Leroy <christophe.leroy@csgroup.eu>
>
> Signed-off-by: Chen Zhongjin <chenzhongjin@huawei.com>
> ---
> kernel/module/main.c | 3 ---
> 1 file changed, 3 deletions(-)
>
> diff --git a/kernel/module/main.c b/kernel/module/main.c
> index a4e4d84b6f4e..96dcc950da60 100644
> --- a/kernel/module/main.c
> +++ b/kernel/module/main.c
> @@ -84,9 +84,6 @@ struct mod_tree_root mod_data_tree __cacheline_aligned = {
> };
> #endif
>
> -#define module_addr_min mod_tree.addr_min
> -#define module_addr_max mod_tree.addr_max
> -
> struct symsearch {
> const struct kernel_symbol *start, *stop;
> const s32 *crcs;
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH -next] module: Remove unused macros module_addr_min/max
2022-09-24 7:22 [PATCH -next] module: Remove unused macros module_addr_min/max Chen Zhongjin
2022-09-26 5:50 ` Christophe Leroy
@ 2022-09-30 11:37 ` Miroslav Benes
2022-10-03 23:43 ` Luis Chamberlain
1 sibling, 1 reply; 4+ messages in thread
From: Miroslav Benes @ 2022-09-30 11:37 UTC (permalink / raw)
To: Chen Zhongjin; +Cc: linux-kernel, linux-modules, mcgrof
Hi,
On Sat, 24 Sep 2022, Chen Zhongjin wrote:
> Unused macros reported by [-Wunused-macros].
>
> These macros are introduced to record the bound address of modules.
>
> '80b8bf436990 ("module: Always have struct mod_tree_root")'
> This commit has made struct mod_tree_root always exist, which means
> we can always referencing mod_tree derectly rather than using this
> macro.
>
> So they are useless, remove them for code cleaning.
a nit, but I would rephrase the changelog a bit...
"
Commit 80b8bf436990 ("module: Always have struct mod_tree_root") made
"struct mod_tree_root" always present and its members addr_min and
addr_max can be directly accessed.
Macros module_addr_min and module_addr_min are not used anymore, so remove
them.
"
> Signed-off-by: Chen Zhongjin <chenzhongjin@huawei.com>
Anyway
Reviewed-by: Miroslav Benes <mbenes@suse.cz>
M
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH -next] module: Remove unused macros module_addr_min/max
2022-09-30 11:37 ` Miroslav Benes
@ 2022-10-03 23:43 ` Luis Chamberlain
0 siblings, 0 replies; 4+ messages in thread
From: Luis Chamberlain @ 2022-10-03 23:43 UTC (permalink / raw)
To: Miroslav Benes; +Cc: Chen Zhongjin, linux-kernel, linux-modules
On Fri, Sep 30, 2022 at 01:37:25PM +0200, Miroslav Benes wrote:
> Hi,
>
> On Sat, 24 Sep 2022, Chen Zhongjin wrote:
>
> > Unused macros reported by [-Wunused-macros].
> >
> > These macros are introduced to record the bound address of modules.
> >
> > '80b8bf436990 ("module: Always have struct mod_tree_root")'
> > This commit has made struct mod_tree_root always exist, which means
> > we can always referencing mod_tree derectly rather than using this
> > macro.
> >
> > So they are useless, remove them for code cleaning.
>
> a nit, but I would rephrase the changelog a bit...
>
> "
> Commit 80b8bf436990 ("module: Always have struct mod_tree_root") made
> "struct mod_tree_root" always present and its members addr_min and
> addr_max can be directly accessed.
>
> Macros module_addr_min and module_addr_min are not used anymore, so remove
> them.
> "
>
> > Signed-off-by: Chen Zhongjin <chenzhongjin@huawei.com>
>
> Anyway
>
> Reviewed-by: Miroslav Benes <mbenes@suse.cz>
Thanks all, I've changed the commit message as suggested by Miroslav,
and will queue this up for 6.2.
Luis
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2022-10-03 23:43 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-09-24 7:22 [PATCH -next] module: Remove unused macros module_addr_min/max Chen Zhongjin
2022-09-26 5:50 ` Christophe Leroy
2022-09-30 11:37 ` Miroslav Benes
2022-10-03 23:43 ` Luis Chamberlain
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).