x86: topology_update_die_map function removes unused return values
PATCH 1/1 x86: topology_update_die_map function removes unused return values
Change the return value of the topology_update_die_map function to void to remove the BUG_ON check and reduce eAX register calls.
Signed-off-by Li kunyu <[email protected]>
--- arch/x86/include/asm/topology.h | 6 +++--- arch/x86/kernel/cpu/common.c | 2 +- arch/x86/kernel/smpboot.c | 3 +-- 3 files changed, 5 insertions(+), 6 deletions(-)
arch/x86/include/asm/topology.h +3 -3
@@ -137,7 +137,7 @@ static inline int topology_max_smt_threads(void) }void topology_update_package_map (unsigned int apicid,unsigned int cpu); -int topology_update_die_map (unsigned int dieid,unsigned int cpu); +void topology_update_die_map (unsigned int dieid,unsigned int cpu);int topology_phys_to_logical_pkg (unsigned int pkg);int topology_phys_to_logical_die (unsigned int die,unsigned int cpu);bool topology_is_primary_thread (unsigned int cpu);
@@ -146,8 +146,8 @@ bool topology_smt_supported(void);#define topology_max_packages () (1)static inline void topology_update_package_map (unsigned int apicid,unsigned int cpu) { } -static inline int -topology_update_die_map (unsigned int dieid,unsigned int cpu) {return 0 ; } +static inline void +topology_update_die_map (unsigned int dieid,unsigned int cpu) { }static inline int topology_phys_to_logical_pkg (unsigned int pkg) {return 0 ; }static inline int topology_phys_to_logical_die (unsigned int die,unsigned int cpu) {return 0 ; }
arch/x86/kernel/cpu/common.c +1 -1
@@ -1674,7 +1674,7 @@ static void validate_apic_and_package_id(struct cpuinfo_x86 *c) cpu, apicid, c->initial_apicid); }topology_update_package_map (c->phys_proc_id, cpu); -BUG_ON (topology_update_die_map (c->cpu_die_id, cpu)); +topology_update_die_map (c->cpu_die_id, cpu);#else c->logical_proc_id =0 ;#endif
arch/x86/kernel/smpboot.c +1 -2
@@ -349,7 +349,7 @@ void topology_update_package_map(unsigned int pkg, unsigned int cpu)* @die: The die id as retrieved via CPUID * @cpu: The cpu for which this is updated */ -int topology_update_die_map (unsigned int die,unsigned int cpu) +void topology_update_die_map (unsigned int die,unsigned int cpu) {int new;
@@ -365,7 +365,6 @@ int topology_update_die_map(unsigned int die, unsigned int cpu) } found:cpu_data (cpu).logical_die_id = new; -return 0 ; }void __init smp_store_boot_cpu_info (void )
Signature · 1 line
2.18.2