[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <0657138fc813c32c20a38949b5646f4c61790cad.1252639196.git.joe@perches.com>
Date: Thu, 10 Sep 2009 20:29:41 -0700
From: Joe Perches <joe@...ches.com>
To: linux-kernel@...r.kernel.org, linux-next@...r.kernel.org
Cc: Ingo Molnar <mingo@...e.hu>, Greg Kroah-Hartman <gregkh@...e.de>,
Andrew Morton <akpm@...ux-foundation.org>,
Steven Rostedt <rostedt@...dmis.org>,
Peter Zijlstra <a.p.zijlstra@...llo.nl>
Subject: [PATCH 2/3] include/linux/logging.h: Reduce data usage of printk_once
Use bool for int
Don't initialize __printk_once, invert test
Signed-off-by: Joe Perches <joe@...ches.com>
---
include/linux/logging.h | 6 +++---
1 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/include/linux/logging.h b/include/linux/logging.h
index 361d5ed..d76ccfa 100644
--- a/include/linux/logging.h
+++ b/include/linux/logging.h
@@ -91,10 +91,10 @@ extern bool printk_timed_ratelimit(unsigned long *caller_jiffies,
*/
#define printk_once(fmt, ...) \
({ \
- static int __print_once = 1; \
+ static bool __print_once; \
\
- if (__print_once) { \
- __print_once = 0; \
+ if (!__print_once) { \
+ __print_once = true; \
printk(fmt, ##__VA_ARGS__); \
} \
})
--
1.6.3.1.10.g659a0.dirty
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists