lkml.org 
[lkml]   [2008]   [May]   [12]   [last100]   RSS Feed
Views: [more markup]   [less markup]   [headers]   [forward]  
 
Messages in this thread
/
DateMon, 12 May 2008 14:45:07 -0700
FromAndrew Morton <>
SubjectRe: [PATCH] asm-generic/bitops/fls64.h
On Sun, 04 May 2008 22:58:50 +0400
____________________ ______________ ____________________ <nickolay@protei.ru> wrote:
> bugfix in fls64 on a big endian systems(against 2.6.25).
> 
> Signed-off-by: Nickolay Vinogradov <nickolay@protei.ru>
> 
> --
> 
> diff --git a/include/asm-generic/bitops/fls64.h 
> b/include/asm-generic/bitops/fls64.h
> index 1b6b17c..2eedb6f 100644
> --- a/include/asm-generic/bitops/fls64.h
> +++ b/include/asm-generic/bitops/fls64.h
> @@ -8,7 +8,7 @@ static inline int fls64(__u64 x)
>          __u32 h = x >> 32;
>          if (h)
>                  return fls(h) + 32;
> -       return fls(x);
> +       return fls((__u32)x);
>   }
> 
>   #endif /* _ASM_GENERIC_BITOPS_FLS64_H_ */

Please describe the bug which you are fixing?

Perhaps a more robust fix to <whatever the bug is> would be to
repair fls() so that it works correctly when passed a u64.  Perhaps.


\
 
 \ /
  Last update: 2008-05-12 23:49    [from the cache]
©2003-2008