]> git.ipfire.org Git - thirdparty/kernel/linux.git/commitdiff
kernel.h: move READ/WRITE definitions to <linux/types.h>
authorIngo Molnar <mingo@kernel.org>
Mon, 24 Mar 2025 10:50:24 +0000 (12:50 +0200)
committerAndrew Morton <akpm@linux-foundation.org>
Mon, 12 May 2025 00:54:06 +0000 (17:54 -0700)
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 <linux/kernel.h> 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 <mingo@kernel.org>
Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Cc: Alexandru Ardelean <aardelean@baylibre.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
include/linux/kernel.h
include/linux/types.h

index be2e8c0a187e4b26a704ee5e628b7afe404d9211..01bb0fac366725c920ef452ba3bee299f6c29b7a 100644 (file)
 
 #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) (           \
index 49b79c8bb1a9404e318c8b36fddb58eb14094eaf..6dfdb8e8e4c35cdb43987dc40a1b162b969c159b 100644 (file)
@@ -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.
  */