From: Richard Cochran <richardcochran@gmail.com>
To: Thomas Gleixner <tglx@linutronix.de>
Cc: LKML <linux-kernel@vger.kernel.org>, John Stultz <johnstul@us.ibm.com>
Subject: Re: [PTP] Implement clock_getres() function correctly
Date: Mon, 5 Dec 2011 08:31:53 +0100 [thread overview]
Message-ID: <20111205073153.GA1460@cherladcori01> (raw)
In-Reply-To: <alpine.LFD.2.02.1112041806550.2735@ionos>
On Sun, Dec 04, 2011 at 06:07:43PM +0100, Thomas Gleixner wrote:
> On Sun, 4 Dec 2011, Thomas Gleixner wrote:
>
> > clock_getres() needs to put the resolution into the provided timespec
> > and return 0 in case of success.
> >
> > Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
> > Cc: stable@vger.kernel.org
>
> Gah, wrong version.
Thanks for spotting that weird left over (from the old posix-timer.c
code).
Acked-by: Richard Cochran <richardcochran@gmail.com>
BTW, my email address has changed. Did you see my patch for
MAINTAINERS a few weeks back? It would help when finding the current
email address.
Thanks,
Richard
> diff --git a/drivers/ptp/ptp_clock.c b/drivers/ptp/ptp_clock.c
> index cf3f999..6b0c02a 100644
> --- a/drivers/ptp/ptp_clock.c
> +++ b/drivers/ptp/ptp_clock.c
> @@ -101,7 +101,10 @@ static s32 scaled_ppm_to_ppb(long ppm)
>
> static int ptp_clock_getres(struct posix_clock *pc, struct timespec *tp)
> {
> - return 1; /* always round timer functions to one nanosecond */
> + /* Resolution is one nanosecond */
> + tp->tv_sec = 0;
> + tp->tv_nsec = 1;
> + return 0;
> }
>
> static int ptp_clock_settime(struct posix_clock *pc, const struct timespec *tp)
>
> --
> To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at http://vger.kernel.org/majordomo-info.html
> Please read the FAQ at http://www.tux.org/lkml/
next prev parent reply other threads:[~2011-12-05 7:32 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-12-04 17:06 Thomas Gleixner
2011-12-04 17:07 ` Thomas Gleixner
2011-12-05 7:31 ` Richard Cochran [this message]
2011-12-05 19:02 ` John Stultz
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=20111205073153.GA1460@cherladcori01 \
--to=richardcochran@gmail.com \
--cc=johnstul@us.ibm.com \
--cc=linux-kernel@vger.kernel.org \
--cc=tglx@linutronix.de \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®