lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <2e292b9c-9b1e-dc3e-45f9-06beb31d79b6@intel.com>
Date:   Wed, 25 Aug 2021 07:46:23 +0300
From:   Adrian Hunter <adrian.hunter@...el.com>
To:     Chanwoo Lee <cw9316.lee@...sung.com>, ulf.hansson@...aro.org,
        colyli@...e.de, axboe@...nel.dk, ebiggers@...gle.com,
        pcc@...gle.com, porzio@...il.com, linux-mmc@...r.kernel.org,
        linux-kernel@...r.kernel.org
Cc:     grant.jung@...sung.com, jt77.jang@...sung.com,
        dh0421.hwang@...sung.com, sh043.lee@...sung.com
Subject: Re: [PATCH] mmc: queue: Remove unused parameters(request_queue)

On 25/08/21 3:33 am, Chanwoo Lee wrote:
> From: ChanWoo Lee <cw9316.lee@...sung.com>
> 
> 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 <cw9316.lee@...sung.com>
> ---
>  drivers/mmc/core/queue.c | 6 ++----
>  1 file changed, 2 insertions(+), 4 deletions(-)
> 
> diff --git a/drivers/mmc/core/queue.c b/drivers/mmc/core/queue.c
> index cc3261777637..b742385361e4 100644
> --- a/drivers/mmc/core/queue.c
> +++ b/drivers/mmc/core/queue.c
> @@ -219,7 +219,7 @@ static int __mmc_init_request(struct mmc_queue *mq, struct request *req,
>  	return 0;
>  }
>  
> -static void mmc_exit_request(struct request_queue *q, struct request *req)
> +static void mmc_exit_request(struct request *req)
>  {
>  	struct mmc_queue_req *mq_rq = req_to_mmc_queue_req(req);
>  
> @@ -236,9 +236,7 @@ static int mmc_mq_init_request(struct blk_mq_tag_set *set, 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 *mq = set->driver_data;
> -
> -	mmc_exit_request(mq->queue, req);
> +	mmc_exit_request(req);

It seems this is the only caller of mmc_exit_request().  It is probably
leftover from before the switch to blk-mq.  However we might as well get rid
of it and just put the code directly into mmc_mq_exit_request().

The same applies to mmc_mq_init_request() and __mmc_init_request(), so might
as well tidy up those also.

>  }
>  
>  static blk_status_t mmc_mq_queue_rq(struct blk_mq_hw_ctx *hctx,
> 

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ