mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH] Introduce simple TRUE and FALSE boolean macros.
@ 2007-01-21 10:03 Robert P. J. Day
  2007-01-21 17:51 ` Nicholas Miell
  0 siblings, 1 reply; 10+ messages in thread
From: Robert P. J. Day @ 2007-01-21 10:03 UTC (permalink / raw)
  To: Linux kernel mailing list; +Cc: Andrew Morton, linville


  Introduce the TRUE and FALSE boolean macros so that everyone can
stop re-inventing them, and remove the one occurrence in the source
tree that clashes with that change.

Signed-off-by: Robert P. J. Day <rpjday@mindspring.com>

---

  once this patch is applied, others can remove all of the superfluous
macro definitions from the source tree at their convenience.

  this was compile tested on x86 with "make allyesconfig".


 drivers/net/wireless/strip.c |    2 --
 include/linux/types.h        |    2 ++
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/net/wireless/strip.c b/drivers/net/wireless/strip.c
index ce3a8ba..5e64ec1 100644
--- a/drivers/net/wireless/strip.c
+++ b/drivers/net/wireless/strip.c
@@ -177,8 +177,6 @@ typedef struct {
 	MetricomNode node[NODE_TABLE_SIZE];
 } MetricomNodeTable;

-enum { FALSE = 0, TRUE = 1 };
-
 /*
  * Holds the radio's firmware version.
  */
diff --git a/include/linux/types.h b/include/linux/types.h
index 0351bf2..d988636 100644
--- a/include/linux/types.h
+++ b/include/linux/types.h
@@ -34,6 +34,8 @@ typedef __kernel_mqd_t		mqd_t;

 #ifdef __KERNEL__
 typedef _Bool			bool;
+#define TRUE			1
+#define FALSE			0

 typedef __kernel_uid32_t	uid_t;
 typedef __kernel_gid32_t	gid_t;

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

end of thread, other threads:[~2007-01-22 16:58 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2007-01-21 10:03 [PATCH] Introduce simple TRUE and FALSE boolean macros Robert P. J. Day
2007-01-21 17:51 ` Nicholas Miell
2007-01-21 18:46   ` Richard Knutsson
2007-01-21 19:40   ` Robert P. J. Day
2007-01-22 10:46     ` Nick Piggin
2007-01-22 11:02       ` Robert P. J. Day
2007-01-22 12:00         ` Nick Piggin
2007-01-22 15:18         ` Mike Galbraith
2007-01-22 15:41           ` Robert P. J. Day
2007-01-22 16:52             ` Jan Engelhardt

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®