From: Max Kellermann <max.kellermann@ionos.com>
To: linux-kernel@vger.kernel.org
Cc: Max Kellermann <max.kellermann@ionos.com>
Subject: [PATCH v1 4/8] linux/random.h: reduce dependencies on linux/kernel.h
Date: Thu, 15 Feb 2024 10:36:42 +0100 [thread overview]
Message-ID: <20240215093646.3265823-5-max.kellermann@ionos.com> (raw)
In-Reply-To: <20240215093646.3265823-1-max.kellermann@ionos.com>
This header doesn't need kernel.h at all, but if we remove it, the
build breaks because kernel.h includes limits.h and log2.h, which
random.h needs.
list.h is also removed because it is not needed at all.
Signed-off-by: Max Kellermann <max.kellermann@ionos.com>
---
include/linux/random.h | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/include/linux/random.h b/include/linux/random.h
index b0a940af4fff..3183025ddda9 100644
--- a/include/linux/random.h
+++ b/include/linux/random.h
@@ -4,8 +4,8 @@
#define _LINUX_RANDOM_H
#include <linux/bug.h>
-#include <linux/kernel.h>
-#include <linux/list.h>
+#include <linux/limits.h> // for U32_MAX
+#include <linux/log2.h> // for is_power_of_2()
#include <uapi/linux/random.h>
--
2.39.2
next prev parent reply other threads:[~2024-02-15 9:37 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-02-15 9:36 [PATCH v1 0/8] Fast kernel headers: split linux/kernel.h Max Kellermann
2024-02-15 9:36 ` [PATCH v1 1/8] include/linux/goldfish.h: include linux/wordpart.h instead of linux/kernel.h Max Kellermann
2024-02-15 9:36 ` [PATCH v1 2/8] include/drm/drm_fixed.h: " Max Kellermann
2024-02-15 9:36 ` [PATCH v1 3/8] include linux/wordpart.h in various sources that need it Max Kellermann
2024-02-15 9:36 ` Max Kellermann [this message]
2024-02-15 9:36 ` [PATCH v1 5/8] linux/kernel.h: move might_sleep(), ... to sched/debug_atomic_sleep.h Max Kellermann
2024-02-15 9:36 ` [PATCH v1 6/8] linux/kernel.h: move READ and WRITE to direction.h Max Kellermann
2024-02-15 9:36 ` [PATCH v1 7/8] linux/kernel.h: move VERIFY_OCTAL_PERMISSIONS() to octal_permissions.h Max Kellermann
2024-02-15 9:36 ` [PATCH v1 8/8] linux/kernel.h: move PTR_IF() to ptr_util.h Max Kellermann
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20240215093646.3265823-5-max.kellermann@ionos.com \
--to=max.kellermann@ionos.com \
--cc=linux-kernel@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox