summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJoe Perches <joe@perches.com>2012-11-29 08:37:03 -0600
committerAlex Elder <elder@inktank.com>2012-12-13 08:13:07 -0600
commitd2cc4dde9206aa2c7fb237aa689d3277cc070547 (patch)
tree8e0c48be01ac4bd07c19a526a08fbb30c6bac11b
parent83aff95eb9d60aff5497e9f44a2ae906b86d8e88 (diff)
downloadlinux-3.10-d2cc4dde9206aa2c7fb237aa689d3277cc070547.tar.gz
linux-3.10-d2cc4dde9206aa2c7fb237aa689d3277cc070547.tar.bz2
linux-3.10-d2cc4dde9206aa2c7fb237aa689d3277cc070547.zip
bdi_register: add __printf verification, fix arg mismatch
__printf is useful to verify format and arguments. Signed-off-by: Joe Perches <joe@perches.com> Reviewed-by: Alex Elder <elder@inktank.com>
-rw-r--r--fs/ceph/super.c2
-rw-r--r--include/linux/backing-dev.h1
2 files changed, 2 insertions, 1 deletions
diff --git a/fs/ceph/super.c b/fs/ceph/super.c
index fcda1c73a1e..1a144001b2e 100644
--- a/fs/ceph/super.c
+++ b/fs/ceph/super.c
@@ -842,7 +842,7 @@ static int ceph_register_bdi(struct super_block *sb,
fsc->backing_dev_info.ra_pages =
default_backing_dev_info.ra_pages;
- err = bdi_register(&fsc->backing_dev_info, NULL, "ceph-%d",
+ err = bdi_register(&fsc->backing_dev_info, NULL, "ceph-%ld",
atomic_long_inc_return(&bdi_seq));
if (!err)
sb->s_bdi = &fsc->backing_dev_info;
diff --git a/include/linux/backing-dev.h b/include/linux/backing-dev.h
index 2a9a9abc912..12731a19ef0 100644
--- a/include/linux/backing-dev.h
+++ b/include/linux/backing-dev.h
@@ -114,6 +114,7 @@ struct backing_dev_info {
int bdi_init(struct backing_dev_info *bdi);
void bdi_destroy(struct backing_dev_info *bdi);
+__printf(3, 4)
int bdi_register(struct backing_dev_info *bdi, struct device *parent,
const char *fmt, ...);
int bdi_register_dev(struct backing_dev_info *bdi, dev_t dev);