public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* bug fix for 'include/linux/wrapper.h', bad parentheses for macros
@ 2000-10-30  3:05 Kevin Lawton
  2000-10-30  3:09 ` PATCH 2.4.0.10.6: wrapper.h cleanup Jeff Garzik
  0 siblings, 1 reply; 2+ messages in thread
From: Kevin Lawton @ 2000-10-30  3:05 UTC (permalink / raw)
  To: linux-kernel; +Cc: kevin

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/

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2000-10-30  3:10 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2000-10-30  3:05 bug fix for 'include/linux/wrapper.h', bad parentheses for macros Kevin Lawton
2000-10-30  3:09 ` PATCH 2.4.0.10.6: wrapper.h cleanup Jeff Garzik

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox