lkml.org 
[lkml]   [2004]   [Aug]   [5]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH][2.6] first/next_cpu returns values > NR_CPUS
OGAWA Hirofumi <hirofumi@mail.parknet.co.jp> wrote:
>
> > #define next_node(n, src) __next_node((n), &(src), MAX_NUMNODES)
> > static inline int __next_node(int n, const nodemask_t *srcp, int nbits)
> > {
> > - return find_next_bit(srcp->bits, nbits, n+1);
> > + return min_t(int, nbits, find_next_bit(srcp->bits, nbits, n+1));
> > }
>
> Shouldn't these use simply min()? I worry min_t() may hide the real bug...

The problem is that on some architectures, find_next_bit() returns an
unsigned long, on others it returns an int and I think some even return a
long.
-
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:04    [from the cache]
©2003-2011 Jasper Spaans