All of lore.kernel.org
 help / color / mirror / Atom feed
* Re: [xen-tip:for-linus-4.5 12/12] arch/x86/xen/time.c:170:12: error: incompatible types when assigning to type 'struct timespec' from type 'struct timespec64'
       [not found] <201511242041.nHIbGwHz%fengguang.wu@intel.com>
@ 2015-11-24 14:36 ` Stefano Stabellini
  2015-11-24 14:46   ` Boris Ostrovsky
  0 siblings, 1 reply; 3+ messages in thread
From: Stefano Stabellini @ 2015-11-24 14:36 UTC (permalink / raw)
  To: kbuild test robot
  Cc: Boris Ostrovsky, xen-devel, kbuild-all, Stefano Stabellini

On Tue, 24 Nov 2015, kbuild test robot wrote:
    arch/x86/xen/time.c: In function 'xen_pvclock_gtod_notify':
> >> 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)
>                       ^
> >> 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

Signed-off-by: Stefano Stabellini <stefano.stabellini@eu.citrix.com>

diff --git a/arch/x86/xen/time.c b/arch/x86/xen/time.c
index 4b8af45..a0a4e55 100644
--- a/arch/x86/xen/time.c
+++ b/arch/x86/xen/time.c
@@ -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 && timespec_compare(&now, &next_sync) < 0)
+	if (!was_set && timespec64_compare(&now, &next_sync) < 0)
 		return NOTIFY_OK;
 
 again:

^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [xen-tip:for-linus-4.5 12/12] arch/x86/xen/time.c:170:12: error: incompatible types when assigning to type 'struct timespec' from type 'struct timespec64'
  2015-11-24 14:36 ` [xen-tip:for-linus-4.5 12/12] arch/x86/xen/time.c:170:12: error: incompatible types when assigning to type 'struct timespec' from type 'struct timespec64' Stefano Stabellini
@ 2015-11-24 14:46   ` Boris Ostrovsky
  2015-11-24 14:54     ` Stefano Stabellini
  0 siblings, 1 reply; 3+ messages in thread
From: Boris Ostrovsky @ 2015-11-24 14:46 UTC (permalink / raw)
  To: Stefano Stabellini, kbuild test robot; +Cc: xen-devel, kbuild-all



On 11/24/2015 09:36 AM, Stefano Stabellini wrote:
> On Tue, 24 Nov 2015, kbuild test robot wrote:
>      arch/x86/xen/time.c: In function 'xen_pvclock_gtod_notify':
>>>> 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)
>>                        ^
>>>> 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


>
> ---
>
> xen/x86: convert remaining timespec to timespec64 in xen_pvclock_gtod_notify
>
> Signed-off-by: Stefano Stabellini <stefano.stabellini@eu.citrix.com>
>
> diff --git a/arch/x86/xen/time.c b/arch/x86/xen/time.c
> index 4b8af45..a0a4e55 100644
> --- a/arch/x86/xen/time.c
> +++ b/arch/x86/xen/time.c
> @@ -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 && timespec_compare(&now, &next_sync) < 0)
> +	if (!was_set && timespec64_compare(&now, &next_sync) < 0)
>   		return NOTIFY_OK;
>   
>   again:
>
>

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [xen-tip:for-linus-4.5 12/12] arch/x86/xen/time.c:170:12: error: incompatible types when assigning to type 'struct timespec' from type 'struct timespec64'
  2015-11-24 14:46   ` Boris Ostrovsky
@ 2015-11-24 14:54     ` Stefano Stabellini
  0 siblings, 0 replies; 3+ messages in thread
From: Stefano Stabellini @ 2015-11-24 14:54 UTC (permalink / raw)
  To: Boris Ostrovsky
  Cc: xen-devel, kbuild test robot, kbuild-all, Stefano Stabellini

On Tue, 24 Nov 2015, Boris Ostrovsky wrote:
> > On Tue, 24 Nov 2015, kbuild test robot wrote:
> >      arch/x86/xen/time.c: In function 'xen_pvclock_gtod_notify':
> > > > > 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)
> > >                        ^
> > > > > 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)

Done, thanks!

> > 
> > ---
> > 
> > xen/x86: convert remaining timespec to timespec64 in xen_pvclock_gtod_notify
> > 
> > Signed-off-by: Stefano Stabellini <stefano.stabellini@eu.citrix.com>
> > 
> > diff --git a/arch/x86/xen/time.c b/arch/x86/xen/time.c
> > index 4b8af45..a0a4e55 100644
> > --- a/arch/x86/xen/time.c
> > +++ b/arch/x86/xen/time.c
> > @@ -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 && timespec_compare(&now, &next_sync) < 0)
> > +	if (!was_set && timespec64_compare(&now, &next_sync) < 0)
> >   		return NOTIFY_OK;
> >     again:
> > 
> > 
> 

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2015-11-24 14:54 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
     [not found] <201511242041.nHIbGwHz%fengguang.wu@intel.com>
2015-11-24 14:36 ` [xen-tip:for-linus-4.5 12/12] arch/x86/xen/time.c:170:12: error: incompatible types when assigning to type 'struct timespec' from type 'struct timespec64' Stefano Stabellini
2015-11-24 14:46   ` Boris Ostrovsky
2015-11-24 14:54     ` Stefano Stabellini

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.