]> www.infradead.org Git - users/jedix/linux-maple.git/commit
kernel.h: move PTR_IF() and u64_to_user_ptr() to util_macros.h
authorAndy Shevchenko <andriy.shevchenko@linux.intel.com>
Mon, 24 Mar 2025 10:50:25 +0000 (12:50 +0200)
committerAndrew Morton <akpm@linux-foundation.org>
Mon, 12 May 2025 00:54:06 +0000 (17:54 -0700)
commit029c896c4105b7d74fcd88d99c5fbab2558fee89
tree4b8d4c215c38f1e621f4343febd3f847a5181bf9
parent4ef5211ee68113070bd42142f06347866675055e
kernel.h: move PTR_IF() and u64_to_user_ptr() to util_macros.h

While the natural choice of PTR_IF() is kconfig.h, the latter is too broad
to include C code and actually the macro was moved out from there in the
past.  But kernel.h is neither a good choice for that.  Move it to
util_macros.h.  Do the same for u64_to_user_ptr().

While moving, add necessary documentation.

Link: https://lkml.kernel.org/r/20250324105228.775784-3-andriy.shevchenko@linux.intel.com
Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Cc: Alexandru Ardelean <aardelean@baylibre.com>
Cc: Ingo Molnar <mingo@kernel.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
include/linux/kernel.h
include/linux/util_macros.h