arch/x86/xen/time.c:170:12: error: incompatible types when assigning to type 'struct timespec' from type 'struct timespec64'
Subsystems (2)
A message that is not in the archive (sent off-list or not yet received): 201511242041.nHIbGwHz%[email protected]
On Tue, 24 Nov 2015, kbuild test robot wrote:
arch/x86/xen/time.c: In function 'xen_pvclock_gtod_notify':
Quoted 16 lines
Quoted 1 line
Quoted 1 line
arch/x86/xen/time.c:139:35: warning: passing argument 1 of 'timespec_compare' from incompatible pointer type [-Wincompatible-pointer-types]if (!was_set && timespec_compare(&now, &next_sync) < 0) ^ In file included from include/linux/ktime.h:24:0, from include/linux/timer.h:5, from include/linux/workqueue.h:8, from include/linux/pm.h:25, from arch/x86/include/asm/apic.h:5, from arch/x86/include/asm/smp.h:12, from include/linux/smp.h:59, from include/linux/percpu.h:6, from include/linux/context_tracking_state.h:4, from include/linux/vtime.h:4, from include/linux/hardirq.h:7, from include/linux/interrupt.h:12, from arch/x86/xen/time.c:11:
Quoted 5 lines
include/linux/time.h:24:19: note: expected 'const struct timespec *' but argument is of type 'struct timespec64 *'
static inline inttimespec_compare(const struct timespec *lhs, const struct timespec *rhs)
^Quoted 1 line
Quoted 1 line
arch/x86/xen/time.c:170:12: error: incompatible types when assigning to type 'struct timespec' from type 'struct timespec64'next_sync = now;
This robot is awesome
The appended patch fixes the issue. Boris, if you are OK with it, I'll queue it up on for-linus-4.5.
---
xen/x86: convert remaining timespec to timespec64 in xen_pvclock_gtod_notify
arch/x86/xen/time.c +2 -2
@@ -121,7 +121,7 @@ static int xen_pvclock_gtod_notify(struct notifier_block *nb, unsigned long was_set, void *priv) {/* Protected by the calling core code serialization */ -static struct timespec next_sync; +static struct timespec64 next_sync;struct xen_platform_op op;struct timespec64 now;
@@ -136,7 +136,7 @@ static int xen_pvclock_gtod_notify(struct notifier_block *nb,* We only take the expensive HV call when the clock was set * or when the 11 minutes RTC synchronization time elapsed. */ -if (!was_set &×pec_compare (&now, &next_sync) <0 ) +if (!was_set &×pec64_compare (&now, &next_sync) <0 )return NOTIFY_OK ; again:
Boris Ostrovsky
reviewerQuoted 21 lines · Stefano Stabellini
On Tue, 24 Nov 2015, kbuild test robot wrote:
arch/x86/xen/time.c: In function 'xen_pvclock_gtod_notify':Quoted 19 lines
Quoted 1 line
Quoted 1 line
arch/x86/xen/time.c:139:35: warning: passing argument 1 of 'timespec_compare' from incompatible pointer type [-Wincompatible-pointer-types]if (!was_set && timespec_compare(&now, &next_sync) < 0) ^ In file included from include/linux/ktime.h:24:0, from include/linux/timer.h:5, from include/linux/workqueue.h:8, from include/linux/pm.h:25, from arch/x86/include/asm/apic.h:5, from arch/x86/include/asm/smp.h:12, from include/linux/smp.h:59, from include/linux/percpu.h:6, from include/linux/context_tracking_state.h:4, from include/linux/vtime.h:4, from include/linux/hardirq.h:7, from include/linux/interrupt.h:12, from arch/x86/xen/time.c:11: include/linux/time.h:24:19: note: expected 'const struct timespec *' but argument is of type 'struct timespec64 *' static inline int timespec_compare(const struct timespec *lhs, const struct timespec *rhs) ^
Quoted 6 lines
Quoted 2 lines
Quoted 1 line
Quoted 1 line
arch/x86/xen/time.c:170:12: error: incompatible types when assigning to type 'struct timespec' from type 'struct timespec64'next_sync = now;This robot is awesome
The appended patch fixes the issue. Boris, if you are OK with it, I'll queue it up on for-linus-4.5.
Sure (you can add a Reviewed-by tag if you feel it's needed)
-boris
Quoted 31 lines
---
xen/x86: convert remaining timespec to timespec64 in
xen_pvclock_gtod_notifySigned-off-by Stefano Stabellini <[email protected]>arch/x86/xen/time.c +2
-2@@ -121,7 +121,7 @@ static int xen_pvclock_gtod_notify(struct notifier_block *nb, unsigned long was_set, void *priv) {/* Protected by the calling core code serialization */ -static struct timespec next_sync; +static struct timespec64 next_sync;struct xen_platform_op op;struct timespec64 now;@@ -136,7 +136,7 @@ static int xen_pvclock_gtod_notify(struct notifier_block *nb,* We only take the expensive HV call when the clock was set * or when the 11 minutes RTC synchronization time elapsed. */ -if (!was_set &×pec_compare (&now, &next_sync) <0 ) +if (!was_set &×pec64_compare (&now, &next_sync) <0 )return NOTIFY_OK ; again:
Quoted 27 lines · Boris Ostrovsky
Quoted 27 lines · kbuild test robot
arch/x86/xen/time.c: In function 'xen_pvclock_gtod_notify':Quoted 25 lines
Quoted 3 lines
Quoted 3 lines
arch/x86/xen/time.c:139:35: warning: passing argument 1 of 'timespec_compare' from incompatible pointer type [-Wincompatible-pointer-types]if (!was_set && timespec_compare(&now, &next_sync) < 0) ^ In file included from include/linux/ktime.h:24:0, from include/linux/timer.h:5, from include/linux/workqueue.h:8, from include/linux/pm.h:25, from arch/x86/include/asm/apic.h:5, from arch/x86/include/asm/smp.h:12, from include/linux/smp.h:59, from include/linux/percpu.h:6, from include/linux/context_tracking_state.h:4, from include/linux/vtime.h:4, from include/linux/hardirq.h:7, from include/linux/interrupt.h:12, from arch/x86/xen/time.c:11: include/linux/time.h:24:19: note: expected 'const struct timespec *' but argument is of type 'struct timespec64 *' static inline int timespec_compare(const struct timespec *lhs, const struct timespec *rhs) ^Quoted 2 lines
Quoted 2 lines
arch/x86/xen/time.c:170:12: error: incompatible types when assigning to type 'struct timespec' from type 'struct timespec64'
Quoted 8 lines
Quoted 5 lines
Quoted 1 line
next_sync = now;This robot is awesome
The appended patch fixes the issue. Boris, if you are OK with it, I'll queue it up on for-linus-4.5.
Sure (you can add a Reviewed-by tag if you feel it's needed)
Done, thanks!
Quoted 32 lines
Quoted 31 lines
---
xen/x86: convert remaining timespec to timespec64 in
xen_pvclock_gtod_notifySigned-off-by Stefano Stabellini <[email protected]>arch/x86/xen/time.c +2
-2@@ -121,7 +121,7 @@ static int xen_pvclock_gtod_notify(struct notifier_block *nb, unsigned long was_set, void *priv) {/* Protected by the calling core code serialization */ -static struct timespec next_sync; +static struct timespec64 next_sync;struct xen_platform_op op;struct timespec64 now;@@ -136,7 +136,7 @@ static int xen_pvclock_gtod_notify(struct notifier_block*nb, * We only take the expensive HV call when the clock was set * or when the 11 minutes RTC synchronization time elapsed. */ -if (!was_set &×pec_compare (&now, &next_sync) <0 ) +if (!was_set &×pec64_compare (&now, &next_sync) <0 )return NOTIFY_OK ; again: