Received: by 2002:a6b:fb09:0:0:0:0:0 with SMTP id h9csp6142059iog; Thu, 23 Jun 2022 12:13:00 -0700 (PDT) X-Google-Smtp-Source: AGRyM1ueDNkU7UktuhrBQLJXoZZMtsrmdKDP4Q6H3e8Dd52GVM+EwuzKkgadeIsWnCl76Y5WDvgx X-Received: by 2002:a05:6402:27d1:b0:436:dd8:a6d5 with SMTP id c17-20020a05640227d100b004360dd8a6d5mr1166663ede.342.1656011580434; Thu, 23 Jun 2022 12:13:00 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1656011580; cv=none; d=google.com; s=arc-20160816; b=GhjUOd9OCauV7NEpPSQjl6pe1IjlVNBxdQrmLWox40/aWgiIHwTJigLYkvgWpVyg0/ MD4AY92ruqeIQ21VoXcYZOv+W0iPe/8g37F4eiGltRx0df2llliTDMF6fXzB1VIImWiA PCSuITWMw0iVWSVZGNQqLtJQF/L9RUGNqdqOyp6N5p+eqEqg1ADKx9dPFWnIx+p5TDbp oxv0I64XLHJAsKmmdz+1gpfOqLNIQcHBlWIwkXq0bSuc57gvfs167Xom5wrLp5COzTJL FSEdjYd62wSAAHoQIXmIzomx9Dt9jk/nRA7sn8+RAKGzVFVvWBqlX6aW80c9dHV6fr0t uAzA== 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=KCjad5Culb2wgvKqFlsJ8SIPOa3SUs676kwwrQDGxkQ=; b=oB5IT1FycZGF702c8rt23nzZWRmdeh6GVlzQteRJ4Zxk4KXARzk08YBg43+0tfmpcJ tafdPcTfj9pBx/OxNwszOngEdVfJs9UxLQOho5ckiaDgusw41F5ASOr5Y8TWK15Qy2NY 7NFRq+SStjhc6By7IOfnL8Se3GgFUUWCHW0jUYUVqHFK8Z3cMNTjxnNuZk3PjRPtbhoG kvamWRdjOXw1n6orcdLP98MdaMeXXkcf7qFCq3pAGaVmhTZpY9gvJnNGNWI9htsiaqMT qy1+qGQabNhfcyXhvKnL6n2YMuSj+WcKxfV4TNhqys2cVWk+/3dPJj4AeF4h/rJS7YFE 8bqA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=ObvqhfJt; 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.12.35; Thu, 23 Jun 2022 12:13:00 -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=ObvqhfJt; 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 S232354AbiFWQzp (ORCPT + 99 others); Thu, 23 Jun 2022 12:55:45 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:49292 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233844AbiFWQvo (ORCPT ); Thu, 23 Jun 2022 12:51:44 -0400 Received: from ams.source.kernel.org (ams.source.kernel.org [145.40.68.75]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id D24F3388B; Thu, 23 Jun 2022 09:50:14 -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 ams.source.kernel.org (Postfix) with ESMTPS id 69821B82490; Thu, 23 Jun 2022 16:50:13 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id D8EE4C3411B; Thu, 23 Jun 2022 16:50:11 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1656003012; bh=6CbJEz9dZhAvM7TpoGdDWtovp5b/ok5BPvoY6F7n+ow=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=ObvqhfJt2Og+0lNC+F9RwkemW42k0thN3Qn1/PW90ZNyqAOnoHJYKvsyXR+SszP+4 aMHZXHndave8crij/mrgZEP1W1DdZ4mKIo4RPIA+BrC3XiR1xtjZ7khF/2jIFK3G/R E+GxAyeU/TiLLhoGpDoGfgOGWi0p2lGkt4+ez0/A= 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.9 101/264] random: remove unused OUTPUT_POOL constants Date: Thu, 23 Jun 2022 18:41:34 +0200 Message-Id: <20220623164346.928801604@linuxfoundation.org> X-Mailer: git-send-email 2.36.1 In-Reply-To: <20220623164344.053938039@linuxfoundation.org> References: <20220623164344.053938039@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 @@ -364,8 +364,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) /* @@ -383,7 +381,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