Skip to content

Commit f6f6070

Browse files
ChanWoo Leestorulf
authored andcommitted
mmc: queue: Match the data type of max_segments
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 <[email protected]> Acked-by: Coly Li <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Ulf Hansson <[email protected]>
1 parent b048457 commit f6f6070

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

drivers/mmc/core/queue.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -163,7 +163,7 @@ static void mmc_mq_recovery_handler(struct work_struct *work)
163163
blk_mq_run_hw_queues(q, true);
164164
}
165165

166-
static struct scatterlist *mmc_alloc_sg(int sg_len, gfp_t gfp)
166+
static struct scatterlist *mmc_alloc_sg(unsigned short sg_len, gfp_t gfp)
167167
{
168168
struct scatterlist *sg;
169169

@@ -193,7 +193,7 @@ static void mmc_queue_setup_discard(struct request_queue *q,
193193
blk_queue_flag_set(QUEUE_FLAG_SECERASE, q);
194194
}
195195

196-
static unsigned int mmc_get_max_segments(struct mmc_host *host)
196+
static unsigned short mmc_get_max_segments(struct mmc_host *host)
197197
{
198198
return host->can_dma_map_merge ? MMC_DMA_MAP_MERGE_SEGMENTS :
199199
host->max_segs;

0 commit comments

Comments
 (0)