[PATCH 2.6.8.1 1/2] cpumask_t allows more than BITS_PER_LONG # CPUs
Tom Rini <[email protected]> Wed, 13 Oct 2004 09:33:09 -0700
| Newsgroups | gmane.linux.ports.sh.devel,gmane.linux.ports.sh.general |
|---|---|
| Message-ID | <[email protected]> |
AFAICT, this warning has been around for some time. And since it adds a lot of noise to the build, I went and fixed it. A while ago now, cpumask_t was expanded to allow more than BITS_PER_LONG # of CPUs. One of the changes was that find_first_zero_bit / find_next_bit / sched_find_first_bit /etc went from taking a void* to a const ulong*. This makes that simple change. I'll commit to CVS if no one objects. Signed-off-by: Tom Rini <[email protected]> --- linux-2.6.8.1.orig/include/asm-sh/bitops.h +++ linux-2.6.8.1/include/asm-sh/bitops.h @@ -212,7 +212,7 @@ static __inline__ unsigned long __ffs(un * @offset: The bitnumber to start searching at * @size: The maximum size to search */ -static __inline__ unsigned long find_next_bit(unsigned long *addr, +static __inline__ unsigned long find_next_bit(const unsigned long *addr, unsigned long size, unsigned long offset) { unsigned int *p = ((unsigned int *) addr) + (offset >> 5); @@ -262,9 +262,9 @@ found_middle: #define find_first_bit(addr, size) \ find_next_bit((addr), (size), 0) -static __inline__ int find_next_zero_bit(void *addr, int size, int offset) +static __inline__ int find_next_zero_bit(const unsigned long *addr, int size, int offset) { - unsigned long *p = ((unsigned long *) addr) + (offset >> 5); + const unsigned long *p = ((unsigned long *) addr) + (offset >> 5); unsigned long result = offset & ~31UL; unsigned long tmp; @@ -325,7 +325,7 @@ found_middle: * bits is cleared. */ -static inline int sched_find_first_bit(unsigned long *b) +static inline int sched_find_first_bit(const unsigned long *b) { if (unlikely(b[0])) return __ffs(b[0]); -- Tom Rini http://gate.crashing.org/~trini/ ------------------------------------------------------- This SF.net email is sponsored by: IT Product Guide on ITManagersJournal Use IT products in your business? Tell us what you think of them. Give us Your Opinions, Get Free ThinkGeek Gift Certificates! Click to find out more http://productguide.itmanagersjournal.com/guidepromo.tmpl