All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH -next] null_blk: remove set but not used variable 'q'
@ 2018-10-16  1:45 ` YueHaibing
  0 siblings, 0 replies; 4+ messages in thread
From: YueHaibing @ 2018-10-16  1:45 UTC (permalink / raw)
  To: Jens Axboe; +Cc: YueHaibing, linux-block, kernel-janitors

Fixes gcc '-Wunused-but-set-variable' warning:

drivers/block/null_blk_main.c: In function 'end_cmd':
drivers/block/null_blk_main.c:609:24: warning:
 variable 'q' set but not used [-Wunused-but-set-variable]

It not used any more after commit
e50b1e327aeb ("null_blk: remove legacy IO path")

Signed-off-by: YueHaibing <yuehaibing@huawei.com>
---
 drivers/block/null_blk_main.c | 4 ----
 1 file changed, 4 deletions(-)

diff --git a/drivers/block/null_blk_main.c b/drivers/block/null_blk_main.c
index 0b302d7..e945910 100644
--- a/drivers/block/null_blk_main.c
+++ b/drivers/block/null_blk_main.c
@@ -606,12 +606,8 @@ static struct nullb_cmd *alloc_cmd(struct nullb_queue *nq, int can_wait)
 
 static void end_cmd(struct nullb_cmd *cmd)
 {
-	struct request_queue *q = NULL;
 	int queue_mode = cmd->nq->dev->queue_mode;
 
-	if (cmd->rq)
-		q = cmd->rq->q;
-
 	switch (queue_mode)  {
 	case NULL_Q_MQ:
 		blk_mq_end_request(cmd->rq, cmd->error);

^ permalink raw reply related	[flat|nested] 4+ messages in thread

* [PATCH -next] null_blk: remove set but not used variable 'q'
@ 2018-10-16  1:45 ` YueHaibing
  0 siblings, 0 replies; 4+ messages in thread
From: YueHaibing @ 2018-10-16  1:45 UTC (permalink / raw)
  To: Jens Axboe; +Cc: YueHaibing, linux-block, kernel-janitors

Fixes gcc '-Wunused-but-set-variable' warning:

drivers/block/null_blk_main.c: In function 'end_cmd':
drivers/block/null_blk_main.c:609:24: warning:
 variable 'q' set but not used [-Wunused-but-set-variable]

It not used any more after commit
e50b1e327aeb ("null_blk: remove legacy IO path")

Signed-off-by: YueHaibing <yuehaibing@huawei.com>
---
 drivers/block/null_blk_main.c | 4 ----
 1 file changed, 4 deletions(-)

diff --git a/drivers/block/null_blk_main.c b/drivers/block/null_blk_main.c
index 0b302d7..e945910 100644
--- a/drivers/block/null_blk_main.c
+++ b/drivers/block/null_blk_main.c
@@ -606,12 +606,8 @@ static struct nullb_cmd *alloc_cmd(struct nullb_queue *nq, int can_wait)
 
 static void end_cmd(struct nullb_cmd *cmd)
 {
-	struct request_queue *q = NULL;
 	int queue_mode = cmd->nq->dev->queue_mode;
 
-	if (cmd->rq)
-		q = cmd->rq->q;
-
 	switch (queue_mode)  {
 	case NULL_Q_MQ:
 		blk_mq_end_request(cmd->rq, cmd->error);

^ permalink raw reply related	[flat|nested] 4+ messages in thread

* Re: [PATCH -next] null_blk: remove set but not used variable 'q'
  2018-10-16  1:45 ` YueHaibing
@ 2018-10-16  2:03   ` Jens Axboe
  -1 siblings, 0 replies; 4+ messages in thread
From: Jens Axboe @ 2018-10-16  2:03 UTC (permalink / raw)
  To: YueHaibing; +Cc: linux-block, kernel-janitors

On 10/15/18 7:45 PM, YueHaibing wrote:
> Fixes gcc '-Wunused-but-set-variable' warning:
> 
> drivers/block/null_blk_main.c: In function 'end_cmd':
> drivers/block/null_blk_main.c:609:24: warning:
>  variable 'q' set but not used [-Wunused-but-set-variable]
> 
> It not used any more after commit
> e50b1e327aeb ("null_blk: remove legacy IO path")

Thanks, applied.

-- 
Jens Axboe

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH -next] null_blk: remove set but not used variable 'q'
@ 2018-10-16  2:03   ` Jens Axboe
  0 siblings, 0 replies; 4+ messages in thread
From: Jens Axboe @ 2018-10-16  2:03 UTC (permalink / raw)
  To: YueHaibing; +Cc: linux-block, kernel-janitors

On 10/15/18 7:45 PM, YueHaibing wrote:
> Fixes gcc '-Wunused-but-set-variable' warning:
> 
> drivers/block/null_blk_main.c: In function 'end_cmd':
> drivers/block/null_blk_main.c:609:24: warning:
>  variable 'q' set but not used [-Wunused-but-set-variable]
> 
> It not used any more after commit
> e50b1e327aeb ("null_blk: remove legacy IO path")

Thanks, applied.

-- 
Jens Axboe

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2018-10-16  9:22 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-10-16  1:45 [PATCH -next] null_blk: remove set but not used variable 'q' YueHaibing
2018-10-16  1:45 ` YueHaibing
2018-10-16  2:03 ` Jens Axboe
2018-10-16  2:03   ` Jens Axboe

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.