public inbox for netdev@vger.kernel.org 
 help / color / mirror / Atom feed
From: Joe Perches <joe@perches•com>
To: Guenter Roeck <linux@roeck-us•net>
Cc: David Miller <davem@davemloft•net>,
	hofrat@osadl•org, samuel@sortiz•org, netdev@vger•kernel.org,
	linux-kernel@vger•kernel.org
Subject: Re: [PATCH] irda: irda-usb: use msecs_to_jiffies for conversions
Date: Tue, 19 May 2015 20:57:17 -0700	[thread overview]
Message-ID: <1432094237.2870.262.camel@perches.com> (raw)
In-Reply-To: <20150520014408.GA19321@roeck-us.net>

On Tue, 2015-05-19 at 18:44 -0700, Guenter Roeck wrote:
> On Tue, May 19, 2015 at 02:09:07PM -0700, Joe Perches wrote:
> > The other thing that could be done is to use
> > 	max(1ul, msecs_to_jiffies())
> > so that there's always some delay even if HZ <= 50
> > 
> I may be mistaken, but I am quite sure that msecs_to_jiffies() always returns
> at least 1 in such situations. Otherwise there would be lots of conversions
> to 0 in the kernel.

Thanks Guenter

Nope, you're not mistaken.

Non 0 constants always return a value > 0

The existing uses like max(1ul, msecs_to_jiffies(<variable>))
just guard against <variable> being 0.

  reply	other threads:[~2015-05-20  3:57 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-05-19 10:51 [PATCH] irda: irda-usb: use msecs_to_jiffies for conversions Nicholas Mc Guire
2015-05-19 14:32 ` Joe Perches
2015-05-19 20:45   ` David Miller
2015-05-19 21:09     ` Joe Perches
2015-05-20  1:44       ` Guenter Roeck
2015-05-20  3:57         ` Joe Perches [this message]
  -- strict thread matches above, loose matches on Subject: below --
2015-05-23 12:46 Nicholas Mc Guire
2015-05-25 21:39 ` David Miller

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=1432094237.2870.262.camel@perches.com \
    --to=joe@perches$(echo .)com \
    --cc=davem@davemloft$(echo .)net \
    --cc=hofrat@osadl$(echo .)org \
    --cc=linux-kernel@vger$(echo .)kernel.org \
    --cc=linux@roeck-us$(echo .)net \
    --cc=netdev@vger$(echo .)kernel.org \
    --cc=samuel@sortiz$(echo .)org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html
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