From: Andrew Morton <akpm@osdl.org>
To: Zwane Mwaikambo <zwane@arm.linux.org.uk>
Cc: linux-kernel@vger.kernel.org
Subject: Re: [PATCH][2.6] constant_test_bit doesn't like my gcc
Date: Wed, 15 Oct 2003 21:21:34 -0700 [thread overview]
Message-ID: <20031015212134.41a427d3.akpm@osdl.org> (raw)
In-Reply-To: <Pine.LNX.4.53.0310160008530.2328@montezuma.fsmlabs.com>
Zwane Mwaikambo <zwane@arm.linux.org.uk> wrote:
>
> > The volatile is rather important.
>
> Good point, how about;
>
> Index: linux-2.6.0-test7-mm1/include/asm-i386/bitops.h
> ===================================================================
> RCS file: /build/cvsroot/linux-2.6.0-test7-mm1/include/asm-i386/bitops.h,v
> retrieving revision 1.1.1.1
> diff -u -p -B -r1.1.1.1 bitops.h
> --- linux-2.6.0-test7-mm1/include/asm-i386/bitops.h 15 Oct 2003 09:02:10 -0000 1.1.1.1
> +++ linux-2.6.0-test7-mm1/include/asm-i386/bitops.h 16 Oct 2003 04:10:37 -0000
> @@ -241,7 +241,7 @@ static int test_bit(int nr, const volati
>
> static __inline__ int constant_test_bit(int nr, const volatile unsigned long * addr)
> {
> - return ((1UL << (nr & 31)) & (((const volatile unsigned int *) addr)[nr >> 5])) != 0;
> + return ((1UL << (nr & 31)) & (addr[nr >> 5])) != 0;
> }
>
Looks fine. Does your compiler get this right?
next prev parent reply other threads:[~2003-10-16 4:17 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2003-10-16 3:13 Zwane Mwaikambo
2003-10-16 4:10 ` Andrew Morton
2003-10-16 4:12 ` Zwane Mwaikambo
2003-10-16 4:21 ` Andrew Morton [this message]
2003-10-16 4:22 ` Zwane Mwaikambo
2003-10-16 10:55 ` Ingo Oeser
2003-10-16 14:55 ` Andrew Morton
2003-10-16 21:58 ` bill davidsen
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=20031015212134.41a427d3.akpm@osdl.org \
--to=akpm@osdl.org \
--cc=linux-kernel@vger.kernel.org \
--cc=zwane@arm.linux.org.uk \
/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
all inboxes | Powered by JetHome®