[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20241209095019.1732120-8-kevin.brodsky@arm.com>
Date: Mon, 9 Dec 2024 09:50:12 +0000
From: Kevin Brodsky <kevin.brodsky@....com>
To: linux-mm@...ck.org
Cc: linux-kernel@...r.kernel.org,
Kevin Brodsky <kevin.brodsky@....com>,
akpm@...ux-foundation.org,
aruna.ramakrishna@...cle.com,
catalin.marinas@....com,
dave.hansen@...ux.intel.com,
joey.gouly@....com,
keith.lucas@...cle.com,
ryan.roberts@....com,
shuah@...nel.org,
linux-arm-kernel@...ts.infradead.org,
linux-kselftest@...r.kernel.org,
x86@...nel.org
Subject: [PATCH 07/14] selftests/mm: Define types using typedef in pkey-helpers.h
Using #define to define types should be avoided. Use typedef
instead. Also ensure that __u* types are actually defined by
including <linux/types.h>.
Signed-off-by: Kevin Brodsky <kevin.brodsky@....com>
---
tools/testing/selftests/mm/pkey-helpers.h | 10 ++++++----
1 file changed, 6 insertions(+), 4 deletions(-)
diff --git a/tools/testing/selftests/mm/pkey-helpers.h b/tools/testing/selftests/mm/pkey-helpers.h
index 472febd992eb..84376ab09545 100644
--- a/tools/testing/selftests/mm/pkey-helpers.h
+++ b/tools/testing/selftests/mm/pkey-helpers.h
@@ -13,13 +13,15 @@
#include <ucontext.h>
#include <sys/mman.h>
+#include <linux/types.h>
+
#include "../kselftest.h"
/* Define some kernel-like types */
-#define u8 __u8
-#define u16 __u16
-#define u32 __u32
-#define u64 __u64
+typedef __u8 u8;
+typedef __u16 u16;
+typedef __u32 u32;
+typedef __u64 u64;
#define PTR_ERR_ENOTSUP ((void *)-ENOTSUP)
--
2.47.0
Powered by blists - more mailing lists