public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: David Woodhouse <dwmw2@infradead.org>
To: torvalds@transmeta.com
Cc: linux-kernel@vger.kernel.org
Subject: bitops.h ifdef __KERNEL__ cleanup.
Date: Wed, 18 Jul 2001 23:54:36 +0100	[thread overview]
Message-ID: <27472.995496876@redhat.com> (raw)

Not all architectures put clear_bit et al in asm/bitops.h in a form which 
is usable from userspace. Yet because it happens to work on a PeeCee, 
people do it anyway. 

There's a simple way to fix that :)

Index: include/asm-i386/bitops.h
===================================================================
RCS file: /inst/cvs/linux/include/asm-i386/bitops.h,v
retrieving revision 1.2.2.7
diff -u -r1.2.2.7 bitops.h
--- include/asm-i386/bitops.h	2001/06/02 16:27:54	1.2.2.7
+++ include/asm-i386/bitops.h	2001/07/18 22:52:11
@@ -7,6 +7,8 @@
 
 #include <linux/config.h>
 
+#ifdef __KERNEL__
+
 /*
  * These have to be done with inline assembly: that way the bit-setting
  * is guaranteed to be atomic. All bit operations return 0 if the bit
@@ -329,8 +331,6 @@
 		:"r" (~word));
 	return word;
 }
-
-#ifdef __KERNEL__
 
 /**
  * ffs - find first bit set

--
dwmw2



             reply	other threads:[~2001-07-18 22:54 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2001-07-18 22:54 David Woodhouse [this message]
  -- strict thread matches above, loose matches on Subject: below --
2001-07-19 12:54 bitops.h ifdef __KERNEL__ cleanup Petr Vandrovec
2001-07-19 11:48 ` Russell King
2001-07-19 19:21 Petr Vandrovec
2001-07-19 18:37 ` Russell King
2001-07-19 21:53 ` David Woodhouse
2001-07-20  4:18   ` H. Peter Anvin
2001-07-21  6:41     ` Jeff Garzik
2001-07-27  5:05       ` Eric W. Biederman

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=27472.995496876@redhat.com \
    --to=dwmw2@infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=torvalds@transmeta.com \
    /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