From patchwork Wed Nov 6 14:13:06 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Richard Henderson X-Patchwork-Id: 178717 Delivered-To: patch@linaro.org Received: by 2002:a92:38d5:0:0:0:0:0 with SMTP id g82csp666281ilf; Wed, 6 Nov 2019 06:14:35 -0800 (PST) X-Google-Smtp-Source: APXvYqyj7U5pVPSWrKWSmZqmO9xPjs04juQgjRP1gs57e4NPoT6vK+T4ZcMfvDCwm24/LZ7asNA9 X-Received: by 2002:a17:906:1505:: with SMTP id b5mr35487845ejd.195.1573049675437; Wed, 06 Nov 2019 06:14:35 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1573049675; cv=none; d=google.com; s=arc-20160816; b=MV/T9Cv9fWXhXGdLp5L/zHz5Cc07ngn683bGUdbVApxywY+YSg/wuJjqlXEUiZhKcC 6H8CBIARfjzPvSrwAfhrArD3TnMy5V0HoMB8B4Rof6OIvO0M1OOdLt7uhQP1Y81DrbP/ EU/gNZ/QyQ9mnYhlvVJBIo4eaIr/JuMRndL552Yv8w8diWsYNCYpuUabxAOOKiTFS6e8 SKaTevgo1zkzx0FXLNM+CSgQHKz+EUrZluAA2qtU5dHRBxhY6bBKH2tyo7cy+efbBh4T wyWUiIL8wtm+Pd+fBkE0APx1o2A8g6YoNWfw5OqbJMhrzWD1s+Vp44f95qS6ncPy/Gfp AR6Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:references:in-reply-to:message-id:date :subject:cc:to:from:dkim-signature; bh=fqzAPQhanx5lXrgKjEv9uTOrlBIqmOP4j8raLoO2k80=; b=aGu3RrFeX5/7afd2K9KkZp3TVRBAUSfvDmNiDdkn3BveeNxfhk6d42AWCs0StzmfA/ 3UTy+9AgoPfpYKFTdClm6mgkWV9XJbSwKf4jjEZDyCUEtUBpVjEQ4Kcrz8Tl+WwWozcW dgQqq0M0wRTZNIC/PlsrKgSnn1FQZKMq9EQwnxUfUMmT1RpVssHt/2xJr5/41JZHZv6R Nigz//I29WuNdP+UMiEtd6ICXfoEI8XRK11AsK2AII+DReTt3e9nyNP763mengPhx1iP XwRIZorvYwLg5jEM+JDAZUAfPKoZ8olaAEbOMI2WfHQJ9NfirJ3NBxqT2CaDZQhW1na6 6Sjw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=I2POX88Z; spf=pass (google.com: best guess record for domain of linux-crypto-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-crypto-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id r1si15189348ejp.287.2019.11.06.06.14.35; Wed, 06 Nov 2019 06:14:35 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-crypto-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=I2POX88Z; spf=pass (google.com: best guess record for domain of linux-crypto-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-crypto-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1731870AbfKFOOA (ORCPT + 3 others); Wed, 6 Nov 2019 09:14:00 -0500 Received: from mail-wr1-f68.google.com ([209.85.221.68]:42090 "EHLO mail-wr1-f68.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1731910AbfKFONi (ORCPT ); Wed, 6 Nov 2019 09:13:38 -0500 Received: by mail-wr1-f68.google.com with SMTP id a15so25959550wrf.9 for ; Wed, 06 Nov 2019 06:13:36 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=fqzAPQhanx5lXrgKjEv9uTOrlBIqmOP4j8raLoO2k80=; b=I2POX88ZgDVEIXbxSVYMlxZS/dZ7L9KVhUwt+3VSv9oM/hQnoUVFd/6BdiDiRkN72e mb3HIJ8zn335Mrlnm7+1kBy52YQr8iVQF2Ja5iGFzC2aYsdzlXapp9hOL4hr/d25WSIb TLlS5LGfym6UNlJ25r+k4XhtiyR+AcOmsf8KxheDxTBSYyezHh6NYY+RQW8omSd+sxht EExXnP+uHJklWzU8BZnUIUTZqb1eV8tqpuILEWnzNrXEiuexc65TTdG06IsXsKChYaG2 M8rk6v6P9kDamxYzI4+MMtDD4T8sy85hVCZM4ztqGTKQTpNvGNLVZNDmZx/i/SqHqgJj 0d0g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=fqzAPQhanx5lXrgKjEv9uTOrlBIqmOP4j8raLoO2k80=; b=bTMmTOqyR+dEmv+0UWQK8eriAu49n1fMvWXAfCzDAYxE1E7t6nmkHnNL/GwFb0f+xJ 8rwc2o+fPgF68hFIxZGvt0NUMAoTQHHkCDcL1VsGhcgbaT32ZXjV8RUUOWYmBDQzTFM0 c3KdJp4y//xoVrrbVR3n+HBvtnNE7E1SfylSHeb8UvsyWfnLYYc5VYC46APPww5fvzF2 lL89u6COmMafXmF0jG6+VknKV4TQccs8V0kbrF0TW0h1Jq940u0U/Wx40BvoAM2SgRGY PLWm96ROkLxA2FNjLFjmPm9xqQskN49WaqGyrI8hA32cB5vGtBfhga8dzgVFukrcUS/2 8DkQ== X-Gm-Message-State: APjAAAU1L9U/XRWNZZQFfLxnbRKbwnorK4BDvA+2b41zv0iZrvgSm9Ja O3tTgQDignAEK6LusuB7X8wAuRLRt9mwNA== X-Received: by 2002:a05:6000:128c:: with SMTP id f12mr3122000wrx.279.1573049615963; Wed, 06 Nov 2019 06:13:35 -0800 (PST) Received: from localhost.localdomain (31.red-176-87-122.dynamicip.rima-tde.net. [176.87.122.31]) by smtp.gmail.com with ESMTPSA id b3sm2837556wma.13.2019.11.06.06.13.34 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 06 Nov 2019 06:13:35 -0800 (PST) From: Richard Henderson X-Google-Original-From: Richard Henderson To: linux-crypto@vger.kernel.org Cc: herbert@gondor.apana.org.au, linux-arch@vger.kernel.org, x86@kernel.org, linuxppc-dev@lists.ozlabs.org, linux-s390@vger.kernel.org, linux-arm-kernel@lists.infradead.org Subject: [PATCH v2 08/10] powerpc: Use bool in archrandom.h Date: Wed, 6 Nov 2019 15:13:06 +0100 Message-Id: <20191106141308.30535-9-rth@twiddle.net> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20191106141308.30535-1-rth@twiddle.net> References: <20191106141308.30535-1-rth@twiddle.net> Sender: linux-crypto-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-crypto@vger.kernel.org The generic interface uses bool not int; match that. Reviewed-by: Ard Biesheuvel Signed-off-by: Richard Henderson --- arch/powerpc/include/asm/archrandom.h | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) -- 2.17.1 diff --git a/arch/powerpc/include/asm/archrandom.h b/arch/powerpc/include/asm/archrandom.h index c2ed3b4681f5..7766812e2355 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)