Netdev List
 help / color / mirror / Atom feed
From: Herbert Xu <herbert@gondor.apana.org.au>
To: jamal <hadi@cyberus.ca>
Cc: "David S. Miller" <davem@davemloft.net>, netdev@vger.kernel.org
Subject: Re: [PATCH][IPSEC]: Aggregate make_jiffies
Date: Wed, 16 Aug 2006 12:33:49 +1000	[thread overview]
Message-ID: <20060816023349.GA24174@gondor.apana.org.au> (raw)
In-Reply-To: <1155693500.5122.39.camel@jzny2>

On Tue, Aug 15, 2006 at 09:58:19PM -0400, jamal wrote:
>
> diff --git a/include/net/xfrm.h b/include/net/xfrm.h
> index 8123d49..05444dd 100644
> --- a/include/net/xfrm.h
> +++ b/include/net/xfrm.h
> @@ -619,6 +619,14 @@ xfrm_state_addr_cmp(struct xfrm_tmpl *tm
>  	return !0;
>  }
>  
> +static inline unsigned long make_jiffies(long secs)
> +{
> +	if (secs >= (MAX_SCHEDULE_TIMEOUT-1)/HZ)
> +		return MAX_SCHEDULE_TIMEOUT-1;
> +	else
> +		return secs*HZ;
> +}

This name is probably too generic for net/xfrm.h.  How about moving
it to linux/jiffies.h and rewrite in the style of msec_to_jiffies?

Cheers,
-- 
Visit Openswan at http://www.openswan.org/
Email: Herbert Xu ~{PmV>HI~} <herbert@gondor.apana.org.au>
Home Page: http://gondor.apana.org.au/~herbert/
PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt

  reply	other threads:[~2006-08-16  2:34 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-08-16  1:58 [PATCH][IPSEC]: Aggregate make_jiffies jamal
2006-08-16  2:33 ` Herbert Xu [this message]
2006-08-16  2:59   ` jamal
2006-08-16 13:13     ` jamal
2006-08-16 13:24       ` Herbert Xu

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=20060816023349.GA24174@gondor.apana.org.au \
    --to=herbert@gondor.apana.org.au \
    --cc=davem@davemloft.net \
    --cc=hadi@cyberus.ca \
    --cc=netdev@vger.kernel.org \
    /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