public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [TRIVIAL PATCH] bdi_register: Add __printf verification, fix arg mismatch
@ 2012-11-22 19:49 Joe Perches
  2012-11-27  3:05 ` Alex Elder
  0 siblings, 1 reply; 2+ messages in thread
From: Joe Perches @ 2012-11-22 19:49 UTC (permalink / raw)
  To: Sage Weil; +Cc: ceph-devel, LKML

__printf is useful to verify format and arguments.

Signed-off-by: Joe Perches <joe@perches.com>
---
 fs/ceph/super.c             |    2 +-
 include/linux/backing-dev.h |    1 +
 2 files changed, 2 insertions(+), 1 deletions(-)

diff --git a/fs/ceph/super.c b/fs/ceph/super.c
index 2eb43f2..e7dbb5c 100644
--- a/fs/ceph/super.c
+++ b/fs/ceph/super.c
@@ -849,7 +849,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 2a9a9ab..12731a1 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);



^ permalink raw reply related	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2012-11-27  3:05 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-11-22 19:49 [TRIVIAL PATCH] bdi_register: Add __printf verification, fix arg mismatch Joe Perches
2012-11-27  3:05 ` Alex Elder

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox