2023-01-05 09:23:17

by Jiapeng Chong

[permalink] [raw]
Subject: [PATCH v2] x86/xen: Remove the unused function p2m_index()

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

arch/x86/xen/p2m.c:137:24: warning: unused function 'p2m_index'.

Link: https://bugzilla.openanolis.cn/show_bug.cgi?id=3557
Reported-by: Abaci Robot <[email protected]>
Signed-off-by: Jiapeng Chong <[email protected]>
---
Changes in v2:
-Modify title and submission.

arch/x86/xen/p2m.c | 5 -----
1 file changed, 5 deletions(-)

diff --git a/arch/x86/xen/p2m.c b/arch/x86/xen/p2m.c
index 58db86f7b384..9bdc3b656b2c 100644
--- a/arch/x86/xen/p2m.c
+++ b/arch/x86/xen/p2m.c
@@ -134,11 +134,6 @@ static inline unsigned p2m_mid_index(unsigned long pfn)
return (pfn / P2M_PER_PAGE) % P2M_MID_PER_PAGE;
}

-static inline unsigned p2m_index(unsigned long pfn)
-{
- return pfn % P2M_PER_PAGE;
-}
-
static void p2m_top_mfn_init(unsigned long *top)
{
unsigned i;
--
2.20.1.7.g153144c


2023-01-09 06:48:10

by Jürgen Groß

[permalink] [raw]
Subject: Re: [PATCH v2] x86/xen: Remove the unused function p2m_index()

On 05.01.23 10:01, Jiapeng Chong wrote:
> The function p2m_index is defined in the p2m.c file, but not called
> elsewhere, so remove this unused function.
>
> arch/x86/xen/p2m.c:137:24: warning: unused function 'p2m_index'.
>
> Link: https://bugzilla.openanolis.cn/show_bug.cgi?id=3557
> Reported-by: Abaci Robot <[email protected]>
> Signed-off-by: Jiapeng Chong <[email protected]>

Reviewed-by: Juergen Gross <[email protected]>


Juergen


Attachments:
OpenPGP_0xB0DE9DD628BF132F.asc (3.08 kB)
OpenPGP public key
OpenPGP_signature (505.00 B)
OpenPGP digital signature
Download all attachments

2023-01-10 08:50:07

by Jürgen Groß

[permalink] [raw]
Subject: Re: [PATCH v2] x86/xen: Remove the unused function p2m_index()

On 05.01.23 10:01, Jiapeng Chong wrote:
> The function p2m_index is defined in the p2m.c file, but not called
> elsewhere, so remove this unused function.
>
> arch/x86/xen/p2m.c:137:24: warning: unused function 'p2m_index'.
>
> Link: https://bugzilla.openanolis.cn/show_bug.cgi?id=3557
> Reported-by: Abaci Robot <[email protected]>
> Signed-off-by: Jiapeng Chong <[email protected]>

Pushed to xen/tip.git for-linus-6.2


Juergen


Attachments:
OpenPGP_0xB0DE9DD628BF132F.asc (3.08 kB)
OpenPGP public key
OpenPGP_signature (505.00 B)
OpenPGP digital signature
Download all attachments