[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <1342746282-28497-5-git-send-email-jmillenbach@gmail.com>
Date: Thu, 19 Jul 2012 18:04:39 -0700
From: Joe Millenbach <jmillenbach@...il.com>
To: "H. Peter Anvin" <hpa@...or.com>,
Thomas Gleixner <tglx@...utronix.de>,
Ingo Molnar <mingo@...hat.com>, x86@...nel.org,
Gokul Caushik <caushik1@...il.com>,
Josh Triplett <josh@...htriplett.org>,
Joe Millenbach <jmillenbach@...il.com>,
Jesper Juhl <jj@...osbits.net>, linux-kernel@...r.kernel.org
Cc: team-fjord@...glegroups.com
Subject: [PATCH 4/7] x86/boot: Switch output functions from command-line flags to conditional compilation
Changed putstr flagging from parameter to conditional compilation for puts,
debug_putstr, and error_putstr. This allows for space savings since most
configurations won't use this feature.
Signed-off-by: Joe Millenbach <jmillenbach@...il.com>
Signed-off-by: Gokul Caushik <caushik1@...il.com>
Reviewed-by: Josh Triplett <josh@...htriplett.org>
---
arch/x86/boot/compressed/misc.c | 12 +-----------
arch/x86/boot/compressed/misc.h | 17 +++++++++++++----
2 files changed, 14 insertions(+), 15 deletions(-)
diff --git a/arch/x86/boot/compressed/misc.c b/arch/x86/boot/compressed/misc.c
index de1d54d..8c29f82 100644
--- a/arch/x86/boot/compressed/misc.c
+++ b/arch/x86/boot/compressed/misc.c
@@ -169,15 +169,11 @@ static void serial_putchar(int ch)
outb(ch, early_serial_base + TXR);
}
-void __putstr(int error, const char *s)
+void __putstr(const char *s)
{
int x, y, pos;
char c;
-#ifndef CONFIG_X86_VERBOSE_BOOTUP
- if (!error)
- return;
-#endif
if (early_serial_base) {
const char *str = s;
while (*str) {
@@ -223,12 +219,6 @@ void __putstr(int error, const char *s)
outb(0xff & (pos >> 1), vidport+1);
}
-static void debug_putstr(const char *s)
-{
- if (debug)
- putstr(s);
-}
-
void *memset(void *s, int c, size_t n)
{
int i;
diff --git a/arch/x86/boot/compressed/misc.h b/arch/x86/boot/compressed/misc.h
index 4c1bfb6..618e5c8 100644
--- a/arch/x86/boot/compressed/misc.h
+++ b/arch/x86/boot/compressed/misc.h
@@ -24,10 +24,19 @@
/* misc.c */
extern struct boot_params *real_mode; /* Pointer to real-mode data */
-void __putstr(int error, const char *s);
-#define putstr(__x) __putstr(0, __x)
-#define error_putstr(__x) __putstr(1, __x)
-#define puts(__x) __putstr(0, __x)
+void __putstr(const char *s);
+#define error_putstr(__x) __putstr(__x)
+
+#ifdef CONFIG_X86_VERBOSE_BOOTUP
+
+#define debug_putstr(__x) __putstr(__x)
+
+#else
+
+static inline void debug_putstr(const char *s)
+{ }
+
+#endif
/* cmdline.c */
int cmdline_find_option(const char *option, char *buffer, int bufsize);
--
1.7.9.5
--
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