From: Tejun Heo Date: Tue, 5 Jun 2012 11:36:44 +0000 (+0200) Subject: blkcg: drop local variable @q from blkg_destroy() X-Git-Tag: accepted/tizen/common/20141203.182822~4025^2~29 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=27e1f9d1cc87be4e53c6eb7158cafc21c4b85a14;p=platform%2Fkernel%2Flinux-arm64.git blkcg: drop local variable @q from blkg_destroy() blkg_destroy() caches @blkg->q in local variable @q. While there are two places which needs @blkg->q, only lockdep_assert_held() used the local variable leading to unused local variable warning if lockdep is configured out. Drop the local variable and just use @blkg->q directly. Signed-off-by: Tejun Heo Reported-by: Rakesh Iyer Signed-off-by: Jens Axboe --- diff --git a/block/blk-cgroup.c b/block/blk-cgroup.c index 4ab7420..e7dee61 100644 --- a/block/blk-cgroup.c +++ b/block/blk-cgroup.c @@ -241,10 +241,9 @@ EXPORT_SYMBOL_GPL(blkg_lookup_create); static void blkg_destroy(struct blkcg_gq *blkg) { - struct request_queue *q = blkg->q; struct blkcg *blkcg = blkg->blkcg; - lockdep_assert_held(q->queue_lock); + lockdep_assert_held(blkg->q->queue_lock); lockdep_assert_held(&blkcg->lock); /* Something wrong if we are trying to remove same group twice */