lkml.org 
[lkml]   [2017]   [Sep]   [13]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Date
From
Subject[patch 16/52] 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: Thomas Gleixner <tglx@linutronix.de>
---
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)

\
 
 \ /
  Last update: 2017-09-13 23:45    [W:0.213 / U:3.348 seconds]
©2003-2017 Jasper Spaans. hosted at Digital OceanAdvertise on this site