lkml.org 
[lkml]   [2012]   [Jul]   [5]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
Date
SubjectRe: [PATCH 01/10] random: make 'add_interrupt_randomness()' do something sane
On Thu, Jul 5, 2012 at 3:00 PM, Theodore Ts'o <tytso@mit.edu> wrote:
>
> Like this?

Looks fine to me.

Although I think it might be better to stay closer to what we used to
do, and just 'or' in the action flags rather than make it some
conditional. And then at the end, do

if (!(flags & __IRQF_TIMER))
add_interrupt_randomness(irq)

instead on that or'ed flags value. Otherwise gcc will create silly
conditional moves (or worse still, conditional branches) just for that
"random" variable assignment.

Linus


\
 
 \ /
  Last update: 2012-07-06 00:41    [W:0.049 / U:1.240 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site