From: Boris Ostrovsky <boris.ostrovsky@oracle.com>
To: Stefano Stabellini <stefano.stabellini@eu.citrix.com>,
kbuild test robot <fengguang.wu@intel.com>
Cc: xen-devel@lists.xensource.com, kbuild-all@01.org
Subject: 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'
Date: Tue, 24 Nov 2015 09:46:36 -0500 [thread overview]
Message-ID: <5654784C.4090307@oracle.com> (raw)
In-Reply-To: <alpine.DEB.2.02.1511241434290.1107@kaball.uk.xensource.com>
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:
>
>
next prev parent reply other threads:[~2015-11-24 14:46 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
[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 [this message]
2015-11-24 14:54 ` Stefano Stabellini
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=5654784C.4090307@oracle.com \
--to=boris.ostrovsky@oracle.com \
--cc=fengguang.wu@intel.com \
--cc=kbuild-all@01.org \
--cc=stefano.stabellini@eu.citrix.com \
--cc=xen-devel@lists.xensource.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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.