Commit 4ef5211e authored by Ingo Molnar's avatar Ingo Molnar Committed by Andrew Morton
Browse files

kernel.h: move READ/WRITE definitions to <linux/types.h>

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: default avatarIngo Molnar <mingo@kernel.org>
Signed-off-by: default avatarAndy Shevchenko <andriy.shevchenko@linux.intel.com>
Cc: Alexandru Ardelean <aardelean@baylibre.com>
Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
parent 91e53493
Loading
Loading
Loading
Loading
+0 −4
Original line number Diff line number Diff line
@@ -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) (		\
+4 −0
Original line number Diff line number Diff line
@@ -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.
 */