aboutsummaryrefslogtreecommitdiffstats
path: root/block/blk-sysfs.c
diff options
context:
space:
mode:
Diffstat (limited to 'block/blk-sysfs.c')
-rw-r--r--block/blk-sysfs.c11
1 files changed, 6 insertions, 5 deletions
diff --git a/block/blk-sysfs.c b/block/blk-sysfs.c
index b1cd04087d6a..418d63619680 100644
--- a/block/blk-sysfs.c
+++ b/block/blk-sysfs.c
@@ -16,9 +16,9 @@ struct queue_sysfs_entry {
16}; 16};
17 17
18static ssize_t 18static ssize_t
19queue_var_show(unsigned int var, char *page) 19queue_var_show(unsigned long var, char *page)
20{ 20{
21 return sprintf(page, "%d\n", var); 21 return sprintf(page, "%lu\n", var);
22} 22}
23 23
24static ssize_t 24static ssize_t
@@ -77,7 +77,8 @@ queue_requests_store(struct request_queue *q, const char *page, size_t count)
77 77
78static ssize_t queue_ra_show(struct request_queue *q, char *page) 78static ssize_t queue_ra_show(struct request_queue *q, char *page)
79{ 79{
80 int ra_kb = q->backing_dev_info.ra_pages << (PAGE_CACHE_SHIFT - 10); 80 unsigned long ra_kb = q->backing_dev_info.ra_pages <<
81 (PAGE_CACHE_SHIFT - 10);
81 82
82 return queue_var_show(ra_kb, (page)); 83 return queue_var_show(ra_kb, (page));
83} 84}
@@ -189,9 +190,9 @@ static ssize_t queue_nomerges_store(struct request_queue *q, const char *page,
189 190
190static ssize_t queue_rq_affinity_show(struct request_queue *q, char *page) 191static ssize_t queue_rq_affinity_show(struct request_queue *q, char *page)
191{ 192{
192 unsigned int set = test_bit(QUEUE_FLAG_SAME_COMP, &q->queue_flags); 193 bool set = test_bit(QUEUE_FLAG_SAME_COMP, &q->queue_flags);
193 194
194 return queue_var_show(set != 0, page); 195 return queue_var_show(set, page);
195} 196}
196 197
197static ssize_t 198static ssize_t