From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 33D3FC4332F for ; Sat, 15 Oct 2022 05:51:27 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender:List-Subscribe:List-Help :List-Post:List-Archive:List-Unsubscribe:List-Id:In-Reply-To:Content-Type: MIME-Version:References:Message-ID:Subject:Cc:To:From:Date:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=cf/mi8PiR7AOB7uAV/J+8RsCEujUPjdzXkLzGlxBC8Q=; b=rxtS0FRzld0eJqKQpcxUw4jqpz bxnXCMVDCnEYmPjg2g3EE4CAuXb1gFED1vPbRLsQ8XuPGtkXuNViEzDxGZBlKFUjwG9fGl6ut2SZl SDJOg1V2RzDfeE1b7fgIQsqeQXYyKIcE3yw3RJf29fu7lU+Bmg/c+RLK3a/wAveRmVjZ2k++yJtqS 2IzbO2epRpQM9gB5kYyufBQVsq+SawgITb0hZMI8sDImdGBXPLDln9uGYRJ/0UnLc761IlVHstXGF IQr1Tsbli0o/+QSZeNfWglNlkzVC0LKvnFh7RucDQEht7CtmIhbdGUzeNKarOFSyZM3jldCCFfxVS kiKkkNPw==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1oja4y-00GV90-Jy; Sat, 15 Oct 2022 05:51:24 +0000 Received: from chamillionaire.breakpoint.cc ([2a0a:51c0:0:12e:520::1]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1oivGk-00BOcS-8D; Thu, 13 Oct 2022 10:16:51 +0000 Received: from fw by Chamillionaire.breakpoint.cc with local (Exim 4.92) (envelope-from ) id 1oivGV-00028B-QF; Thu, 13 Oct 2022 12:16:35 +0200 Date: Thu, 13 Oct 2022 12:16:35 +0200 From: Florian Westphal To: Rolf Eike Beer Cc: linux-kernel@vger.kernel.org, patches@lists.linux.dev, "Jason A. Donenfeld" , Andrew Morton , Florian Westphal , Herbert Xu , Thomas Graf , kasan-dev@googlegroups.com, Greg Kroah-Hartman , kernel-janitors@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-block@vger.kernel.org, linux-crypto@vger.kernel.org, linux-doc@vger.kernel.org, linux-fsdevel@vger.kernel.org, linux-media@vger.kernel.org, linux-mips@vger.kernel.org, linux-mm@kvack.org, linux-mmc@vger.kernel.org, linux-mtd@lists.infradead.org, linux-nvme@lists.infradead.org, linux-parisc@vger.kernel.org, linux-rdma@vger.kernel.org, linux-s390@vger.kernel.org, linux-um@lists.infradead.org, linux-usb@vger.kernel.org, linux-wireless@vger.kernel.org, linuxppc-dev@lists.ozlabs.org, loongarch@lists.linux.dev, netdev@vger.kernel.org, sparclinux@vger.kernel.org, x86@kernel.org Subject: Re: [PATCH v6 5/7] treewide: use get_random_u32() when possible Message-ID: <20221013101635.GB11818@breakpoint.cc> References: <20221010230613.1076905-1-Jason@zx2c4.com> <20221010230613.1076905-6-Jason@zx2c4.com> <3026360.ZldQQBzMgz@eto.sf-tec.de> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <3026360.ZldQQBzMgz@eto.sf-tec.de> User-Agent: Mutt/1.10.1 (2018-07-13) X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20221013_031650_328760_CBF6E89A X-CRM114-Status: UNSURE ( 6.70 ) X-CRM114-Notice: Please train this message. X-Mailman-Approved-At: Fri, 14 Oct 2022 22:51:19 -0700 X-BeenThere: linux-nvme@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "Linux-nvme" Errors-To: linux-nvme-bounces+linux-nvme=archiver.kernel.org@lists.infradead.org Rolf Eike Beer wrote: > Florian, can you comment and maybe fix it? Can't comment, do not remember -- this was 5 years ago. > Or you wanted to move the variable before the loop and keep the random state > between the loops and only reseed when all '1' bits have been consumed. Probably. No clue, best to NOT change it to not block Jasons series and then just simplify this and remove all the useless shifts.