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>. Link: https://lkml.kernel.org/r/20241209095019.1732120-8-kevin.brodsky@arm.com Signed-off-by: Kevin Brodsky <kevin.brodsky@arm.com> Cc: Aruna Ramakrishna <aruna.ramakrishna@oracle.com> Cc: Catalin Marinas <catalin.marinas@arm.com> Cc: Dave Hansen <dave.hansen@linux.intel.com> Cc: Joey Gouly <joey.gouly@arm.com> Cc: Keith Lucas <keith.lucas@oracle.com> Cc: Ryan Roberts <ryan.roberts@arm.com> Cc: Shuah Khan <shuah@kernel.org> Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
This commit is contained in:
committed by
Andrew Morton
parent
31fdc9657b
commit
f7ed8331ec
@@ -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)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user