Commit 2e67080d authored by Russell King's avatar Russell King Committed by Al Viro

fs/adfs: use %pV for error messages

Rather than using vsnprintf() with a temporary buffer on the stack, use
%pV to print error messages.
Signed-off-by: default avatarRussell King <rmk+kernel@armlinux.org.uk>
Signed-off-by: default avatarAl Viro <viro@zeniv.linux.org.uk>
parent cb88b5a3
...@@ -24,16 +24,18 @@ ...@@ -24,16 +24,18 @@
void __adfs_error(struct super_block *sb, const char *function, const char *fmt, ...) void __adfs_error(struct super_block *sb, const char *function, const char *fmt, ...)
{ {
char error_buf[128]; struct va_format vaf;
va_list args; va_list args;
va_start(args, fmt); va_start(args, fmt);
vsnprintf(error_buf, sizeof(error_buf), fmt, args); vaf.fmt = fmt;
va_end(args); vaf.va = &args;
printk(KERN_CRIT "ADFS-fs error (device %s)%s%s: %s\n", printk(KERN_CRIT "ADFS-fs error (device %s)%s%s: %pV\n",
sb->s_id, function ? ": " : "", sb->s_id, function ? ": " : "",
function ? function : "", error_buf); function ? function : "", &vaf);
va_end(args);
} }
static int adfs_checkdiscrecord(struct adfs_discrecord *dr) static int adfs_checkdiscrecord(struct adfs_discrecord *dr)
......
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