From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752039AbdIMVpA (ORCPT ); Wed, 13 Sep 2017 17:45:00 -0400 Received: from Galois.linutronix.de ([146.0.238.70]:40054 "EHLO Galois.linutronix.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751585AbdIMVev (ORCPT ); Wed, 13 Sep 2017 17:34:51 -0400 Message-Id: <20170913213153.516730518@linutronix.de> User-Agent: quilt/0.63-1 Date: Wed, 13 Sep 2017 23:29:18 +0200 From: Thomas Gleixner To: LKML Cc: Ingo Molnar , Peter Anvin , Marc Zyngier , Peter Zijlstra , Borislav Petkov , Chen Yu , Rui Zhang , "Rafael J. Wysocki" , Len Brown , Dan Williams , Christoph Hellwig , Paolo Bonzini , Joerg Roedel , Boris Ostrovsky , Juergen Gross , Tony Luck , "K. Y. Srinivasan" , Alok Kataria , Steven Rostedt , Arjan van de Ven Subject: [patch 16/52] x86/apic: Sanitize return value of check_apicid_used() References: <20170913212902.530704676@linutronix.de> MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-15 Content-Disposition: inline; filename=x86-apic--Sanitize-return-value-of-check_apicid_used--.patch Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org The check is boolean, but the function returns unsigned long for no value. Signed-off-by: Thomas Gleixner --- 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)