summaryrefslogtreecommitdiffstats
path: root/fs
diff options
context:
space:
mode:
authorRussell King <rmk+kernel@armlinux.org.uk>2019-06-04 14:49:47 +0100
committerAl Viro <viro@zeniv.linux.org.uk>2019-06-26 20:14:13 -0400
commit2e67080d87087fdba88059b1f63e4301ea0fad3a (patch)
tree2bc266c841ad9b9049d873695f52e2dbe6c4a8d6 /fs
parentcb88b5a387dd9ba9c36fd76c4cdc187cdce5974c (diff)
downloadlinux-2e67080d87087fdba88059b1f63e4301ea0fad3a.tar.gz
linux-2e67080d87087fdba88059b1f63e4301ea0fad3a.tar.bz2
linux-2e67080d87087fdba88059b1f63e4301ea0fad3a.zip
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: Russell King <rmk+kernel@armlinux.org.uk> Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Diffstat (limited to 'fs')
-rw-r--r--fs/adfs/super.c12
1 files changed, 7 insertions, 5 deletions
diff --git a/fs/adfs/super.c b/fs/adfs/super.c
index c5607685788e..315657a3bac7 100644
--- a/fs/adfs/super.c
+++ b/fs/adfs/super.c
@@ -24,16 +24,18 @@
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_start(args, fmt);
- vsnprintf(error_buf, sizeof(error_buf), fmt, args);
- va_end(args);
+ vaf.fmt = fmt;
+ 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 ? ": " : "",
- function ? function : "", error_buf);
+ function ? function : "", &vaf);
+
+ va_end(args);
}
static int adfs_checkdiscrecord(struct adfs_discrecord *dr)