Re: [PATCH] ftrace: enable format arguments checking

From: Lai Jiangshan
Date: Tue Dec 23 2008 - 22:50:00 EST


Steven Rostedt wrote:
> On Sat, 20 Dec 2008, Lai Jiangshan wrote:
>
> Could you resubmit with a "Impact" line.
>
> Thanks,
>

Impact: check format for ftrace_printk() when CONFIG_TRACING=n

format arguments checking for ftrace_printk() is __printf(1, 2),
not __printf(1, 0).

Signed-off-by: Lai Jiangshan <laijs@xxxxxxxxxxxxxx>
---
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)));
+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@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/