lkml.org 
[lkml]   [2005]   [Jul]   [29]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    /
    Date
    From
    SubjectRe: Linux 2.6.13-rc4 (snd-cs46xx)
    On Fri, 29 Jul 2005, Linus Torvalds wrote:

    > Thanks. Just out of interest, does this patch fix it instead?

    Indeed it does, thanks Linus!

    -cp

    > ----
    > diff --git a/include/asm-i386/bitops.h b/include/asm-i386/bitops.h
    > --- a/include/asm-i386/bitops.h
    > +++ b/include/asm-i386/bitops.h
    > @@ -335,14 +335,13 @@ static inline unsigned long __ffs(unsign
    > static inline int find_first_bit(const unsigned long *addr, unsigned size)
    > {
    > int x = 0;
    > - do {
    > - if (*addr)
    > - return __ffs(*addr) + x;
    > - addr++;
    > - if (x >= size)
    > - break;
    > +
    > + while (x < size) {
    > + unsigned long val = *addr++;
    > + if (val)
    > + return __ffs(val) + x;
    > x += (sizeof(*addr)<<3);
    > - } while (1);
    > + }
    > return x;
    > }
    >
    >

    --
    "Democracy can learn some things from Communism; for example,
    when a Communist politician is through, he is through."
    -- Unknown
    -
    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-07-29 19:52    [W:0.037 / U:0.352 seconds]
    ©2003-2016 Jasper Spaans. hosted at Digital OceanAdvertise on this site