aboutsummaryrefslogtreecommitdiffstats
path: root/fs
diff options
context:
space:
mode:
authorJoe Perches <joe@perches.com>2014-08-08 17:22:26 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2014-08-08 18:57:24 -0400
commit19bdd41a57e1418b8661148125e9b6d99f468c1b (patch)
treeac4ee897befd5c00b73de284bd0fe97f4577b380 /fs
parentb16214d43d9060722360360f741416660b54c4f5 (diff)
adfs: add __printf verification, fix format/argument mismatches
Might as well do the right thing. Signed-off-by: Joe Perches <joe@perches.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'fs')
-rw-r--r--fs/adfs/adfs.h1
-rw-r--r--fs/adfs/dir.c2
-rw-r--r--fs/adfs/dir_fplus.c5
3 files changed, 4 insertions, 4 deletions
diff --git a/fs/adfs/adfs.h b/fs/adfs/adfs.h
index c770337c4b45..24575d9d882d 100644
--- a/fs/adfs/adfs.h
+++ b/fs/adfs/adfs.h
@@ -153,6 +153,7 @@ extern int adfs_map_lookup(struct super_block *sb, unsigned int frag_id, unsigne
153extern unsigned int adfs_map_free(struct super_block *sb); 153extern unsigned int adfs_map_free(struct super_block *sb);
154 154
155/* Misc */ 155/* Misc */
156__printf(3, 4)
156void __adfs_error(struct super_block *sb, const char *function, 157void __adfs_error(struct super_block *sb, const char *function,
157 const char *fmt, ...); 158 const char *fmt, ...);
158#define adfs_error(sb, fmt...) __adfs_error(sb, __func__, fmt) 159#define adfs_error(sb, fmt...) __adfs_error(sb, __func__, fmt)
diff --git a/fs/adfs/dir.c b/fs/adfs/dir.c
index 0d138c0de293..51c279a29845 100644
--- a/fs/adfs/dir.c
+++ b/fs/adfs/dir.c
@@ -138,7 +138,7 @@ adfs_dir_lookup_byname(struct inode *inode, struct qstr *name, struct object_inf
138 goto out; 138 goto out;
139 139
140 if (ADFS_I(inode)->parent_id != dir.parent_id) { 140 if (ADFS_I(inode)->parent_id != dir.parent_id) {
141 adfs_error(sb, "parent directory changed under me! (%lx but got %lx)\n", 141 adfs_error(sb, "parent directory changed under me! (%lx but got %x)\n",
142 ADFS_I(inode)->parent_id, dir.parent_id); 142 ADFS_I(inode)->parent_id, dir.parent_id);
143 ret = -EIO; 143 ret = -EIO;
144 goto free_out; 144 goto free_out;
diff --git a/fs/adfs/dir_fplus.c b/fs/adfs/dir_fplus.c
index c52f1ce15f1e..f2ba88ab4aed 100644
--- a/fs/adfs/dir_fplus.c
+++ b/fs/adfs/dir_fplus.c
@@ -79,9 +79,8 @@ adfs_fplus_read(struct super_block *sb, unsigned int id, unsigned int sz, struct
79 79
80 dir->bh_fplus[blk] = sb_bread(sb, block); 80 dir->bh_fplus[blk] = sb_bread(sb, block);
81 if (!dir->bh_fplus[blk]) { 81 if (!dir->bh_fplus[blk]) {
82 adfs_error(sb, "dir object %X failed read for" 82 adfs_error(sb, "dir object %x failed read for offset %d, mapped block %lX",
83 " offset %d, mapped block %X", 83 id, blk, block);
84 id, blk, block);
85 goto out; 84 goto out;
86 } 85 }
87 86