提交 57e0aa44 编写于 作者: T Thomas Gleixner

x86/apic: Sanitize return value of check_apicid_used()

The check is boolean, but the function returns unsigned long for no value.
Signed-off-by: NThomas Gleixner <tglx@linutronix.de>
Tested-by: NJuergen Gross <jgross@suse.com>
Tested-by: NYu Chen <yu.c.chen@intel.com>
Acked-by: NJuergen Gross <jgross@suse.com>
Cc: Boris Ostrovsky <boris.ostrovsky@oracle.com>
Cc: Tony Luck <tony.luck@intel.com>
Cc: Marc Zyngier <marc.zyngier@arm.com>
Cc: Alok Kataria <akataria@vmware.com>
Cc: Joerg Roedel <joro@8bytes.org>
Cc: "Rafael J. Wysocki" <rjw@rjwysocki.net>
Cc: Steven Rostedt <rostedt@goodmis.org>
Cc: Christoph Hellwig <hch@lst.de>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Borislav Petkov <bp@alien8.de>
Cc: Paolo Bonzini <pbonzini@redhat.com>
Cc: Rui Zhang <rui.zhang@intel.com>
Cc: "K. Y. Srinivasan" <kys@microsoft.com>
Cc: Arjan van de Ven <arjan@linux.intel.com>
Cc: Dan Williams <dan.j.williams@intel.com>
Cc: Len Brown <lenb@kernel.org>
Link: https://lkml.kernel.org/r/20170913213153.516730518@linutronix.de
上级 727657e6
...@@ -289,7 +289,7 @@ struct apic { ...@@ -289,7 +289,7 @@ struct apic {
int disable_esr; int disable_esr;
int dest_logical; int dest_logical;
unsigned long (*check_apicid_used)(physid_mask_t *map, int apicid); bool (*check_apicid_used)(physid_mask_t *map, int apicid);
void (*vector_allocation_domain)(int cpu, struct cpumask *retmask, void (*vector_allocation_domain)(int cpu, struct cpumask *retmask,
const struct cpumask *mask); const struct cpumask *mask);
...@@ -581,7 +581,7 @@ default_vector_allocation_domain(int cpu, struct cpumask *retmask, ...@@ -581,7 +581,7 @@ default_vector_allocation_domain(int cpu, struct cpumask *retmask,
cpumask_copy(retmask, cpumask_of(cpu)); cpumask_copy(retmask, cpumask_of(cpu));
} }
static inline unsigned long default_check_apicid_used(physid_mask_t *map, int apicid) static inline bool default_check_apicid_used(physid_mask_t *map, int apicid)
{ {
return physid_isset(apicid, *map); return physid_isset(apicid, *map);
} }
......
...@@ -26,9 +26,9 @@ static int bigsmp_apic_id_registered(void) ...@@ -26,9 +26,9 @@ static int bigsmp_apic_id_registered(void)
return 1; return 1;
} }
static unsigned long bigsmp_check_apicid_used(physid_mask_t *map, int apicid) static bool bigsmp_check_apicid_used(physid_mask_t *map, int apicid)
{ {
return 0; return false;
} }
static int bigsmp_early_logical_apicid(int cpu) static int bigsmp_early_logical_apicid(int cpu)
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册