public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] [trivial] block: Fix type mismatch in ssize_t_blk_mq_tag_sysfs_show
@ 2014-02-10 17:27 Masanari Iida
  2014-02-10 17:40 ` Jens Axboe
  0 siblings, 1 reply; 2+ messages in thread
From: Masanari Iida @ 2014-02-10 17:27 UTC (permalink / raw)
  To: trivial, linux-kernel, axboe; +Cc: Masanari Iida

cppcheck detected following format string mismatch.
[blk-mq-tag.c:201]: (warning) %u in format string (no. 1) requires
'unsigned int' but the argument type is 'int'.

Change "cpu" from int to unsigned int, because the cpu
never become minus value.

Signed-off-by: Masanari Iida <standby24x7@gmail.com>
---
 block/blk-mq-tag.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/block/blk-mq-tag.c b/block/blk-mq-tag.c
index 5d70edc..83ae96c 100644
--- a/block/blk-mq-tag.c
+++ b/block/blk-mq-tag.c
@@ -184,7 +184,7 @@ void blk_mq_free_tags(struct blk_mq_tags *tags)
 ssize_t blk_mq_tag_sysfs_show(struct blk_mq_tags *tags, char *page)
 {
 	char *orig_page = page;
-	int cpu;
+	unsigned int cpu;
 
 	if (!tags)
 		return 0;
-- 
1.9.rc1


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

end of thread, other threads:[~2014-02-10 17:40 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-02-10 17:27 [PATCH] [trivial] block: Fix type mismatch in ssize_t_blk_mq_tag_sysfs_show Masanari Iida
2014-02-10 17:40 ` Jens Axboe

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