From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from ozlabs.org (ozlabs.org [103.22.144.67]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by lists.ozlabs.org (Postfix) with ESMTPS id 3rzxtY6LdMzDrLr for ; Thu, 28 Jul 2016 00:18:45 +1000 (AEST) From: Michael Ellerman To: Cc: Benjamin Herrenschmidt , aneesh.kumar@linux.vnet.ibm.com, haokexin@gmail.com Subject: [PATCH v3 08/21] powerpc/kernel: Convert mmu_has_feature() to returning bool Date: Thu, 28 Jul 2016 00:18:04 +1000 Message-Id: <1469629097-30859-8-git-send-email-mpe@ellerman.id.au> In-Reply-To: <1469629097-30859-1-git-send-email-mpe@ellerman.id.au> References: <1469629097-30859-1-git-send-email-mpe@ellerman.id.au> List-Id: Linux on PowerPC Developers Mail List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , The intention is that the result is only used as a boolean, so enforce that by changing the return type to bool. Signed-off-by: Michael Ellerman --- arch/powerpc/include/asm/mmu.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) v3: Split out. diff --git a/arch/powerpc/include/asm/mmu.h b/arch/powerpc/include/asm/mmu.h index 599781e48552..eb942a446969 100644 --- a/arch/powerpc/include/asm/mmu.h +++ b/arch/powerpc/include/asm/mmu.h @@ -135,9 +135,9 @@ enum { 0, }; -static inline int mmu_has_feature(unsigned long feature) +static inline bool mmu_has_feature(unsigned long feature) { - return (MMU_FTRS_POSSIBLE & cur_cpu_spec->mmu_features & feature); + return !!(MMU_FTRS_POSSIBLE & cur_cpu_spec->mmu_features & feature); } static inline void mmu_clear_feature(unsigned long feature) -- 2.7.4