From cb439ee574d4496ca0d14566e7c4bbf4fe20cbf4 Mon Sep 17 00:00:00 2001 From: Arianna Avanzini Date: Fri, 3 May 2013 20:45:49 +0200 Subject: [PATCH] block, bfq: use the uninitialized_var() macro when needed It may happen that a variable is initialized in a function that is called by the function that defined it. Use the uninitialized_var() macro in these cases. --- block/bfq-iosched.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/block/bfq-iosched.c b/block/bfq-iosched.c index c9d57b0..b94aa24 100644 --- a/block/bfq-iosched.c +++ b/block/bfq-iosched.c @@ -3023,7 +3023,7 @@ static ssize_t \ __FUNC(struct elevator_queue *e, const char *page, size_t count) \ { \ struct bfq_data *bfqd = e->elevator_data; \ - unsigned long __data; \ + unsigned long uninitialized_var(__data); \ int ret = bfq_var_store(&__data, (page), count); \ if (__data < (MIN)) \ __data = (MIN); \ @@ -3083,7 +3083,7 @@ static ssize_t bfq_max_budget_store(struct elevator_queue *e, const char *page, size_t count) { struct bfq_data *bfqd = e->elevator_data; - unsigned long __data; + unsigned long uninitialized_var(__data); int ret = bfq_var_store(&__data, (page), count); if (__data == 0) @@ -3103,7 +3103,7 @@ static ssize_t bfq_timeout_sync_store(struct elevator_queue *e, const char *page, size_t count) { struct bfq_data *bfqd = e->elevator_data; - unsigned long __data; + unsigned long uninitialized_var(__data); int ret = bfq_var_store(&__data, (page), count); if (__data < 1) @@ -3122,7 +3122,7 @@ static ssize_t bfq_low_latency_store(struct elevator_queue *e, const char *page, size_t count) { struct bfq_data *bfqd = e->elevator_data; - unsigned long __data; + unsigned long uninitialized_var(__data); int ret = bfq_var_store(&__data, (page), count); if (__data > 1) -- 1.8.1.4