LKML Archive on lore.kernel.org
help / color / mirror / Atom feed
* [PATCH v2] mmc: queue: Remove unused parameters(request_queue)
[not found] <CGME20210825075311epcas1p4b64d6a5a824983c91f7d5d1dc24a4cc2@epcas1p4.samsung.com>
@ 2021-08-25 7:46 ` Chanwoo Lee
2021-08-25 8:58 ` Adrian Hunter
2021-08-25 9:22 ` Ulf Hansson
0 siblings, 2 replies; 3+ messages in thread
From: Chanwoo Lee @ 2021-08-25 7:46 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>
---
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
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH v2] mmc: queue: Remove unused parameters(request_queue)
2021-08-25 7:46 ` [PATCH v2] mmc: queue: Remove unused parameters(request_queue) Chanwoo Lee
@ 2021-08-25 8:58 ` Adrian Hunter
2021-08-25 9:22 ` Ulf Hansson
1 sibling, 0 replies; 3+ messages in thread
From: Adrian Hunter @ 2021-08-25 8:58 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 10:46 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>
Acked-by: Adrian Hunter <adrian.hunter@intel.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)
> {
>
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH v2] mmc: queue: Remove unused parameters(request_queue)
2021-08-25 7:46 ` [PATCH v2] mmc: queue: Remove unused parameters(request_queue) Chanwoo Lee
2021-08-25 8:58 ` Adrian Hunter
@ 2021-08-25 9:22 ` Ulf Hansson
1 sibling, 0 replies; 3+ messages in thread
From: Ulf Hansson @ 2021-08-25 9:22 UTC (permalink / raw)
To: Chanwoo Lee
Cc: Adrian Hunter, Coly Li, Jens Axboe, Eric Biggers,
Peter Collingbourne, Luca Porzio, linux-mmc,
Linux Kernel Mailing List, grant.jung, jt77.jang, DooHyun Hwang,
Seunghui Lee
On Wed, 25 Aug 2021 at 09:53, Chanwoo Lee <cw9316.lee@samsung.com> 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>
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
>
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2021-08-25 9:25 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
[not found] <CGME20210825075311epcas1p4b64d6a5a824983c91f7d5d1dc24a4cc2@epcas1p4.samsung.com>
2021-08-25 7:46 ` [PATCH v2] mmc: queue: Remove unused parameters(request_queue) Chanwoo Lee
2021-08-25 8:58 ` Adrian Hunter
2021-08-25 9:22 ` Ulf Hansson
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).