bug fix for 'include/linux/wrapper.h', bad parentheses for macros

From: Kevin Lawton (kevin@mandrakesoft.com)
Date: Sun Oct 29 2000 - 22:05:26 EST


Listed in 2.4 headers as:

        #define mem_map_reserve(p) set_bit(PG_reserved, &p->flags)
        #define mem_map_unreserve(p) clear_bit(PG_reserved, &p->flags)
 
...but should be:
 
        #define mem_map_reserve(p) set_bit(PG_reserved, &((p)->flags))
        #define mem_map_unreserve(p) clear_bit(PG_reserved, &((p)->flags))

Because of the 'void *' nature of the 2nd parameter to set_bit/clear_bit,
the compiler is not picking up this error. Either expression generates
a pointer, but not the same values.

Might as well also wrap the parameter 'p' with parentheses in the
subsequent macros, mem_map_inc_count() and mem_map_dec_count(),
for clarity.

CC me if needed. I'm not on this list.

-Kevin Lawton
Plex86 project
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
Please read the FAQ at http://www.tux.org/lkml/



This archive was generated by hypermail 2b29 : Tue Oct 31 2000 - 21:00:25 EST