All of lore.kernel.org
 help / color / mirror / Atom feed
From: Coly Li <colyli@suse.de>
To: Chanwoo Lee <cw9316.lee@samsung.com>
Cc: grant.jung@samsung.com, jt77.jang@samsung.com,
	dh0421.hwang@samsung.com, sh043.lee@samsung.com,
	adrian.hunter@intel.com, axboe@kernel.dk, ebiggers@google.com,
	pcc@google.com, porzio@gmail.com, ulf.hansson@linaro.org,
	linux-mmc@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] mmc: queue: Match the data type of max_segments
Date: Tue, 24 Aug 2021 18:26:30 +0800	[thread overview]
Message-ID: <23afe53a-f73d-f8ff-322c-6d77d56ee9fa@suse.de> (raw)
In-Reply-To: <20210824073934.19727-1-cw9316.lee@samsung.com>

On 8/24/21 3:39 PM, Chanwoo Lee 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>

I am not sure whether it is mandatory necessary here, but it is OK for me.

Acked-by: Coly Li <colyli@suse.de>

Thanks.

Coly Li

> ---
>  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;


  reply	other threads:[~2021-08-24 10:26 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 ` [PATCH] mmc: queue: Match the data type of max_segments Chanwoo Lee
2021-08-24 10:26   ` Coly Li [this message]
2021-08-24 14:56   ` Ulf Hansson

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=23afe53a-f73d-f8ff-322c-6d77d56ee9fa@suse.de \
    --to=colyli@suse.de \
    --cc=adrian.hunter@intel.com \
    --cc=axboe@kernel.dk \
    --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 \
    --cc=ulf.hansson@linaro.org \
    /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
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.