* [PATCH] block: Remove unnecessary (void*) conversions
@ 2022-09-19 1:28 Li zeming
2022-09-20 14:29 ` Jens Axboe
0 siblings, 1 reply; 3+ messages in thread
From: Li zeming @ 2022-09-19 1:28 UTC (permalink / raw)
To: axboe; +Cc: linux-block, linux-kernel, Li zeming
The key pointer does not need to cast the type.
Signed-off-by: Li zeming <zeming@nfschina.com>
---
block/blk-iocost.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/block/blk-iocost.c b/block/blk-iocost.c
index 7936e5f5821c..b473efd89b86 100644
--- a/block/blk-iocost.c
+++ b/block/blk-iocost.c
@@ -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;
--
2.18.2
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH] block: Remove unnecessary (void*) conversions
2022-09-19 1:28 [PATCH] block: Remove unnecessary (void*) conversions Li zeming
@ 2022-09-20 14:29 ` Jens Axboe
0 siblings, 0 replies; 3+ messages in thread
From: Jens Axboe @ 2022-09-20 14:29 UTC (permalink / raw)
To: Li zeming; +Cc: linux-block, linux-kernel
On Mon, 19 Sep 2022 09:28:25 +0800, Li zeming wrote:
> The key pointer does not need to cast the type.
>
>
Applied, thanks!
[1/1] block: Remove unnecessary (void*) conversions
commit: a7609c68f7a117a77b3049c2353f555854be69e9
Best regards,
--
Jens Axboe
^ permalink raw reply [flat|nested] 3+ messages in thread
* [PATCH] block: remove unnecessary (void *) conversions
@ 2022-08-12 8:18 shijm
0 siblings, 0 replies; 3+ messages in thread
From: shijm @ 2022-08-12 8:18 UTC (permalink / raw)
To: axboe; +Cc: linux-block, linux-kernel, Shi junming
From: Shi junming <junming@nfschina.com>
void * is not necessary,remove unnecessary (void *) conversions.
Signed-off-by: Shi junming <junming@nfschina.com>
---
block/blk-crypto-fallback.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/block/blk-crypto-fallback.c b/block/blk-crypto-fallback.c
index 7c854584b52b..586cce5b3cc9 100644
--- a/block/blk-crypto-fallback.c
+++ b/block/blk-crypto-fallback.c
@@ -516,7 +516,7 @@ bool blk_crypto_fallback_bio_prep(struct bio **bio_ptr)
f_ctx->crypt_iter = bio->bi_iter;
f_ctx->bi_private_orig = bio->bi_private;
f_ctx->bi_end_io_orig = bio->bi_end_io;
- bio->bi_private = (void *)f_ctx;
+ bio->bi_private = f_ctx;
bio->bi_end_io = blk_crypto_fallback_decrypt_endio;
bio_crypt_free_ctx(bio);
--
2.18.2
^ permalink raw reply related [flat|nested] 3+ messages in thread
end of thread, other threads:[~2022-09-20 14:29 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-09-19 1:28 [PATCH] block: Remove unnecessary (void*) conversions Li zeming
2022-09-20 14:29 ` Jens Axboe
-- strict thread matches above, loose matches on Subject: below --
2022-08-12 8:18 [PATCH] block: remove unnecessary (void *) conversions shijm
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).