Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

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: 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>

authored by

Ingo Molnar and committed by
Andrew Morton
4ef5211e 91e53493

+4 -4
-4
include/linux/kernel.h
··· 41 41 42 42 #define STACK_MAGIC 0xdeadbeef 43 43 44 - /* generic data direction definitions */ 45 - #define READ 0 46 - #define WRITE 1 47 - 48 44 #define PTR_IF(cond, ptr) ((cond) ? (ptr) : NULL) 49 45 50 46 #define u64_to_user_ptr(x) ( \
+4
include/linux/types.h
··· 136 136 typedef u64 sector_t; 137 137 typedef u64 blkcnt_t; 138 138 139 + /* generic data direction definitions */ 140 + #define READ 0 141 + #define WRITE 1 142 + 139 143 /* 140 144 * The type of an index into the pagecache. 141 145 */