Received: by 2002:a6b:fb09:0:0:0:0:0 with SMTP id h9csp6144588iog; Thu, 23 Jun 2022 12:16:07 -0700 (PDT) X-Google-Smtp-Source: AGRyM1uAXUm7pCV+0yARiT7YcBtCU21fL9DNMU5Wvbz6PmA6NcpBBalOOS/gApYGkbc24RpZ6SeC X-Received: by 2002:a17:903:1ca:b0:16a:5d7f:182f with SMTP id e10-20020a17090301ca00b0016a5d7f182fmr3506710plh.88.1656011767166; Thu, 23 Jun 2022 12:16:07 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1656011767; cv=none; d=google.com; s=arc-20160816; b=M5KBmNl9IWU02m3863o6WRTz9aOJQTVLAsHP2JQy1tUmzDTtXi94sTwBCHtpTAhfR0 oPVf31Ku/qPTYxGze5sY+e7fY1vKCYNaSU2tx6TCOBddkW516qB/6J26TaXgw6eTqxnr wWPyYQC0Vs2fJr96DL2SMEOtUy4aBpwewAbpRWoHIzNkeMxEtKDNNGqDPfueuHZTncRY 0sk4xo/pImwqL4odZ9rPwPf4lAcXF/QKXbv1uUzT4LplacZilqxtrxOT0CO2yVfMD78W xJZSpBRDmW8XdNW19Q3i0JPtn2Dfnl6j0wt6UBW8NspejUh3vym1mCbbrj+15Q/yEG7o Sn/w== 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=m40TdeMI6jfPO26odsLSwYz+Yz7j8mlh/yb9eyaqoDs=; b=0X8mLCze6jNmvkMOKQKVD0L8Qm+9JFWb3xeqpBA0x1ny8eKSOS1EIg2PjZ97ZSpkfQ I0WTV6yCs3FrLOaANOVBiIm+a84mSc3hw2+iEYsJe2xDbuQm6KEmLr0YreGJGQuqNwPU Kow3D2AcRbKGvthIlGsCEIXsanqboaU1h1OA/XDCRAcQDqqssb29Os/ipvUQHEn9CK++ ABfQG5wOlyF8vSnUNE60FiOc4AyaGwEVQW7iWeg6edsj4YntTnSqakuau8td1p9rhm8g 5ihrNqZO8Zbqcmrs+Q8Br/s2GPzDcqlqFR5pDB9OoXrcGSGT8u03vVnb0VTgkoyPysPW XQEw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=VRZF2CTx; 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 g14-20020a63e60e000000b003fb23692294si5960986pgh.218.2022.06.23.12.15.54; Thu, 23 Jun 2022 12:16:07 -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=VRZF2CTx; 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 S233049AbiFWRAj (ORCPT + 99 others); Thu, 23 Jun 2022 13:00:39 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:33184 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233517AbiFWQyB (ORCPT ); Thu, 23 Jun 2022 12:54:01 -0400 Received: from sin.source.kernel.org (sin.source.kernel.org [IPv6:2604:1380:40e1:4800::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 4505465DB; Thu, 23 Jun 2022 09:52:53 -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 sin.source.kernel.org (Postfix) with ESMTPS id 26814CE25D9; Thu, 23 Jun 2022 16:52:51 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id BEFEBC341C7; Thu, 23 Jun 2022 16:52:47 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1656003168; bh=hI1iiZo7B9eq7MYCO1l/Xw/OEPnNnnYM9KdREjGhzSA=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=VRZF2CTxySA63Q7IzjWN/gDhzRPDYZMXB2rPuS4EjbmAmm8ItsqpF7brEZwWOdvew JBtxtcynOTXsDpzieS967Od/H9nP/RwRyoub0ZntRCxWzt8SaZYkYIkFjqp4vbRngZ UyaHB4JxPLgzsnKSIIRu+DGy2oXm81kM+nj/pbr0= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Matt Mackall , Theodore Tso , Herbert Xu , Eric Biggers , Dominik Brodowski , "Jason A. Donenfeld" Subject: [PATCH 4.9 152/264] random: pull add_hwgenerator_randomness() declaration into random.h Date: Thu, 23 Jun 2022 18:42:25 +0200 Message-Id: <20220623164348.365012788@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 b777c38239fec5a528e59f55b379e31b1a187524 upstream. add_hwgenerator_randomness() is a function implemented and documented inside of random.c. It is the way that hardware RNGs push data into it. Therefore, it should be declared in random.h. Otherwise sparse complains with: random.c:1137:6: warning: symbol 'add_hwgenerator_randomness' was not declared. Should it be static? The alternative would be to include hw_random.h into random.c, but that wouldn't really be good for anything except slowing down compile time. Cc: Matt Mackall Cc: Theodore Ts'o Acked-by: Herbert Xu Reviewed-by: Eric Biggers Reviewed-by: Dominik Brodowski Signed-off-by: Jason A. Donenfeld Signed-off-by: Greg Kroah-Hartman --- drivers/char/hw_random/core.c | 1 + include/linux/hw_random.h | 2 -- include/linux/random.h | 2 ++ 3 files changed, 3 insertions(+), 2 deletions(-) --- a/drivers/char/hw_random/core.c +++ b/drivers/char/hw_random/core.c @@ -12,6 +12,7 @@ #include #include +#include #include #include #include --- a/include/linux/hw_random.h +++ b/include/linux/hw_random.h @@ -60,7 +60,5 @@ extern int devm_hwrng_register(struct de /** Unregister a Hardware Random Number Generator driver. */ extern void hwrng_unregister(struct hwrng *rng); extern void devm_hwrng_unregister(struct device *dve, struct hwrng *rng); -/** Feed random bits into the pool. */ -extern void add_hwgenerator_randomness(const void *buffer, size_t count, size_t entropy); #endif /* LINUX_HWRANDOM_H_ */ --- a/include/linux/random.h +++ b/include/linux/random.h @@ -32,6 +32,8 @@ static inline void add_latent_entropy(vo extern void add_input_randomness(unsigned int type, unsigned int code, unsigned int value) __latent_entropy; extern void add_interrupt_randomness(int irq) __latent_entropy; +extern void add_hwgenerator_randomness(const void *buffer, size_t count, + size_t entropy); extern void get_random_bytes(void *buf, size_t nbytes); extern int wait_for_random_bytes(void);