[lkml]   [2009]   [Sep]   [14]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
    SubjectV4L2 drivers: potentially dangerous and inefficient msecs_to_jiffies() calculation
    Hi all,

    cam->module_param.frame_timeout *
    1000 * msecs_to_jiffies(1) );
    multiple times each.
    What they should do instead is
    frame_timeout * msecs_to_jiffies(1000), I'd think.
    msecs_to_jiffies(1) is quite a bit too boldly assuming
    that all of the msecs_to_jiffies(x) implementation branches
    always round up.

    Not to mention that the current implementation needs one additional
    multiplication operation as opposed to constant-aggregating it into the
    msecs_to_jiffies() argument and thus nicely evaporating it into nirvana.


    Andreas Mohr

     \ /
      Last update: 2009-09-14 23:11    [W:0.034 / U:0.024 seconds]
    ©2003-2016 Jasper Spaans. hosted at Digital OceanAdvertise on this site