[patch 16/52] x86/apic: Sanitize return value of check_apicid_used()

From: Thomas Gleixner
Date: Wed Sep 13 2017 - 17:45:06 EST


The check is boolean, but the function returns unsigned long for no value.

Signed-off-by: Thomas Gleixner <tglx@xxxxxxxxxxxxx>
---
arch/x86/include/asm/apic.h | 4 ++--
arch/x86/kernel/apic/bigsmp_32.c | 4 ++--
2 files changed, 4 insertions(+), 4 deletions(-)

--- a/arch/x86/include/asm/apic.h
+++ b/arch/x86/include/asm/apic.h
@@ -280,7 +280,7 @@ struct apic {
int disable_esr;

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,
const struct cpumask *mask);
@@ -572,7 +572,7 @@ default_vector_allocation_domain(int 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);
}
--- a/arch/x86/kernel/apic/bigsmp_32.c
+++ b/arch/x86/kernel/apic/bigsmp_32.c
@@ -26,9 +26,9 @@ static int bigsmp_apic_id_registered(voi
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)