mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/herbert/cryptodev-2.6.git
synced 2026-04-23 05:56:14 -04:00
tracing: Mark binary printing functions with __printf() attribute
Binary printing functions are using printf() type of format, and compiler is not happy about them as is: kernel/trace/trace.c:3292:9: error: function ‘trace_vbprintk’ might be a candidate for ‘gnu_printf’ format attribute [-Werror=suggest-attribute=format] kernel/trace/trace_seq.c:182:9: error: function ‘trace_seq_bprintf’ might be a candidate for ‘gnu_printf’ format attribute [-Werror=suggest-attribute=format] Fix the compilation errors by adding __printf() attribute. While at it, move existing __printf() attributes from the implementations to the declarations. IT also fixes incorrect attribute parameters that are used for trace_array_printk(). Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Kees Cook <kees@kernel.org> Reviewed-by: Petr Mladek <pmladek@suse.com> Link: https://lore.kernel.org/r/20250321144822.324050-4-andriy.shevchenko@linux.intel.com Signed-off-by: Petr Mladek <pmladek@suse.com>
This commit is contained in:
committed by
Petr Mladek
parent
6b2c1e30ad
commit
196a062641
@@ -88,8 +88,8 @@ extern __printf(2, 3)
|
||||
void trace_seq_printf(struct trace_seq *s, const char *fmt, ...);
|
||||
extern __printf(2, 0)
|
||||
void trace_seq_vprintf(struct trace_seq *s, const char *fmt, va_list args);
|
||||
extern void
|
||||
trace_seq_bprintf(struct trace_seq *s, const char *fmt, const u32 *binary);
|
||||
extern __printf(2, 0)
|
||||
void trace_seq_bprintf(struct trace_seq *s, const char *fmt, const u32 *binary);
|
||||
extern int trace_print_seq(struct seq_file *m, struct trace_seq *s);
|
||||
extern int trace_seq_to_user(struct trace_seq *s, char __user *ubuf,
|
||||
int cnt);
|
||||
@@ -113,8 +113,8 @@ static inline __printf(2, 3)
|
||||
void trace_seq_printf(struct trace_seq *s, const char *fmt, ...)
|
||||
{
|
||||
}
|
||||
static inline void
|
||||
trace_seq_bprintf(struct trace_seq *s, const char *fmt, const u32 *binary)
|
||||
static inline __printf(2, 0)
|
||||
void trace_seq_bprintf(struct trace_seq *s, const char *fmt, const u32 *binary)
|
||||
{
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user