From: Ingo Molnar Date: Mon, 24 Mar 2025 10:50:24 +0000 (+0200) Subject: kernel.h: move READ/WRITE definitions to X-Git-Tag: v6.16-rc1~91^2~57 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=4ef5211ee68113070bd42142f06347866675055e;p=thirdparty%2Flinux.git kernel.h: move READ/WRITE definitions to Patch series "kernel.h: Move out a couple of macros and constants". kernel.h hosts a couple of macros and constants that may be better placed. Do that. Also add missing documentation. No functional changes intended. This patch (of 2): Headers shouldn't be forced to include just to gain these simple constants. Link: https://lkml.kernel.org/r/20250324105228.775784-1-andriy.shevchenko@linux.intel.com Link: https://lkml.kernel.org/r/20250324105228.775784-2-andriy.shevchenko@linux.intel.com Signed-off-by: Ingo Molnar Signed-off-by: Andy Shevchenko Cc: Alexandru Ardelean Signed-off-by: Andrew Morton --- diff --git a/include/linux/kernel.h b/include/linux/kernel.h index be2e8c0a187e4..01bb0fac36672 100644 --- a/include/linux/kernel.h +++ b/include/linux/kernel.h @@ -41,10 +41,6 @@ #define STACK_MAGIC 0xdeadbeef -/* generic data direction definitions */ -#define READ 0 -#define WRITE 1 - #define PTR_IF(cond, ptr) ((cond) ? (ptr) : NULL) #define u64_to_user_ptr(x) ( \ diff --git a/include/linux/types.h b/include/linux/types.h index 49b79c8bb1a94..6dfdb8e8e4c35 100644 --- a/include/linux/types.h +++ b/include/linux/types.h @@ -136,6 +136,10 @@ typedef s64 ktime_t; typedef u64 sector_t; typedef u64 blkcnt_t; +/* generic data direction definitions */ +#define READ 0 +#define WRITE 1 + /* * The type of an index into the pagecache. */