From: tip-bot for Joe Millenbach <jmillenbach@gmail.com>
To: linux-tip-commits@vger.kernel.org
Cc: linux-kernel@vger.kernel.org, hpa@zytor.com, mingo@kernel.org,
caushik1@gmail.com, jmillenbach@gmail.com, josh@joshtriplett.org,
tglx@linutronix.de
Subject: [tip:x86/boot] x86, boot: Switch output functions from command-line flags to conditional compilation
Date: Sat, 21 Jul 2012 17:56:34 -0700 [thread overview]
Message-ID: <tip-7aac3015b533add3e85222f9fd2ab66216b38746@git.kernel.org> (raw)
In-Reply-To: <1342746282-28497-5-git-send-email-jmillenbach@gmail.com>
Commit-ID: 7aac3015b533add3e85222f9fd2ab66216b38746
Gitweb: http://git.kernel.org/tip/7aac3015b533add3e85222f9fd2ab66216b38746
Author: Joe Millenbach <jmillenbach@gmail.com>
AuthorDate: Thu, 19 Jul 2012 18:04:39 -0700
Committer: H. Peter Anvin <hpa@zytor.com>
CommitDate: Sat, 21 Jul 2012 11:07:25 -0700
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@gmail.com>
Link: http://lkml.kernel.org/r/1342746282-28497-5-git-send-email-jmillenbach@gmail.com
Signed-off-by: Gokul Caushik <caushik1@gmail.com>
Reviewed-by: Josh Triplett <josh@joshtriplett.org>
Signed-off-by: H. Peter Anvin <hpa@zytor.com>
---
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);
next prev parent reply other threads:[~2012-07-22 0:56 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <1342746282-28497-1-git-send-email-jmillenbach@gmail.com>
2012-07-20 1:04 ` [PATCH 1/7] x86/boot: Removed quiet flag and switched quiet output to debug flag Joe Millenbach
2012-07-22 0:53 ` [tip:x86/boot] x86, boot: " tip-bot for Joe Millenbach
2012-07-20 1:04 ` [PATCH 2/7] x86/boot: Wrap debug printing in a new debug_putstr function Joe Millenbach
2012-07-22 0:54 ` [tip:x86/boot] x86, boot: " tip-bot for Joe Millenbach
2012-07-20 1:04 ` [PATCH 3/7] x86/boot: Changed error putstr path to match new debug_putstr format Joe Millenbach
2012-07-22 0:55 ` [tip:x86/boot] x86, boot: " tip-bot for Joe Millenbach
2012-07-20 1:04 ` [PATCH 4/7] x86/boot: Switch output functions from command-line flags to conditional compilation Joe Millenbach
2012-07-22 0:56 ` tip-bot for Joe Millenbach [this message]
2012-07-20 1:04 ` [PATCH 5/7] x86/boot: Removed unused debug flag and set code Joe Millenbach
2012-07-22 0:57 ` [tip:x86/boot] x86, boot: " tip-bot for Joe Millenbach
2012-07-20 1:04 ` [PATCH 6/7] x86/boot: Exclude early_serial_console.c if can't use it Joe Millenbach
2012-07-22 0:58 ` [tip:x86/boot] x86, boot: Exclude early_serial_console.c if can' t " tip-bot for Joe Millenbach
2012-07-20 1:04 ` [PATCH 7/7] x86/boot: Exclude cmdline.c if you can't " Joe Millenbach
2012-07-22 0:59 ` [tip:x86/boot] x86, boot: " tip-bot for Gokul Caushik
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=tip-7aac3015b533add3e85222f9fd2ab66216b38746@git.kernel.org \
--to=jmillenbach@gmail.com \
--cc=caushik1@gmail.com \
--cc=hpa@zytor.com \
--cc=josh@joshtriplett.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-tip-commits@vger.kernel.org \
--cc=mingo@kernel.org \
--cc=tglx@linutronix.de \
/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;
as well as URLs for NNTP newsgroup(s).