Skip to contentSkip to conversation

null_blk: remove unused fields in 'nullb_cmd'

PATCH Applied Dongli Zhang 3 participants 3 messages Feb 24, 2020 – Feb 25, 2020 Block layer

lore
Share & tools
lore
#0 lore raw

PATCH v2 1/1 null_blk: remove unused fields in 'nullb_cmd'

'list', 'll_list' and 'csd' are no longer used.

The 'list' is not used since it was introduced by commit f2298c0403b0 ("null_blk: multi queue aware block test driver").

The 'll_list' is no longer used since commit 3c395a969acc ("null_blk: set a separate timer for each command").

The 'csd' is no longer used since commit ce2c350b2cfe ("null_blk: use blk_complete_request and blk_mq_complete_request").

---
Changes since v1:
- Remove 'list' and 'csd' as well.

 drivers/block/null_blk.h      | 3 ---
 drivers/block/null_blk_main.c | 2 --
 2 files changed, 5 deletions(-)
drivers/block/null_blk.h +0 -3
index bc837862b767..62b660821dbc 100644
@@ -14,9 +14,6 @@
 #include <linux/fault-inject.h>
 
 struct nullb_cmd {
-	struct list_head list;
-	struct llist_node ll_list;
-	struct __call_single_data csd;
 	struct request *rq;
 	struct bio *bio;
 	unsigned int tag;
drivers/block/null_blk_main.c +0 -2
index 16510795e377..133060431dbd 100644
@@ -1518,8 +1518,6 @@ static int setup_commands(struct nullb_queue *nq)
 
 	for (i = 0; i < nq->queue_depth; i++) {
 		cmd = &nq->cmds[i];
-		INIT_LIST_HEAD(&cmd->list);
-		cmd->ll_list.next = NULL;
 		cmd->tag = -1U;
 	}
 
Signature · 1 line
2.17.1
Reviewed-by on v2 1/1
#1 lore raw
Quoted 10 lines · Dongli Zhang

'list', 'll_list' and 'csd' are no longer used.

The 'list' is not used since it was introduced by commit f2298c0403b0 ("null_blk: multi queue aware block test driver").

The 'll_list' is no longer used since commit 3c395a969acc ("null_blk: set a separate timer for each command").

The 'csd' is no longer used since commit ce2c350b2cfe ("null_blk: use blk_complete_request and blk_mq_complete_request").

maintainer Applied
#2 lore raw
In reply to Dongli Zhang
Quoted 10 lines · Dongli Zhang

'list', 'll_list' and 'csd' are no longer used.

The 'list' is not used since it was introduced by commit f2298c0403b0 ("null_blk: multi queue aware block test driver").

The 'll_list' is no longer used since commit 3c395a969acc ("null_blk: set a separate timer for each command").

The 'csd' is no longer used since commit ce2c350b2cfe ("null_blk: use blk_complete_request and blk_mq_complete_request").

Applied, thanks.

Signature · 1 line
Jens Axboe