linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH block/for-3.5/core] blkcg: drop local variable @q from blkg_destroy()
@ 2012-05-16 17:09 Tejun Heo
  0 siblings, 0 replies; only message in thread
From: Tejun Heo @ 2012-05-16 17:09 UTC (permalink / raw)
  To: Jens Axboe; +Cc: linux-kernel, rni

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 <tj@kernel.org>
Reported-by: Rakesh Iyer <rni@google.com>
---
 block/blk-cgroup.c |    3 +--
 1 files changed, 1 insertions(+), 2 deletions(-)

diff --git a/block/blk-cgroup.c b/block/blk-cgroup.c
index 4465329..3186404 100644
--- a/block/blk-cgroup.c
+++ b/block/blk-cgroup.c
@@ -271,11 +271,10 @@ 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;
 	int i;
 
-	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 */
-- 
1.7.7.3


^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2012-05-16 17:09 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-05-16 17:09 [PATCH block/for-3.5/core] blkcg: drop local variable @q from blkg_destroy() Tejun Heo

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).