Received: by 2002:a05:6a10:1d13:0:0:0:0 with SMTP id pp19csp258419pxb; Wed, 25 Aug 2021 02:27:23 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzJLxY5+vuHik4peUe4/42T8NFRsbvBem2ZbVZR9dpcwA1x9vhu3/G/t1pwyzlIJnIO0mSt X-Received: by 2002:a05:6602:218d:: with SMTP id b13mr35026386iob.143.1629883642797; Wed, 25 Aug 2021 02:27:22 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1629883642; cv=none; d=google.com; s=arc-20160816; b=IpXFWzAoYEBae12+8NJ1+QWSZ6wcx5nPxFsqDvzwCD6q504ChasZHx2NtGV5tNWkrC BoZfXuLdLGVNekho/AcaRGYsBrQPS/eBlEtELTVzGhReWWVEVjAZyjnY4/l7zq6Qe3Af Ur8kcOvyT1wrjAqSJpHj7M0mXwdX+ttjibNjGQY+ieYaGhbeE5jt1WtFU8/514Regw5K DP9344cma2Cg93m52sAjSPEaUZ4wn+qT4fXHye9CV0MJiYYUFVOfbO1HX0lLa8RHMVnl FMO0vS/0cVwHCLCkaw5lB+fXfubrF1QjJd/YwO6d+3lUZ741cHFRwQyQf2J0V4JVMIxl NqSQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:subject:message-id:date:from:in-reply-to :references:mime-version:dkim-signature; bh=kJ3IRgkWrnbEBgK8GKbfb9hriWmM8713CJTXI0Prmzs=; b=pG3Dqxif9MJCfyUC8+7KHhpMPw7WsRTB+cMY11ZXr9i4fDTnfGCzZlH6BhNrecsapt 2k1UJByEYO5PWy2MX4sgvh04OTzwLDvSwkd9WBefO92cSDm6ERXJLN+P/o0B0UEBhq5a /E7tEJ8O55MTkWg21oNbnduNhTz5F20Oog06IhKuVumuBVpeCNwhWmj0GKkVO9q7RDu+ +KbWCSZKAoOAt47QgP2U40FvikZ5hHLSzzT0r94MWTxyYaVoBADCve2r7wVb7l4t2SV+ lvASGP6cGQwpQZYgTHW6MkcsHgsA0DvPEMxJ+oBWAPePgi9iUCbSznwl9+muTQwzc4zS mdFw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=NmbKoUY+; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id l18si3824100ilc.72.2021.08.25.02.27.10; Wed, 25 Aug 2021 02:27:22 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=NmbKoUY+; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S239517AbhHYJ0O (ORCPT + 99 others); Wed, 25 Aug 2021 05:26:14 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:53910 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S239635AbhHYJYN (ORCPT ); Wed, 25 Aug 2021 05:24:13 -0400 Received: from mail-lj1-x233.google.com (mail-lj1-x233.google.com [IPv6:2a00:1450:4864:20::233]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 2225EC061757 for ; Wed, 25 Aug 2021 02:23:28 -0700 (PDT) Received: by mail-lj1-x233.google.com with SMTP id j12so28030431ljg.10 for ; Wed, 25 Aug 2021 02:23:28 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=kJ3IRgkWrnbEBgK8GKbfb9hriWmM8713CJTXI0Prmzs=; b=NmbKoUY+Ii3vbCq7K4YkwFAmGH3DPkkiCuNXGSh7R/6F/2uMM1gEln0n9STY6mHt7+ QdwY3g8gRcAD9O1yPdBkfaE8HsHk32YaFSGdsnmcY2RLI9EOVluFdptDR+OM/JSqmd7B aCgMkag/20lw9XkhZOJx4FCUHIaLmDhFviY7y4xiLXoRlA2mu+PMBRK0Xq1PPiXAANUm 87qFZLlsRpOxBLnjSttWSgaKLU8/GFgKlpR6IDfvLLgOWUoTImPbi6lYw2wgb209EFXR //gWznw7Zkhn3UDbiiFrRxWw+u7iTyKa4O+AZd81YHTVfr+Wn2XZ3KM5MwRVQjXL1UU7 rZGQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=kJ3IRgkWrnbEBgK8GKbfb9hriWmM8713CJTXI0Prmzs=; b=umVK+PhxVThV+DTL08TzsNVowA8OeX1DPXl6KjzYh2dxKbQCWEYtNqUSh4od2ZcKRn 12NZN8fG4yTXhLOL72NcT5NI2txiHe4rkUTw0L3VolvQrPgl/xuvNCnb5N4Fjhu1iq1t s6CBUcjwqV6aypYjluwKPdC3eY2fI3PUSxEqIBj7JW2Wq7xrz8NcoEEInauKVk0PyPRv s2bjcrSqVIr9wtDqeDQEIQgnp1ayU+thhRkgOj0MDU0c6RxxQQbzf5fxOCrgA9QwSckL 9kNRefuCd6RL3+bndCMUJkyxyKLXWh6gkqlZcjzgyq4ekGTBP0GqjZIhFMR+dy9FXAIM ODBA== X-Gm-Message-State: AOAM530fPwILKV9tYSlYoF2be5UdxhNe9YnxMr7LS8kAa1ty8l9uZA4f WQ1oXYSI3kE9oEVaR2ZfybkH65k0p0QnH7WtYPq/vA== X-Received: by 2002:a2e:a410:: with SMTP id p16mr33667752ljn.364.1629883406536; Wed, 25 Aug 2021 02:23:26 -0700 (PDT) MIME-Version: 1.0 References: <20210825074601.8881-1-cw9316.lee@samsung.com> In-Reply-To: <20210825074601.8881-1-cw9316.lee@samsung.com> From: Ulf Hansson Date: Wed, 25 Aug 2021 11:22:50 +0200 Message-ID: Subject: Re: [PATCH v2] mmc: queue: Remove unused parameters(request_queue) To: Chanwoo Lee Cc: Adrian Hunter , Coly Li , Jens Axboe , Eric Biggers , Peter Collingbourne , Luca Porzio , linux-mmc , Linux Kernel Mailing List , grant.jung@samsung.com, jt77.jang@samsung.com, DooHyun Hwang , Seunghui Lee Content-Type: text/plain; charset="UTF-8" Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, 25 Aug 2021 at 09:53, Chanwoo Lee wrote: > > From: ChanWoo Lee > > In function mmc_exit_request, the request_queue structure(*q) is not used. > I remove the unnecessary code related to the request_queue structure. > > Signed-off-by: ChanWoo Lee Applied for next, thanks! Kind regards Uffe > > --- > v1->v2: > * Put the code directly into mmc_mq_init_reuqest()/mmc_mq_exit_request(). > --- > drivers/mmc/core/queue.c | 30 ++++++------------------------ > 1 file changed, 6 insertions(+), 24 deletions(-) > > diff --git a/drivers/mmc/core/queue.c b/drivers/mmc/core/queue.c > index cc3261777637..5526e4ca2834 100644 > --- a/drivers/mmc/core/queue.c > +++ b/drivers/mmc/core/queue.c > @@ -199,27 +199,23 @@ static unsigned int mmc_get_max_segments(struct mmc_host *host) > host->max_segs; > } > > -/** > - * mmc_init_request() - initialize the MMC-specific per-request data > - * @mq: the request queue > - * @req: the request > - * @gfp: memory allocation policy > - */ > -static int __mmc_init_request(struct mmc_queue *mq, struct request *req, > - gfp_t gfp) > +static int mmc_mq_init_request(struct blk_mq_tag_set *set, struct request *req, > + unsigned int hctx_idx, unsigned int numa_node) > { > struct mmc_queue_req *mq_rq = req_to_mmc_queue_req(req); > + struct mmc_queue *mq = set->driver_data; > struct mmc_card *card = mq->card; > struct mmc_host *host = card->host; > > - mq_rq->sg = mmc_alloc_sg(mmc_get_max_segments(host), gfp); > + mq_rq->sg = mmc_alloc_sg(mmc_get_max_segments(host), GFP_KERNEL); > if (!mq_rq->sg) > return -ENOMEM; > > return 0; > } > > -static void mmc_exit_request(struct request_queue *q, struct request *req) > +static void mmc_mq_exit_request(struct blk_mq_tag_set *set, struct request *req, > + unsigned int hctx_idx) > { > struct mmc_queue_req *mq_rq = req_to_mmc_queue_req(req); > > @@ -227,20 +223,6 @@ static void mmc_exit_request(struct request_queue *q, struct request *req) > mq_rq->sg = NULL; > } > > -static int mmc_mq_init_request(struct blk_mq_tag_set *set, struct request *req, > - unsigned int hctx_idx, unsigned int numa_node) > -{ > - return __mmc_init_request(set->driver_data, req, GFP_KERNEL); > -} > - > -static void mmc_mq_exit_request(struct blk_mq_tag_set *set, struct request *req, > - unsigned int hctx_idx) > -{ > - struct mmc_queue *mq = set->driver_data; > - > - mmc_exit_request(mq->queue, req); > -} > - > static blk_status_t mmc_mq_queue_rq(struct blk_mq_hw_ctx *hctx, > const struct blk_mq_queue_data *bd) > { > -- > 2.29.0 >