Commit cc87b7c0 authored by Masahiro Yamada's avatar Masahiro Yamada

modpost: move __attribute__((format(printf, 2, 3))) to modpost.h

This attribute must be added to the function declaration in a header
for comprehensive checking of all the callsites.

Fixes: 6d9a89ea ("kbuild: declare the modpost error functions as printf like")
Signed-off-by: default avatarMasahiro Yamada <masahiroy@kernel.org>
Reviewed-by: default avatarNathan Chancellor <nathan@kernel.org>
parent cbe826b0
......@@ -60,8 +60,7 @@ static unsigned int nr_unresolved;
#define MODULE_NAME_LEN (64 - sizeof(Elf_Addr))
void __attribute__((format(printf, 2, 3)))
modpost_log(enum loglevel loglevel, const char *fmt, ...)
void modpost_log(enum loglevel loglevel, const char *fmt, ...)
{
va_list arglist;
......
......@@ -197,7 +197,8 @@ enum loglevel {
LOG_FATAL
};
void modpost_log(enum loglevel loglevel, const char *fmt, ...);
void __attribute__((format(printf, 2, 3)))
modpost_log(enum loglevel loglevel, const char *fmt, ...);
/*
* warn - show the given message, then let modpost continue running, still
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment