From patchwork Fri Jan 10 14:54:20 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Mark Brown X-Patchwork-Id: 198250 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-10.1 required=3.0 tests=DKIMWL_WL_HIGH, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, INCLUDES_PATCH, MAILING_LIST_MULTI, SIGNED_OFF_BY, SPF_HELO_NONE, SPF_PASS, USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id E8A30C33CA3 for ; Fri, 10 Jan 2020 14:54:52 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id B05BD20721 for ; Fri, 10 Jan 2020 14:54:52 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1578668092; bh=3fZXe01M1DES1nCJzaQ2syzPGlGt6/Fcr4JJpAfV2kg=; h=From:To:Cc:Subject:Date:In-Reply-To:References:List-ID:From; b=BggAk8yX+x9ytgJp2xEPmzi0CqmCtG2WlKUyiQxgqYQ28Z5UMIm8dTKghf8/Y+Uqn wHG1/UMQrV1nNRjXytYT3Qt1EWhILN6hGnLf74kbjNZ1LeySymDe07okMQs+cX1JAH iASCivP+vM7++sF9tyg9RM+iglRtMNZGot94tv/s= Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728384AbgAJOyu (ORCPT ); Fri, 10 Jan 2020 09:54:50 -0500 Received: from foss.arm.com ([217.140.110.172]:45932 "EHLO foss.arm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728370AbgAJOyp (ORCPT ); Fri, 10 Jan 2020 09:54:45 -0500 Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.121.207.14]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id 0FA23142F; Fri, 10 Jan 2020 06:54:45 -0800 (PST) Received: from localhost (unknown [10.37.6.21]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id 8D1A53F6C4; Fri, 10 Jan 2020 06:54:44 -0800 (PST) From: Mark Brown To: linux-arch@vger.kernel.org Cc: Richard Henderson , Borislav Petkov , linux-s390@vger.kernel.org, herbert@gondor.apana.org.au, x86@kernel.org, linux-crypto@vger.kernel.org, linuxppc-dev@lists.ozlabs.org, linux-arm-kernel@lists.infradead.org, Ard Biesheuvel , Richard Henderson , Mark Brown Subject: [PATCH v2 08/10] powerpc: Use bool in archrandom.h Date: Fri, 10 Jan 2020 14:54:20 +0000 Message-Id: <20200110145422.49141-9-broonie@kernel.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20200110145422.49141-1-broonie@kernel.org> References: <20200110145422.49141-1-broonie@kernel.org> MIME-Version: 1.0 Sender: linux-crypto-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-crypto@vger.kernel.org From: Richard Henderson The generic interface uses bool not int; match that. Reviewed-by: Ard Biesheuvel Signed-off-by: Richard Henderson Signed-off-by: Mark Brown --- arch/powerpc/include/asm/archrandom.h | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) diff --git a/arch/powerpc/include/asm/archrandom.h b/arch/powerpc/include/asm/archrandom.h index 2fa7cdfbba24..f0f16b4fc5ea 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_seed_long(&val); if (rc)