public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Kevin Lawton <kevin@mandrakesoft.com>
To: linux-kernel@vger.kernel.org
Cc: kevin@mandrakesoft.com
Subject: bug fix for 'include/linux/wrapper.h', bad parentheses for macros
Date: Sun, 29 Oct 2000 22:05:26 -0500	[thread overview]
Message-ID: <39FCE576.9425F7F5@mandrakesoft.com> (raw)

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/

             reply	other threads:[~2000-10-30  2:05 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2000-10-30  3:05 Kevin Lawton [this message]
2000-10-30  3:09 ` PATCH 2.4.0.10.6: wrapper.h cleanup Jeff Garzik

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=39FCE576.9425F7F5@mandrakesoft.com \
    --to=kevin@mandrakesoft.com \
    --cc=linux-kernel@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox