This change is made in preparation for the introduction of a purecap vDSO. The vDSO includes compiler.h; when building for purecap unsigned long will no longer be suitable for storing a pointer value. Replace it with uintptr_t, which can have a variable definition based on the ABI.
Signed-off-by: Aditya Deshpande aditya.deshpande@arm.com --- include/linux/compiler.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/include/linux/compiler.h b/include/linux/compiler.h index d7779a18b24f..7864350d0edb 100644 --- a/include/linux/compiler.h +++ b/include/linux/compiler.h @@ -3,6 +3,7 @@ #define __LINUX_COMPILER_H
#include <linux/compiler_types.h> +#include <linux/types.h>
#ifndef __ASSEMBLY__
@@ -222,7 +223,7 @@ void ftrace_likely_update(struct ftrace_likely_data *f, int val, */ static inline void *offset_to_ptr(const int *off) { - return (void *)((unsigned long)off + *off); + return (void *)((uintptr_t)off + *off); }
#endif /* __ASSEMBLY__ */