LKML Archive on lore.kernel.org
help / color / mirror / Atom feed
From: Ulf Hansson <ulf.hansson@linaro.org>
To: Chanwoo Lee <cw9316.lee@samsung.com>
Cc: Adrian Hunter <adrian.hunter@intel.com>, Coly Li <colyli@suse.de>,
	Jens Axboe <axboe@kernel.dk>, Eric Biggers <ebiggers@google.com>,
	Peter Collingbourne <pcc@google.com>,
	Luca Porzio <porzio@gmail.com>,
	linux-mmc <linux-mmc@vger.kernel.org>,
	Linux Kernel Mailing List <linux-kernel@vger.kernel.org>,
	grant.jung@samsung.com, jt77.jang@samsung.com,
	DooHyun Hwang <dh0421.hwang@samsung.com>,
	Seunghui Lee <sh043.lee@samsung.com>
Subject: Re: [PATCH] mmc: queue: Match the data type of max_segments
Date: Tue, 24 Aug 2021 16:56:55 +0200	[thread overview]
Message-ID: <CAPDyKFpRLvsY79srmmi-2nS4ACR37QK+KqUmtvPL00raRG-dcg@mail.gmail.com> (raw)
In-Reply-To: <20210824073934.19727-1-cw9316.lee@samsung.com>

On Tue, 24 Aug 2021 at 09:46, Chanwoo Lee <cw9316.lee@samsung.com> wrote:
>
> From: ChanWoo Lee <cw9316.lee@samsung.com>
>
> Each function has a different data type for max_segments,
> Modify to match unsigned short(host->max_segs).
> * unsigned short          max_segs;       /* see blk_queue_max_segments */
>
> 1) Return type : unsigned int
> static unsigned int mmc_get_max_segments(struct mmc_host *host)
> {
>        return host->can_dma_map_merge ? MMC_DMA_MAP_MERGE_SEGMENTS :
>                                          host->max_segs;
> }
>
> 2) Parameter type : int
>  mmc_alloc_sg(mmc_get_max_segments(host), gfp);
>    -> static struct scatterlist *mmc_alloc_sg(int sg_len, gfp_t gfp)
>
> 3) Parameter type : unsigned short
>  blk_queue_max_segments(mq->queue, mmc_get_max_segments(host));
>    -> void blk_queue_max_segments(struct request_queue *q,
>                                         unsigned short max_segments)
>
> Signed-off-by: ChanWoo Lee <cw9316.lee@samsung.com>

Applied for next, thanks!

Kind regards
Uffe


> ---
>  drivers/mmc/core/queue.c | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/mmc/core/queue.c b/drivers/mmc/core/queue.c
> index cc3261777637..48304bcf963c 100644
> --- a/drivers/mmc/core/queue.c
> +++ b/drivers/mmc/core/queue.c
> @@ -163,7 +163,7 @@ static void mmc_mq_recovery_handler(struct work_struct *work)
>         blk_mq_run_hw_queues(q, true);
>  }
>
> -static struct scatterlist *mmc_alloc_sg(int sg_len, gfp_t gfp)
> +static struct scatterlist *mmc_alloc_sg(unsigned short sg_len, gfp_t gfp)
>  {
>         struct scatterlist *sg;
>
> @@ -193,7 +193,7 @@ static void mmc_queue_setup_discard(struct request_queue *q,
>                 blk_queue_flag_set(QUEUE_FLAG_SECERASE, q);
>  }
>
> -static unsigned int mmc_get_max_segments(struct mmc_host *host)
> +static unsigned short mmc_get_max_segments(struct mmc_host *host)
>  {
>         return host->can_dma_map_merge ? MMC_DMA_MAP_MERGE_SEGMENTS :
>                                          host->max_segs;
> --
> 2.29.0
>

      parent reply	other threads:[~2021-08-24 14:57 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <CGME20210824074651epcas1p3b6965040fa6a4660a31192f96125c374@epcas1p3.samsung.com>
2021-08-24  7:39 ` Chanwoo Lee
2021-08-24 10:26   ` Coly Li
2021-08-24 14:56   ` Ulf Hansson [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=CAPDyKFpRLvsY79srmmi-2nS4ACR37QK+KqUmtvPL00raRG-dcg@mail.gmail.com \
    --to=ulf.hansson@linaro.org \
    --cc=adrian.hunter@intel.com \
    --cc=axboe@kernel.dk \
    --cc=colyli@suse.de \
    --cc=cw9316.lee@samsung.com \
    --cc=dh0421.hwang@samsung.com \
    --cc=ebiggers@google.com \
    --cc=grant.jung@samsung.com \
    --cc=jt77.jang@samsung.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mmc@vger.kernel.org \
    --cc=pcc@google.com \
    --cc=porzio@gmail.com \
    --cc=sh043.lee@samsung.com \
    --subject='Re: [PATCH] mmc: queue: Match the data type of max_segments' \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link

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