|
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [PATCH v2 1/2] ubsan: use linux-compat.h
Instead of replacing the s64 (and later also u64) uses, keep the file as
little modified as possible from its Linux origin. (Sadly the two cast
adjustments are needed to avoid compiler warnings.)
Requested-by: Andrew Cooper <andrew.cooper3@xxxxxxxxxx>
Signed-off-by: Jan Beulich <jbeulich@xxxxxxxx>
---
v2: New.
--- a/xen/common/ubsan/ubsan.c
+++ b/xen/common/ubsan/ubsan.c
@@ -20,8 +20,6 @@ static DEFINE_PER_CPU(struct xen_ubsan[1
#undef current
#define current this_cpu(in_ubsan)
#define dump_stack dump_execution_state
-#define u64 long long unsigned int
-#define s64 long long int
#include "ubsan.h"
@@ -141,10 +139,11 @@ static void val_to_string(char *str, siz
#endif
} else if (type_is_signed(type)) {
scnprintf(str, size, "%lld",
- (s64)get_signed_val(type, value));
+ (long long)get_signed_val(type, value));
} else {
scnprintf(str, size, "%llu",
- (u64)get_unsigned_val(type, value));
+ (unsigned long long)get_unsigned_val(type,
+ value));
}
}
}
--- a/xen/common/ubsan/ubsan.h
+++ b/xen/common/ubsan/ubsan.h
@@ -1,6 +1,8 @@
#ifndef _LIB_UBSAN_H
#define _LIB_UBSAN_H
+#include <xen/linux-compat.h>
+
enum {
type_kind_int = 0,
type_kind_float = 1,
|
![]() |
Lists.xenproject.org is hosted with RackSpace, monitoring our |