summaryrefslogtreecommitdiff
path: root/block/mq-deadline.c
diff options
context:
space:
mode:
authorweiping zhang <zhangweiping@didichuxing.com>2017-08-25 01:11:33 +0800
committerJens Axboe <axboe@kernel.dk>2017-08-28 10:01:08 -0600
commit235f8da119351ae583abfbbf577eb61a8b564203 (patch)
treebd6c28a7d55348202b1820ce8720aac567293f84 /block/mq-deadline.c
parentf5cb2d51524a1218bb0c5d8b234044e9104f7062 (diff)
downloadlinux-rpi-235f8da119351ae583abfbbf577eb61a8b564203.tar.gz
linux-rpi-235f8da119351ae583abfbbf577eb61a8b564203.tar.bz2
linux-rpi-235f8da119351ae583abfbbf577eb61a8b564203.zip
block, scheduler: convert xxx_var_store to void
The last parameter "count" never be used in xxx_var_store, convert these functions to void. Signed-off-by: weiping zhang <zhangweiping@didichuxing.com> Signed-off-by: Jens Axboe <axboe@kernel.dk>
Diffstat (limited to 'block/mq-deadline.c')
-rw-r--r--block/mq-deadline.c9
1 files changed, 4 insertions, 5 deletions
diff --git a/block/mq-deadline.c b/block/mq-deadline.c
index 1b964a387afe..c8dfddc4ba8b 100644
--- a/block/mq-deadline.c
+++ b/block/mq-deadline.c
@@ -457,13 +457,12 @@ deadline_var_show(int var, char *page)
return sprintf(page, "%d\n", var);
}
-static ssize_t
-deadline_var_store(int *var, const char *page, size_t count)
+static void
+deadline_var_store(int *var, const char *page)
{
char *p = (char *) page;
*var = simple_strtol(p, &p, 10);
- return count;
}
#define SHOW_FUNCTION(__FUNC, __VAR, __CONV) \
@@ -487,7 +486,7 @@ static ssize_t __FUNC(struct elevator_queue *e, const char *page, size_t count)
{ \
struct deadline_data *dd = e->elevator_data; \
int __data; \
- int ret = deadline_var_store(&__data, (page), count); \
+ deadline_var_store(&__data, (page)); \
if (__data < (MIN)) \
__data = (MIN); \
else if (__data > (MAX)) \
@@ -496,7 +495,7 @@ static ssize_t __FUNC(struct elevator_queue *e, const char *page, size_t count)
*(__PTR) = msecs_to_jiffies(__data); \
else \
*(__PTR) = __data; \
- return ret; \
+ return count; \
}
STORE_FUNCTION(deadline_read_expire_store, &dd->fifo_expire[READ], 0, INT_MAX, 1);
STORE_FUNCTION(deadline_write_expire_store, &dd->fifo_expire[WRITE], 0, INT_MAX, 1);