lkml.org 
[lkml]   [2004]   [Apr]   [22]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    Patch in this message
    /
    SubjectRe: [PATCH] Driver Core fixes for 2.6.6-rc2
    Date
    From
    ChangeSet 1.1928, 2004/04/22 14:36:55-07:00, lkml@lievin.net

    [PATCH] tipar char driver: wrong timeout value

    this patch (2.4 & 2.6) fixes a bug about the timeout value. The formula
    used to calculate jiffies from timeout is wrong.
    The new formula is ok and takes care of integer computation/rounding.
    There is the same bug in the tiglusb.c module which will be fixed by another
    patch.


    drivers/char/tipar.c | 2 +-
    1 files changed, 1 insertion(+), 1 deletion(-)


    diff -Nru a/drivers/char/tipar.c b/drivers/char/tipar.c
    --- a/drivers/char/tipar.c Thu Apr 22 15:27:12 2004
    +++ b/drivers/char/tipar.c Thu Apr 22 15:27:12 2004
    @@ -121,7 +121,7 @@

    /* ----- global defines ----------------------------------------------- */

    -#define START(x) { x=jiffies+HZ/(timeout/10); }
    +#define START(x) { x = jiffies + (HZ * timeout) / 10; }
    #define WAIT(x) { \
    if (time_before((x), jiffies)) return -1; \
    if (need_resched()) schedule(); }
    -
    To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
    the body of a message to majordomo@vger.kernel.org
    More majordomo info at http://vger.kernel.org/majordomo-info.html
    Please read the FAQ at http://www.tux.org/lkml/

    \
     
     \ /
      Last update: 2005-03-22 14:02    [W:3.449 / U:0.008 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site