Skip to contentSkip to conversation

block: Remove unnecessary (void*) conversions

PATCH Applied Li zeming 2 participants 2 messages Sep 19, 2022 – Sep 20, 2022

Subsystems (2)
lore
Share & tools
lore

Li zeming

author
#0 lore raw

PATCH 1/1 block: Remove unnecessary (void*) conversions

The key pointer does not need to cast the type.

---
 block/blk-iocost.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
block/blk-iocost.c +1 -1
index 7936e5f5821c..b473efd89b86 100644
@@ -1430,7 +1430,7 @@ static int iocg_wake_fn(struct wait_queue_entry *wq_entry, unsigned mode,
 			int flags, void *key)
 {
 	struct iocg_wait *wait = container_of(wq_entry, struct iocg_wait, wait);
-	struct iocg_wake_ctx *ctx = (struct iocg_wake_ctx *)key;
+	struct iocg_wake_ctx *ctx = key;
 	u64 cost = abs_cost_to_cost(wait->abs_cost, ctx->hw_inuse);
 
 	ctx->vbudget -= cost;
Signature · 1 line
2.18.2
maintainer Applied
#1 lore raw
Quoted 3 lines · Li zeming

The key pointer does not need to cast the type.

Applied, thanks!

[1/1] block: Remove unnecessary (void*) conversions

      commit: a7609c68f7a117a77b3049c2353f555854be69e9

Best regards,

Signature · 1 line
Jens Axboe