diff options
author | Arnd Bergmann <arnd@arndb.de> | 2017-06-08 10:53:10 +0200 |
---|---|---|
committer | Stefano Stabellini <sstabellini@kernel.org> | 2017-06-09 00:07:38 +0200 |
commit | 9cc91f212111cdcbefa02dcdb7dd443f224bf52c (patch) | |
tree | f72416924479a8f9fba793a1a6c0844761dde545 /arch/arm | |
parent | xen: fix HYPERVISOR_dm_op() prototype (diff) | |
download | linux-9cc91f212111cdcbefa02dcdb7dd443f224bf52c.tar.xz linux-9cc91f212111cdcbefa02dcdb7dd443f224bf52c.zip |
xen: avoid type warning in xchg_xen_ulong
The improved type-checking version of container_of() triggers a warning for
xchg_xen_ulong, pointing out that 'xen_ulong_t' is unsigned, but atomic64_t
contains a signed value:
drivers/xen/events/events_2l.c: In function 'evtchn_2l_handle_events':
drivers/xen/events/events_2l.c:187:1020: error: call to '__compiletime_assert_187' declared with attribute error: pointer type mismatch in container_of()
This adds a cast to work around the warning.
Cc: Ian Abbott <abbotti@mev.co.uk>
Fixes: 85323a991d40 ("xen: arm: mandate EABI and use generic atomic operations.")
Fixes: daa2ac80834d ("kernel.h: handle pointers to arrays better in container_of()")
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Stefano Stabellini <sstabellini@kernel.org>
Reviewed-by: Stefano Stabellini <sstabellini@kernel.org>
Acked-by: Ian Abbott <abbotti@mev.co.uk>
Diffstat (limited to 'arch/arm')
-rw-r--r-- | arch/arm/include/asm/xen/events.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/arch/arm/include/asm/xen/events.h b/arch/arm/include/asm/xen/events.h index 71e473d05fcc..620dc75362e5 100644 --- a/arch/arm/include/asm/xen/events.h +++ b/arch/arm/include/asm/xen/events.h @@ -16,7 +16,7 @@ static inline int xen_irqs_disabled(struct pt_regs *regs) return raw_irqs_disabled_flags(regs->ARM_cpsr); } -#define xchg_xen_ulong(ptr, val) atomic64_xchg(container_of((ptr), \ +#define xchg_xen_ulong(ptr, val) atomic64_xchg(container_of((long long*)(ptr),\ atomic64_t, \ counter), (val)) |