From patchwork Thu Nov 3 12:17:40 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Jason A. Donenfeld" X-Patchwork-Id: 14844 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:6687:0:0:0:0:0 with SMTP id l7csp500723wru; Thu, 3 Nov 2022 05:37:14 -0700 (PDT) X-Google-Smtp-Source: AMsMyM4MyBPal4+YjYt+tOHtHIwcb9sc0AhSbar+n1lHEx6yOFKlEdNLiIz/uv3aZW3ZlPuhXMxg X-Received: by 2002:a17:902:9894:b0:186:a7d7:c56 with SMTP id s20-20020a170902989400b00186a7d70c56mr30353829plp.168.1667479034600; Thu, 03 Nov 2022 05:37:14 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1667479034; cv=none; d=google.com; s=arc-20160816; b=eJDnGwLgAOe5tBQpd7MOwtM2UUMh/up/n8DVpafCATiDAKZRLizfpBL6AUwERR2Xki 9mbU2sB0QO8xDp3DEF+dTp4ZniPOLLepIu9TE2lGkL7M5b9tOzUcVE/N8hYOW+IkX1bx Z5fKkKyAmV2udnsimspd+89Y5qZSb6mxVt2bJjQpYOH76zNls2ZnIELlh3Mjelu1lLBp W+iVjqq/ucmzdUcOO/rJqOvxD52lkwMfj2Q6ZIS/JR4fAKr5SLW5YF5xIXZuPxfO3iFz uI5ud9B+7CcgYTA+7kkJ6ehloc0Sua/jrgZXn9CGJ+2ZPW2O6BBv7jchnrRwRuw+T8s/ xb5w== 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 :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=qCNlgmyItqyuRavx+qm0fBnSnb18rMft+VAzhi/oxew=; b=c2G57+Mh9jqA9D07EtlEIkJ0KZzkBpIaZB9ZOpaLBqTqwgGlwB72c60w7RmKdCgnCT k57R8Np62BhTEEz8U+BG0uR/hfFfFsgS+V9z3Zio3XNCrUkkN+AEmhjX2w86P/Uc+AdJ XlQJG93kwrOkmAfsbj7acyQqZ4PMxmR5nGyZejEMICmsN5ej9Tx4xjfFVD02KxVSyBUv fChDyr2b3npl01qVmN2D3ZW36upUSlK7uXcYTjJTYPl7kXcvkVFm/QnI8JLKu35C+IDJ QdXnl2YVksb7Av0Eyy0OZRrHLUbc2SvRF/FIIUTkz0xaeLNxytWbRMBB3sNHAWJtx+mP wXTg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@zx2c4.com header.s=20210105 header.b=lrD9JVVU; 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=QUARANTINE sp=QUARANTINE dis=NONE) header.from=zx2c4.com Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id b5-20020a056a000cc500b0053708adb535si910568pfv.257.2022.11.03.05.37.01; Thu, 03 Nov 2022 05:37:14 -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=@zx2c4.com header.s=20210105 header.b=lrD9JVVU; 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=QUARANTINE sp=QUARANTINE dis=NONE) header.from=zx2c4.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231567AbiKCMSH (ORCPT + 99 others); Thu, 3 Nov 2022 08:18:07 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:43564 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231599AbiKCMSC (ORCPT ); Thu, 3 Nov 2022 08:18:02 -0400 Received: from ams.source.kernel.org (ams.source.kernel.org [145.40.68.75]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 0CD2E7651; Thu, 3 Nov 2022 05:17:59 -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 A48FBB8277B; Thu, 3 Nov 2022 12:17:57 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id C5FD7C433D7; Thu, 3 Nov 2022 12:17:55 +0000 (UTC) Authentication-Results: smtp.kernel.org; dkim=pass (1024-bit key) header.d=zx2c4.com header.i=@zx2c4.com header.b="lrD9JVVU" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=zx2c4.com; s=20210105; t=1667477871; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=qCNlgmyItqyuRavx+qm0fBnSnb18rMft+VAzhi/oxew=; b=lrD9JVVUL9UrnfqHLp1I7x/5J2b+aAtYmL7jczhvVtrKpqiU/HWdbsi1zxmZclPFnh1x7y Jytf4GEX4gtC70S1GOuZ2xn5Y/Z1Zh4JNmhjzpciYdZFIiYvdznQ6Pq5aAFV56zWUfzB2p o24siwI87dCNeeEHsBXM/dF+shfXXYk= Received: by mail.zx2c4.com (ZX2C4 Mail Server) with ESMTPSA id 4fa6e674 (TLSv1.3:TLS_AES_256_GCM_SHA384:256:NO); Thu, 3 Nov 2022 12:17:51 +0000 (UTC) From: "Jason A. Donenfeld" To: Heiko Carstens , linux-s390@vger.kernel.org, linux-kernel@vger.kernel.org Cc: "Jason A. Donenfeld" Subject: [PATCH v3] random: do not include from random.h Date: Thu, 3 Nov 2022 13:17:40 +0100 Message-Id: <20221103121740.6684-1-Jason@zx2c4.com> In-Reply-To: <20221029010857.161574-1-Jason@zx2c4.com> References: <20221029010857.161574-1-Jason@zx2c4.com> MIME-Version: 1.0 X-Spam-Status: No, score=-6.8 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, RCVD_IN_DNSWL_HI,SPF_HELO_NONE,SPF_PASS 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 X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1747977691799661548?= X-GMAIL-MSGID: =?utf-8?q?1748478496018009761?= The header is a random.c private detail, not something to be called by other code. As such, don't make it automatically available by way of random.h. Cc: Michael Ellerman Cc: Heiko Carstens Reviewed-by: Christophe Leroy Signed-off-by: Jason A. Donenfeld Acked-by: Heiko Carstens --- arch/powerpc/kernel/setup-common.c | 1 + arch/s390/kernel/setup.c | 1 + drivers/char/hw_random/s390-trng.c | 1 + drivers/char/random.c | 1 + include/linux/random.h | 2 -- 5 files changed, 4 insertions(+), 2 deletions(-) diff --git a/arch/powerpc/kernel/setup-common.c b/arch/powerpc/kernel/setup-common.c index 6d041993a45d..9b10e57040c6 100644 --- a/arch/powerpc/kernel/setup-common.c +++ b/arch/powerpc/kernel/setup-common.c @@ -59,6 +59,7 @@ #include #include #include +#include #include #include #include diff --git a/arch/s390/kernel/setup.c b/arch/s390/kernel/setup.c index ab19ddb09d65..b53a45735a5d 100644 --- a/arch/s390/kernel/setup.c +++ b/arch/s390/kernel/setup.c @@ -52,6 +52,7 @@ #include #include +#include #include #include #include diff --git a/drivers/char/hw_random/s390-trng.c b/drivers/char/hw_random/s390-trng.c index 795853dfc46b..3a388e1c3631 100644 --- a/drivers/char/hw_random/s390-trng.c +++ b/drivers/char/hw_random/s390-trng.c @@ -23,6 +23,7 @@ #include #include #include +#include MODULE_LICENSE("GPL v2"); MODULE_AUTHOR("IBM Corporation"); diff --git a/drivers/char/random.c b/drivers/char/random.c index bf6144c1de7d..b696f5dd3241 100644 --- a/drivers/char/random.c +++ b/drivers/char/random.c @@ -55,6 +55,7 @@ #include #include #include +#include #include #include #include diff --git a/include/linux/random.h b/include/linux/random.h index 2bdd3add3400..47e7cf126e8f 100644 --- a/include/linux/random.h +++ b/include/linux/random.h @@ -151,8 +151,6 @@ declare_get_random_var_wait(long, unsigned long) */ #include -#include - #ifdef CONFIG_SMP int random_prepare_cpu(unsigned int cpu); int random_online_cpu(unsigned int cpu);