Messages in this thread |  | | | Date | Thu, 5 Aug 2004 10:42:36 -0700 | | From | Andrew Morton <> | | Subject | Re: [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/
|  |