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] [thread-next>] [day] [month] [year] [list]
Date:   Wed, 25 Aug 2021 11:58:39 +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 v2] mmc: queue: Remove unused parameters(request_queue)

On 25/08/21 10:46 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>

Acked-by: Adrian Hunter <adrian.hunter@...el.com>

> 
> ---
> 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)
>  {
> 

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ