linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Alexey Dobriyan <adobriyan@gmail.com>
To: domen@coderock.org
Cc: rth@twiddle.net, linux-kernel@vger.kernel.org,
	Nishanth Aravamudan <nacc@us.ibm.com>
Subject: Re: [patch 1/1] alpha/osf_sys: use helper functions to convert between tv and jiffies
Date: Sat, 14 May 2005 15:27:28 +0400	[thread overview]
Message-ID: <200505141527.28900.adobriyan@gmail.com> (raw)
In-Reply-To: <20050513214432.640931000@nd47.coderock.org>

On Saturday 14 May 2005 01:44, domen@coderock.org wrote:
> Use helper functions to convert between timeval structure and jiffies
> rather than custom logic.

> --- quilt.orig/arch/alpha/kernel/osf_sys.c
> +++ quilt/arch/alpha/kernel/osf_sys.c

> -	ticks = tmp.tv_usec;
> -	ticks = (ticks + (1000000 / HZ) - 1) / (1000000 / HZ);
> -	ticks += tmp.tv_sec * HZ;
> +	ticks = timeval_to_jiffies(&tmp);

> -		tmp.tv_sec = ticks / HZ;
> -		tmp.tv_usec = ticks % HZ;
> +		jiffies_to_timeval(ticks, &tmp);

Nitpicking comment: both timeval_to_jiffies and jiffies_to_timeval are
prototyped in include/linux/jiffies.h. However, arch/alpha/kernel/osf_sys.c
doesn't directly #include it. 

      reply	other threads:[~2005-05-14 11:23 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-05-13 21:44 [patch 1/1] alpha/osf_sys: use helper functions to convert between tv and jiffies domen
2005-05-14 11:27 ` Alexey Dobriyan [this message]

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=200505141527.28900.adobriyan@gmail.com \
    --to=adobriyan@gmail.com \
    --cc=domen@coderock.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=nacc@us.ibm.com \
    --cc=rth@twiddle.net \
    /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;
as well as URLs for NNTP newsgroup(s).