mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Andreas Mohr <andi@lisas.de>
To: Andreas Mohr <andi@lisas.de>
Cc: Marcin Slusarz <marcin.slusarz@gmail.com>,
	Guennadi Liakhovetski <g.liakhovetski@gmx.de>,
	Mauro Carvalho Chehab <mchehab@infradead.org>,
	Luca Risolia <luca.risolia@studio.unibo.it>,
	linux-media@vger.kernel.org, LKML <linux-kernel@vger.kernel.org>,
	jirislaby@gmail.com
Subject: Re: V4L2 drivers: potentially dangerous and inefficient msecs_to_jiffies() calculation
Date: Sat, 19 Sep 2009 12:08:09 +0200	[thread overview]
Message-ID: <20090919100809.GA22683@rhlx01.hs-esslingen.de> (raw)
In-Reply-To: <20090915192146.GA18002@rhlx01.hs-esslingen.de>

Hi,

On Tue, Sep 15, 2009 at 09:21:46PM +0200, Andreas Mohr wrote:
> Hi,
> 
> On Tue, Sep 15, 2009 at 09:14:19PM +0200, Marcin Slusarz wrote:
> > Or better: frame_timeout * HZ
> 
> D'oh! ;-)
> 
> But then what about the other 3 bazillion places in the kernel
> doing multiples of seconds?
> 
> linux-2.6.31]$ find . -name "*.c"|xargs grep msecs_to_jiffies|grep 1000|wc -l
> 73
> 
> If this expression is really better (also/especially from a maintenance POV),
> then it should get changed.

I just saw that my unmodified patch has been committed.
I think that that is ok or even preferrable, since "HZ" is a lot
less greppable (you'd have to use "\<HZ\>") or uniform than msecs_to_jiffies.
In terms of "number of traps avoided" the expressions should be equivalent.

Thanks!

Andreas Mohr

      reply	other threads:[~2009-09-19 10:08 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-09-14 21:07 Andreas Mohr
2009-09-14 21:34 ` Jiri Slaby
2009-09-14 21:39   ` Andreas Mohr
2009-09-14 21:50     ` Jiri Slaby
2009-09-14 22:13       ` Andreas Mohr
2009-09-14 21:47 ` Trent Piepho
2009-09-15 19:14 ` Marcin Slusarz
2009-09-15 19:21   ` Andreas Mohr
2009-09-19 10:08     ` Andreas Mohr [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=20090919100809.GA22683@rhlx01.hs-esslingen.de \
    --to=andi@lisas.de \
    --cc=g.liakhovetski@gmx.de \
    --cc=jirislaby@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-media@vger.kernel.org \
    --cc=luca.risolia@studio.unibo.it \
    --cc=marcin.slusarz@gmail.com \
    --cc=mchehab@infradead.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

all inboxes | Powered by JetHome®