From: Zhaolei <zhaolei@cn.fujitsu.com>
To: linux-tip-commits@vger.kernel.org
Cc: linux-kernel@vger.kernel.org, hpa@zytor.com, mingo@redhat.com,
zhaolei@cn.fujitsu.com, fweisbec@gmail.com, rostedt@goodmis.org,
tglx@linutronix.de, laijs@cn.fujitsu.com, mingo@elte.hu
Subject: [tip:core/urgent] printk: fix wrong format string iter for printk
Date: Wed, 8 Apr 2009 15:06:34 GMT [thread overview]
Message-ID: <tip-022624a758dc9489388a99ad29577b4c8c09237c@git.kernel.org> (raw)
In-Reply-To: <49CC97B6.7040809@cn.fujitsu.com>
Commit-ID: 022624a758dc9489388a99ad29577b4c8c09237c
Gitweb: http://git.kernel.org/tip/022624a758dc9489388a99ad29577b4c8c09237c
Author: Zhaolei <zhaolei@cn.fujitsu.com>
AuthorDate: Fri, 27 Mar 2009 17:09:10 +0800
Committer: Ingo Molnar <mingo@elte.hu>
CommitDate: Wed, 8 Apr 2009 17:03:44 +0200
printk: fix wrong format string iter for printk
printk("%Q");
Output before patch: %QQ
Output after patch: %Q
Signed-off-by: Zhao Lei <zhaolei@cn.fujitsu.com>
Acked-by: Lai Jiangshan <laijs@cn.fujitsu.com>
Acked-by: Frederic Weisbecker <fweisbec@gmail.com>
Cc: torvalds@linux-foundation.org
Cc: Steven Rostedt <rostedt@goodmis.org>
LKML-Reference: <49CC97B6.7040809@cn.fujitsu.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
---
lib/vsprintf.c | 16 ----------------
1 files changed, 0 insertions(+), 16 deletions(-)
diff --git a/lib/vsprintf.c b/lib/vsprintf.c
index be3001f..7536ace 100644
--- a/lib/vsprintf.c
+++ b/lib/vsprintf.c
@@ -1051,13 +1051,6 @@ int vsnprintf(char *buf, size_t size, const char *fmt, va_list args)
if (str < end)
*str = '%';
++str;
- if (*fmt) {
- if (str < end)
- *str = *fmt;
- ++str;
- } else {
- --fmt;
- }
break;
case FORMAT_TYPE_NRCHARS: {
@@ -1339,8 +1332,6 @@ do { \
break;
case FORMAT_TYPE_INVALID:
- if (!*fmt)
- --fmt;
break;
case FORMAT_TYPE_NRCHARS: {
@@ -1523,13 +1514,6 @@ int bstr_printf(char *buf, size_t size, const char *fmt, const u32 *bin_buf)
if (str < end)
*str = '%';
++str;
- if (*fmt) {
- if (str < end)
- *str = *fmt;
- ++str;
- } else {
- --fmt;
- }
break;
case FORMAT_TYPE_NRCHARS:
next prev parent reply other threads:[~2009-04-08 15:07 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-03-27 9:07 [PATCH 1/2] Add support of hh length modifier " Zhaolei
2009-03-27 9:09 ` [PATCH 2/2] Fix wrong format string iter " Zhaolei
2009-03-27 9:34 ` Lai Jiangshan
2009-03-27 12:53 ` Frederic Weisbecker
2009-04-08 15:06 ` Zhaolei [this message]
2009-03-27 9:34 ` [PATCH 1/2] Add support of hh length modifier " Lai Jiangshan
2009-03-27 12:44 ` Frederic Weisbecker
2009-04-08 15:25 ` [tip:core/printk] printk: add " Zhaolei
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-022624a758dc9489388a99ad29577b4c8c09237c@git.kernel.org \
--to=zhaolei@cn.fujitsu.com \
--cc=fweisbec@gmail.com \
--cc=hpa@zytor.com \
--cc=laijs@cn.fujitsu.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-tip-commits@vger.kernel.org \
--cc=mingo@elte.hu \
--cc=mingo@redhat.com \
--cc=rostedt@goodmis.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
Powered by JetHome