Received: by 2002:a6b:fb09:0:0:0:0:0 with SMTP id h9csp6136120iog; Thu, 23 Jun 2022 12:06:09 -0700 (PDT) X-Google-Smtp-Source: AGRyM1tDWDKnV54ESqPnHjTlpt+TpTn5iv0pz9pXBGmj7D+BSfmw793+llVRt74Z4W0aDPWYUWoc X-Received: by 2002:a17:906:d550:b0:726:2b34:2fd6 with SMTP id cr16-20020a170906d55000b007262b342fd6mr2314178ejc.311.1656011168795; Thu, 23 Jun 2022 12:06:08 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1656011168; cv=none; d=google.com; s=arc-20160816; b=vPpRVfAqPNn1/lrBkC9E1niALTcCo3OWQrOShHA5AHj2gRm4WmmcB1j9d7m8lgz++y Y16XKrHOIUwQPFCizuJh9jt0VCatZIPrwWEhaNhnRq1ycvq2Nzta1hcGA1IPAkHy+VSH oynmkEKu6Q6YHg9IvF3xpU6Qk1APHWlcJQ1XPTUtvWV9U9HlWDx9LOvKufVYnASKpekc hExuQJVY2QckHOgL/j2Ysy0/y2lphbYZy5+bQvP6tAbzf6nlLXaDF3R5t37Pje415BGi UMr6asqhX55mTzHkHta+QNl2wv9fefPc+BS4ZcuYItq8jeFETmsoyoBuTbLnXamz/hYv N+Fg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=UYHGX7oheDUogeqjeM/Ro/2cxOqxx0cl1iBGr2EI9VY=; b=xPcE8UmU7ocvr4Vyuq9+wqgnGMbfP8WmS2lG0UDU+G2+cEVPGfraL2TrOYMYNQz/Gb 8Ew4OtRPE9kXlVrH5nzF1loxqVe3xFk3Tjw0yqWwKdh3jMa628uyEzv79bRQsmEABJFj c+i+sshvSBbxWs81FPyb6j6LYJ8BSrjWNX3OZFeh+0m0FGOB8b2Gm7qvTqMusp1STaVJ Kk/KQlh9lTBowkMZ3WJ6PNwZ04XBzGWMevU1DbJUSZrhrI2k4ULXpcjuxx46xU9R4qxu D3jqVIPCPE2JrW77KNlQwk1SzmtRbnO4OtnF93+QBUJab6IWAPWk4GUg+YK/EQ+F3zf3 i3Gw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=JcWaZtTS; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id s4-20020a17090699c400b00722f4502e2csi972718ejn.631.2022.06.23.12.05.43; Thu, 23 Jun 2022 12:06:08 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=JcWaZtTS; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235473AbiFWSBI (ORCPT + 99 others); Thu, 23 Jun 2022 14:01:08 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:52556 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235630AbiFWR45 (ORCPT ); Thu, 23 Jun 2022 13:56:57 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id ABB44AE98F; Thu, 23 Jun 2022 10:15:33 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id 3102D61DE1; Thu, 23 Jun 2022 17:15:33 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 1295AC3411B; Thu, 23 Jun 2022 17:15:31 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1656004532; bh=J5xJYi+i64ykzs9x/0F9qkD+abvNKXxxEEBjmLewFAs=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=JcWaZtTSQlVkNrEr+oGWtTh7P2cVImIYX6yRkmVeOFF4dmkKBUX3jjCqgZRxYTyHx XW2pzPFhPVBjHOTvxBMSGSoZ5kdmZ8S9KI+rfJArG3k+CUkkrDdFm5Le84U8bfOVlg mYFlYgChzL9V16qIAUi4aiCUZPp/JXxnUHsDV8ZQ= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Dominik Brodowski , "Jason A. Donenfeld" Subject: [PATCH 4.19 066/234] random: remove unused OUTPUT_POOL constants Date: Thu, 23 Jun 2022 18:42:13 +0200 Message-Id: <20220623164344.929675215@linuxfoundation.org> X-Mailer: git-send-email 2.36.1 In-Reply-To: <20220623164343.042598055@linuxfoundation.org> References: <20220623164343.042598055@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-7.7 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_HI, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: "Jason A. Donenfeld" commit 0f63702718c91d89c922081ac1e6baeddc2d8b1a upstream. We no longer have an output pool. Rather, we have just a wakeup bits threshold for /dev/random reads, presumably so that processes don't hang. This value, random_write_wakeup_bits, is configurable anyway. So all the no longer usefully named OUTPUT_POOL constants were doing was setting a reasonable default for random_write_wakeup_bits. This commit gets rid of the constants and just puts it all in the default value of random_write_wakeup_bits. Reviewed-by: Dominik Brodowski Signed-off-by: Jason A. Donenfeld Signed-off-by: Greg Kroah-Hartman --- drivers/char/random.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) --- a/drivers/char/random.c +++ b/drivers/char/random.c @@ -363,8 +363,6 @@ */ #define INPUT_POOL_SHIFT 12 #define INPUT_POOL_WORDS (1 << (INPUT_POOL_SHIFT-5)) -#define OUTPUT_POOL_SHIFT 10 -#define OUTPUT_POOL_WORDS (1 << (OUTPUT_POOL_SHIFT-5)) #define EXTRACT_SIZE (BLAKE2S_HASH_SIZE / 2) /* @@ -382,7 +380,7 @@ * should wake up processes which are selecting or polling on write * access to /dev/random. */ -static int random_write_wakeup_bits = 28 * OUTPUT_POOL_WORDS; +static int random_write_wakeup_bits = 28 * (1 << 5); /* * Originally, we used a primitive polynomial of degree .poolwords