From: Lai Jiangshan <laijs@cn.fujitsu.com>
To: Steven Rostedt <rostedt@goodmis.org>, Ingo Molnar <mingo@elte.hu>,
Linux Kernel Mailing List <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH] ftrace: enable format arguments checking
Date: Wed, 24 Dec 2008 11:24:38 +0800 [thread overview]
Message-ID: <4951AB76.3030709@cn.fujitsu.com> (raw)
In-Reply-To: <494CB7A2.1070603@cn.fujitsu.com>
Lai Jiangshan wrote:
> format arguments checking for ftrace_printk() is __printf(1, 2),
> not __printf(1, 0).
>
> Signed-off-by: Lai Jiangshan <laijs@cn.fujitsu.com>
> ---
> diff --git a/include/linux/ftrace.h b/include/linux/ftrace.h
> index 9c5bc6b..0c71788 100644
> --- a/include/linux/ftrace.h
> +++ b/include/linux/ftrace.h
> @@ -210,7 +210,7 @@ extern void ftrace_dump(void);
> static inline void
> ftrace_special(unsigned long arg1, unsigned long arg2, unsigned long arg3) { }
> static inline int
> -ftrace_printk(const char *fmt, ...) __attribute__ ((format (printf, 1, 0)));
Hi, Steven Rostedt
Did you notice this patch?
This patch changed a char in a line: s/0/2/. It enables the format checking.
Lai.
> +ftrace_printk(const char *fmt, ...) __attribute__ ((format (printf, 1, 2)));
>
> static inline int
> ftrace_printk(const char *fmt, ...)
>
>
> --
> To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at http://vger.kernel.org/majordomo-info.html
> Please read the FAQ at http://www.tux.org/lkml/
>
>
>
next prev parent reply other threads:[~2008-12-24 3:28 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-12-20 9:15 [PATCH] ftrace: enable format arguments checking Lai Jiangshan
2008-12-24 3:24 ` Lai Jiangshan [this message]
2008-12-24 3:36 ` Steven Rostedt
2008-12-24 3:42 ` Steven Rostedt
2008-12-24 3:46 ` Lai Jiangshan
2008-12-24 4:15 ` Steven Rostedt
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=4951AB76.3030709@cn.fujitsu.com \
--to=laijs@cn.fujitsu.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@elte.hu \
--cc=rostedt@goodmis.org \
/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