Received: by 2002:a6b:fb09:0:0:0:0:0 with SMTP id h9csp6140489iog; Thu, 23 Jun 2022 12:11:12 -0700 (PDT) X-Google-Smtp-Source: AGRyM1toyuLQ/oGE+9BFWoddF6IpbvVNh9mMth4pAgseVHglBHOsJJJ14pSXGq9aJ8cgDAIMu60P X-Received: by 2002:a17:90b:3b4c:b0:1e8:5e4d:ed83 with SMTP id ot12-20020a17090b3b4c00b001e85e4ded83mr5442946pjb.19.1656011472356; Thu, 23 Jun 2022 12:11:12 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1656011472; cv=none; d=google.com; s=arc-20160816; b=kwu1IbAGwsgt6pPuz8IpSsEjV9ie5PYTKGW98KWOgZ7kGRV2yvyPi4+sBqe4ciV/yY jEcLecgagsIUzRGDFUzF+eKm886ARE29cHhiawZTsboJoT1OIqIO7NpfuuHvwwCze3yS nw52UOZ57FOvtO7v/9GgIu1uxnnH9n0eysBmBYmUyoPcLECJ30QdQRW+rjS1JzZ0fc/A gMkqEwEGkb6FxzajAYzRwW+K4Ae/PlwDwmYNO8jf52WB1HrQZNfQGPUrMXdg4IUM3DY6 kbg5l1tLdKMQNAavgAJNvj8g6vo4vXX5+ZoTjWnDOaoeqK9HNF/VRG4BoscGvAaCSM8x ri1w== 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=nmhiD1fisiAokzF7z1L5f2MmiDc7fWmk5jE5xC68IyA=; b=OhFmNOA4B3qDOSD13QthZAqLxLkFk3hXRPzWzacPYuOoWsghBUNhgCBk9vjEszDQlZ blpfQCmCp0ozeAay9VfDYprJiSn4vaIgTRB7CcFEs2tbMLj/I63NOO2JMeOSfXShE3KG 4UnLe5F7/IU78TpnsHjVLhx51I+Y2SabvoYjFvrUKvom4CrTzKmTmVQwDZznd7KIBTgX 36bZqOm/Yunqu7no5xyd7spLNx4pOvH5I6BX6U209fVPl4ZIii7HyzluACm+NwA4FQIm dL2epIHYUITz4xquR+f+9sqAFgnGWHyKmzruzZ56Dq2za58i1EShUSmxiFbbaOLmlUKC NGgA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=MJdMJuBa; 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 b5-20020a1709027e0500b0016a4179aec5si335648plm.361.2022.06.23.12.11.00; Thu, 23 Jun 2022 12:11:12 -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=MJdMJuBa; 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 S236029AbiFWSGS (ORCPT + 99 others); Thu, 23 Jun 2022 14:06:18 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:45254 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235977AbiFWSFl (ORCPT ); Thu, 23 Jun 2022 14:05:41 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [IPv6:2604:1380:4641:c500::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id F186B8859A; Thu, 23 Jun 2022 10:17:44 -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 8A9B661DE5; Thu, 23 Jun 2022 17:17:44 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 64650C3411B; Thu, 23 Jun 2022 17:17:43 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1656004663; bh=lwxdwfv9q0du0Q5xiBlzD6K/BrGfI5juH84PKp+aQHM=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=MJdMJuBa6/ACT3pk8Z4vxCn3YbP8CePGLYazAY4HCcBHNIccyfJUyh0JCajXHH+ej X0cA5mTZ1wPiTIZbptPUvdEiRlddEI/sP/JuP12NfqqeVUYoIGch1pXOrvPomMAM6Q 5zMpR1QnBKGu/FRcYJbR4xWTiTD4KsxOfnTsxVLE= 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.19 109/234] random: pull add_hwgenerator_randomness() declaration into random.h Date: Thu, 23 Jun 2022 18:42:56 +0200 Message-Id: <20220623164346.142582380@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 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 @@ -15,6 +15,7 @@ #include #include #include +#include #include #include #include --- a/include/linux/hw_random.h +++ b/include/linux/hw_random.h @@ -59,7 +59,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);