From nobody Sat May 2 10:31:41 2026 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id AA0CAC43334 for ; Wed, 6 Jul 2022 05:36:27 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230070AbiGFFg0 (ORCPT ); Wed, 6 Jul 2022 01:36:26 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:56910 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230060AbiGFFgX (ORCPT ); Wed, 6 Jul 2022 01:36:23 -0400 Received: from mail.nfschina.com (unknown [IPv6:2400:dd01:100f:2:72e2:84ff:fe10:5f45]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 60EB221832; Tue, 5 Jul 2022 22:36:22 -0700 (PDT) Received: from localhost (unknown [127.0.0.1]) by mail.nfschina.com (Postfix) with ESMTP id CF4A51E80D40; Wed, 6 Jul 2022 13:34:09 +0800 (CST) X-Virus-Scanned: amavisd-new at test.com Received: from mail.nfschina.com ([127.0.0.1]) by localhost (mail.nfschina.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id azf0dByZUBnt; Wed, 6 Jul 2022 13:34:07 +0800 (CST) Received: from localhost.localdomain (unknown [180.167.10.98]) (Authenticated sender: yuzhe@nfschina.com) by mail.nfschina.com (Postfix) with ESMTPA id A40581E80CDE; Wed, 6 Jul 2022 13:34:06 +0800 (CST) From: Yu Zhe To: paolo.valente@linaro.org, axboe@kernel.dk Cc: linux-block@vger.kernel.org, linux-kernel@vger.kernel.org, liqiong@nfschina.com, Yu Zhe Subject: [PATCH] block: remove unnecessary type castings Date: Wed, 6 Jul 2022 13:35:29 +0800 Message-Id: <20220706053529.15952-1-yuzhe@nfschina.com> X-Mailer: git-send-email 2.11.0 Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" remove unnecessary void* type castings. Signed-off-by: Yu Zhe --- block/bfq-wf2q.c | 6 +++--- block/blk-iocost.c | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/block/bfq-wf2q.c b/block/bfq-wf2q.c index f8eb340381cf..2a666b100bcb 100644 --- a/block/bfq-wf2q.c +++ b/block/bfq-wf2q.c @@ -474,7 +474,7 @@ static void bfq_active_insert(struct bfq_service_tree *= st, #ifdef CONFIG_BFQ_GROUP_IOSCHED sd =3D entity->sched_data; bfqg =3D container_of(sd, struct bfq_group, sched_data); - bfqd =3D (struct bfq_data *)bfqg->bfqd; + bfqd =3D bfqg->bfqd; #endif if (bfqq) list_add(&bfqq->bfqq_list, &bfqq->bfqd->active_list); @@ -573,7 +573,7 @@ static void bfq_active_extract(struct bfq_service_tree = *st, #ifdef CONFIG_BFQ_GROUP_IOSCHED sd =3D entity->sched_data; bfqg =3D container_of(sd, struct bfq_group, sched_data); - bfqd =3D (struct bfq_data *)bfqg->bfqd; + bfqd =3D bfqg->bfqd; #endif if (bfqq) list_del(&bfqq->bfqq_list); @@ -719,7 +719,7 @@ __bfq_entity_update_weight_prio(struct bfq_service_tree= *old_st, else { sd =3D entity->my_sched_data; bfqg =3D container_of(sd, struct bfq_group, sched_data); - bfqd =3D (struct bfq_data *)bfqg->bfqd; + bfqd =3D bfqg->bfqd; } #endif =20 diff --git a/block/blk-iocost.c b/block/blk-iocost.c index 33a11ba971ea..117181a69b7a 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_e= ntry, unsigned mode, int flags, void *key) { struct iocg_wait *wait =3D container_of(wq_entry, struct iocg_wait, wait); - struct iocg_wake_ctx *ctx =3D (struct iocg_wake_ctx *)key; + struct iocg_wake_ctx *ctx =3D key; u64 cost =3D abs_cost_to_cost(wait->abs_cost, ctx->hw_inuse); =20 ctx->vbudget -=3D cost; --=20 2.11.0