LKML Archive on lore.kernel.org
help / color / mirror / Atom feed
* [PATCH] mmc: queue: Remove unused parameters(request_queue)
[not found] <CGME20210825004043epcas1p33ca4a682a765e1270258bba083fe66d6@epcas1p3.samsung.com>
@ 2021-08-25 0:33 ` Chanwoo Lee
2021-08-25 4:46 ` Adrian Hunter
0 siblings, 1 reply; 2+ messages in thread
From: Chanwoo Lee @ 2021-08-25 0:33 UTC (permalink / raw)
To: ulf.hansson, adrian.hunter, cw9316.lee, colyli, axboe, ebiggers,
pcc, porzio, linux-mmc, linux-kernel
Cc: grant.jung, jt77.jang, dh0421.hwang, sh043.lee
From: ChanWoo Lee <cw9316.lee@samsung.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@samsung.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);
}
static blk_status_t mmc_mq_queue_rq(struct blk_mq_hw_ctx *hctx,
--
2.29.0
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [PATCH] mmc: queue: Remove unused parameters(request_queue)
2021-08-25 0:33 ` [PATCH] mmc: queue: Remove unused parameters(request_queue) Chanwoo Lee
@ 2021-08-25 4:46 ` Adrian Hunter
0 siblings, 0 replies; 2+ messages in thread
From: Adrian Hunter @ 2021-08-25 4:46 UTC (permalink / raw)
To: Chanwoo Lee, ulf.hansson, colyli, axboe, ebiggers, pcc, porzio,
linux-mmc, linux-kernel
Cc: grant.jung, jt77.jang, dh0421.hwang, sh043.lee
On 25/08/21 3:33 am, Chanwoo Lee wrote:
> From: ChanWoo Lee <cw9316.lee@samsung.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@samsung.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,
>
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2021-08-25 4:45 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
[not found] <CGME20210825004043epcas1p33ca4a682a765e1270258bba083fe66d6@epcas1p3.samsung.com>
2021-08-25 0:33 ` [PATCH] mmc: queue: Remove unused parameters(request_queue) Chanwoo Lee
2021-08-25 4:46 ` Adrian Hunter
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).