[PATCH] x86: replace_intsrc_all function removes unused return values

XU pengfei posted 1 patch 3 years, 10 months ago
There is a newer version of this series
arch/x86/kernel/mpparse.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
[PATCH] x86: replace_intsrc_all function removes unused return values
Posted by XU pengfei 3 years, 10 months ago
Change the return value of the replace_intsrc_all function to
void to reduce eAX register calls . 

Signed-off-by: XU pengfei <xupengfei@nfschina.com>
---
 arch/x86/kernel/mpparse.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/arch/x86/kernel/mpparse.c b/arch/x86/kernel/mpparse.c
index fed721f90116..bb2ae610163f 100644
--- a/arch/x86/kernel/mpparse.c
+++ b/arch/x86/kernel/mpparse.c
@@ -723,7 +723,7 @@ static
 inline void __init check_irq_src(struct mpc_intsrc *m, int *nr_m_spare) {}
 #endif /* CONFIG_X86_IO_APIC */
 
-static int  __init replace_intsrc_all(struct mpc_table *mpc,
+static void  __init replace_intsrc_all(struct mpc_table *mpc,
 					unsigned long mpc_new_phys,
 					unsigned long mpc_new_length)
 {
-- 
2.18.2
[PATCH v2] x86: replace_intsrc_all function removes unused return values
Posted by XU pengfei 3 years, 10 months ago
Change the return value of the replace_intsrc_all function to
void to reduce eAX register calls .

Signed-off-by: XU pengfei <xupengfei@nfschina.com>
---
 arch/x86/kernel/mpparse.c | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

diff --git a/arch/x86/kernel/mpparse.c b/arch/x86/kernel/mpparse.c
index fed721f90116..0c9b9db9cac3 100644
--- a/arch/x86/kernel/mpparse.c
+++ b/arch/x86/kernel/mpparse.c
@@ -723,7 +723,7 @@ static
 inline void __init check_irq_src(struct mpc_intsrc *m, int *nr_m_spare) {}
 #endif /* CONFIG_X86_IO_APIC */
 
-static int  __init replace_intsrc_all(struct mpc_table *mpc,
+static void  __init replace_intsrc_all(struct mpc_table *mpc,
 					unsigned long mpc_new_phys,
 					unsigned long mpc_new_length)
 {
@@ -793,8 +793,6 @@ static int  __init replace_intsrc_all(struct mpc_table *mpc,
 	/* update checksum */
 	mpc->checksum = 0;
 	mpc->checksum -= mpf_checksum((unsigned char *)mpc, mpc->length);
-
-	return 0;
 }
 
 int enable_update_mptable;
-- 
2.18.2