From mboxrd@z Thu Jan 1 00:00:00 1970 From: Richard Henderson Subject: [PATCH 4/6] powerpc: Use bool in archrandom.h Date: Mon, 28 Oct 2019 22:05:57 +0100 Message-ID: <20191028210559.8289-5-rth@twiddle.net> References: <20191028210559.8289-1-rth@twiddle.net> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <20191028210559.8289-1-rth@twiddle.net> List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=m.gmane.org@lists.infradead.org To: linux-arch@vger.kernel.org Cc: linux-s390@vger.kernel.org, Benjamin Herrenschmidt , x86@kernel.org, Paul Mackerras , Michael Ellerman , linuxppc-dev@lists.ozlabs.org, linux-arm-kernel@lists.infradead.org List-Id: linux-arch.vger.kernel.org The generic interface uses bool not int; match that. Signed-off-by: Richard Henderson --- Cc: Benjamin Herrenschmidt Cc: Paul Mackerras Cc: Michael Ellerman --- arch/powerpc/include/asm/archrandom.h | 24 +++++++++++++----------- 1 file changed, 13 insertions(+), 11 deletions(-) diff --git a/arch/powerpc/include/asm/archrandom.h b/arch/powerpc/include/asm/archrandom.h index 9c63b596e6ce..f8a887c8b7f8 100644 --- a/arch/powerpc/include/asm/archrandom.h +++ b/arch/powerpc/include/asm/archrandom.h @@ -6,27 +6,28 @@ #include -static inline int arch_get_random_long(unsigned long *v) +static inline bool arch_get_random_long(unsigned long *v) { - return 0; + return false; } -static inline int arch_get_random_int(unsigned int *v) +static inline bool arch_get_random_int(unsigned int *v) { - return 0; + return false; } -static inline int arch_get_random_seed_long(unsigned long *v) +static inline bool arch_get_random_seed_long(unsigned long *v) { if (ppc_md.get_random_seed) return ppc_md.get_random_seed(v); - return 0; + return false; } -static inline int arch_get_random_seed_int(unsigned int *v) + +static inline bool arch_get_random_seed_int(unsigned int *v) { unsigned long val; - int rc; + bool rc; rc = arch_get_random_long(&val); if (rc) @@ -35,15 +36,16 @@ static inline int arch_get_random_seed_int(unsigned int *v) return rc; } -static inline int arch_has_random(void) +static inline bool arch_has_random(void) { - return 0; + return false; } -static inline int arch_has_random_seed(void) +static inline bool arch_has_random_seed(void) { return !!ppc_md.get_random_seed; } + #endif /* CONFIG_ARCH_RANDOM */ #ifdef CONFIG_PPC_POWERNV -- 2.17.1 From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-wr1-f65.google.com ([209.85.221.65]:43417 "EHLO mail-wr1-f65.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2389625AbfJ1VGJ (ORCPT ); Mon, 28 Oct 2019 17:06:09 -0400 Received: by mail-wr1-f65.google.com with SMTP id n1so3923661wra.10 for ; Mon, 28 Oct 2019 14:06:07 -0700 (PDT) From: Richard Henderson Subject: [PATCH 4/6] powerpc: Use bool in archrandom.h Date: Mon, 28 Oct 2019 22:05:57 +0100 Message-ID: <20191028210559.8289-5-rth@twiddle.net> In-Reply-To: <20191028210559.8289-1-rth@twiddle.net> References: <20191028210559.8289-1-rth@twiddle.net> Sender: linux-arch-owner@vger.kernel.org List-ID: To: linux-arch@vger.kernel.org Cc: x86@kernel.org, linuxppc-dev@lists.ozlabs.org, linux-s390@vger.kernel.org, linux-arm-kernel@lists.infradead.org, Benjamin Herrenschmidt , Paul Mackerras , Michael Ellerman Message-ID: <20191028210557.3e7G8V1h8k5vSgMlwaufJpFXl9u7Yk4KZe0L2q6RO8c@z> The generic interface uses bool not int; match that. Signed-off-by: Richard Henderson --- Cc: Benjamin Herrenschmidt Cc: Paul Mackerras Cc: Michael Ellerman --- arch/powerpc/include/asm/archrandom.h | 24 +++++++++++++----------- 1 file changed, 13 insertions(+), 11 deletions(-) diff --git a/arch/powerpc/include/asm/archrandom.h b/arch/powerpc/include/asm/archrandom.h index 9c63b596e6ce..f8a887c8b7f8 100644 --- a/arch/powerpc/include/asm/archrandom.h +++ b/arch/powerpc/include/asm/archrandom.h @@ -6,27 +6,28 @@ #include -static inline int arch_get_random_long(unsigned long *v) +static inline bool arch_get_random_long(unsigned long *v) { - return 0; + return false; } -static inline int arch_get_random_int(unsigned int *v) +static inline bool arch_get_random_int(unsigned int *v) { - return 0; + return false; } -static inline int arch_get_random_seed_long(unsigned long *v) +static inline bool arch_get_random_seed_long(unsigned long *v) { if (ppc_md.get_random_seed) return ppc_md.get_random_seed(v); - return 0; + return false; } -static inline int arch_get_random_seed_int(unsigned int *v) + +static inline bool arch_get_random_seed_int(unsigned int *v) { unsigned long val; - int rc; + bool rc; rc = arch_get_random_long(&val); if (rc) @@ -35,15 +36,16 @@ static inline int arch_get_random_seed_int(unsigned int *v) return rc; } -static inline int arch_has_random(void) +static inline bool arch_has_random(void) { - return 0; + return false; } -static inline int arch_has_random_seed(void) +static inline bool arch_has_random_seed(void) { return !!ppc_md.get_random_seed; } + #endif /* CONFIG_ARCH_RANDOM */ #ifdef CONFIG_PPC_POWERNV -- 2.17.1