Received: by 2002:a6b:fb09:0:0:0:0:0 with SMTP id h9csp2933836iog; Mon, 20 Jun 2022 07:47:24 -0700 (PDT) X-Google-Smtp-Source: AGRyM1v7YrrfJVrjK4bCVtH7/v9glrYxu/t/v+4ZEtaRY7LlZ4eEOWF6VmR3Ao7lltJR57T+nQso X-Received: by 2002:a17:902:cec2:b0:163:e44a:c678 with SMTP id d2-20020a170902cec200b00163e44ac678mr24057751plg.137.1655736444343; Mon, 20 Jun 2022 07:47:24 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1655736444; cv=none; d=google.com; s=arc-20160816; b=wBb+27jIhsRoMpMM8C2nPi5r0dBRKqrPSUWVoa1dBuvFhMYeJ6HRtVtal2iQddoERf hp1vWuBhnwWJKIYBEURCViUksC9Wr1kZaGoYzxna0X6Cq9vJLHv8G1m1pU/VIC7vVWd3 6h00OS7HbEbq/05cka3xozOcvSJE+gDEG+xaxO5tZCNM/yznflHrcjXEXDiCLZmpwFwq Ksi9Ti+4JHQzJDKzeC+wMWfkA+8qMvgtGG4eaEix9ZCpCcaWTv1DVzJuFhemSLh6rggk fU/ObKqW70yUsBOCPk2bz5lOMO5IJpyVpTWTMFIR78OlnXGICJIZnmIog46UtsnnVQ6C Knww== 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=XHP9xReksPtT9kM9U1YuXXi2/MRmPVFxCXzLgMgb8cc=; b=u7e+VtgKTSCO6dYE3p4dJR993/jYB5rzuAiJeJB5WQ6bqCjV7jaMZLUgoX6ChUs2ZK V1ibj9CWGMCvTfBfvm3t3ts4RBESy34qqhhuLCRQcxTLm5w862czYpzM8gSG/B/sGq65 0uYAfB6eTRymux85bK4NCdgI0RL4QL8p0f7qrKHABrc4/WXhfpc6VYK9FpSi7kaHeLKu YVdzFHlvZKgxBdnuH6RBp4Xn4FwkfshMPV31Hgp7+t/3Apx0GhvomYjeeq+iW1pDAEJP LhelhAlFYpOQA6k++/8/31nZIh35WAH2DXHjSdSBCBRuW8qk8N3wayDJ2WUh0OKZW6LQ RIfw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=kQcO4f2u; 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 a28-20020a631a5c000000b003fde9094ba3si15884917pgm.757.2022.06.20.07.47.11; Mon, 20 Jun 2022 07:47:24 -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=kQcO4f2u; 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 S1348381AbiFTNq6 (ORCPT + 99 others); Mon, 20 Jun 2022 09:46:58 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:56044 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1348768AbiFTNqH (ORCPT ); Mon, 20 Jun 2022 09:46:07 -0400 Received: from ams.source.kernel.org (ams.source.kernel.org [IPv6:2604:1380:4601:e00::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 146172DD51; Mon, 20 Jun 2022 06:17:05 -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 12456B811A6; Mon, 20 Jun 2022 13:15:51 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 580E2C3411B; Mon, 20 Jun 2022 13:15:49 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1655730949; bh=16LFNup+v25/VvNo3CxgLkxi4CTpG2cxX/qybxkt+Iw=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=kQcO4f2uhvvJVDe7JiEtosGXtOEsFQWsgS+b3jktlLFQETbxh+iP9psgzWP8sn51+ WzmzZAVqYaFAw+Ug7K/NxOW9txSRMbqm2gQqDsJsPPuEd+zKpMgMJxyvx3+OSqQa1M dqe4iPjFK+n9RFpgT2eNl7KqpYiqtLsa9Di2d5yg= 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 5.4 104/240] random: pull add_hwgenerator_randomness() declaration into random.h Date: Mon, 20 Jun 2022 14:50:05 +0200 Message-Id: <20220620124742.030172183@linuxfoundation.org> X-Mailer: git-send-email 2.36.1 In-Reply-To: <20220620124737.799371052@linuxfoundation.org> References: <20220620124737.799371052@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 @@ -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);