Received: by 2002:a05:6a10:1d13:0:0:0:0 with SMTP id pp19csp2803599pxb; Tue, 24 Aug 2021 08:00:25 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxsAHfXyyPCf6Cayzi/LzQtt4rdq1o/+TscVrLHcROqlUAWCoNah3QSYUGdurg+1QA+ZdWM X-Received: by 2002:a05:6602:2ac7:: with SMTP id m7mr31882732iov.66.1629817225131; Tue, 24 Aug 2021 08:00:25 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1629817225; cv=none; d=google.com; s=arc-20160816; b=PQIVyWxgeZggYirCl5zI9jfK6tx2nFkTczv1dOReRORTu8+Quc/UnHzMrtyme8eFA0 8gW3tU7Q3m/hJXNbPWWEjro7q71wXZfsEz3PLKas/ByOi17tSjOFTExWW+vlSUWyzn9Z sfHE4iet3U72RcruTGnAMxMDym3BA21ENXrAZcQ6A8dMhb1ikRZ7BASoPnWZkaQLGSrN 5MBtNqPEpc12/SlQb7gSzxInpZTkenJpl9iUMgY9ALDQPQjWuWw7dzs6EPHoBVUQHubT 1kgGKGuJCSg9LZ9UDzPmGWfU5mWYgj3oaIkr1OB+qvUBXViCJOwlM8O6A5NNLXK2YPec n+Hw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:subject:message-id:date:from:in-reply-to :references:mime-version:dkim-signature; bh=cYunF8tEYq+2ajwHU1FHWc2rL4BPeRKMk17xOmv7jeM=; b=COjwHJnYXWixGTbxj6c1gqGYlG4dZQSDgyTcjldX52kHFpnf0RsgujXge9BX97TRby KZPEtZknwkkoyQuPy3r+EUTpKbrE8F6SjiAbnn8rGmH/kDYeTk8mIEK89yvCDn7WOJ59 HjrdJRWZadTCPCiZguaRAhDSqZVrEuI3zbwhl6SyhW1//Huxo0kkMdxao723xqIoVnT7 UGvpXDBVW682jAkyNwsrEZmC9/E2gQqV9aeH3MdeO7cwt9oqDuBRpteb/d3PsWK+CrBf VJ+28LV1h6dNSBtusfOqKqZqaUEbrq/e2mgHTa1SU4aymLYIFL75mv1Sr1f/+/WTQmyR YF0w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=BIwK6SNM; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id b16si16062943ior.73.2021.08.24.08.00.12; Tue, 24 Aug 2021 08:00:25 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=BIwK6SNM; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S238111AbhHXO6V (ORCPT + 99 others); Tue, 24 Aug 2021 10:58:21 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:56272 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S238060AbhHXO6R (ORCPT ); Tue, 24 Aug 2021 10:58:17 -0400 Received: from mail-lf1-x136.google.com (mail-lf1-x136.google.com [IPv6:2a00:1450:4864:20::136]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 5E56DC0613C1 for ; Tue, 24 Aug 2021 07:57:33 -0700 (PDT) Received: by mail-lf1-x136.google.com with SMTP id i28so46192133lfl.2 for ; Tue, 24 Aug 2021 07:57:33 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=cYunF8tEYq+2ajwHU1FHWc2rL4BPeRKMk17xOmv7jeM=; b=BIwK6SNM6DPrcqf+N9QuLMTruAnh4xX+CpguIfdVPQNwfBwgBQ6+RRiisOeE/C12As iHaZgZ3Uouh3szimZQYrFmeq/WuIzoOdYgdQV0kjvmqUWCjbtRAcR3MpT9nitq2ybh8W W+AX8Ur2L4DhlwwEEijeEixoP7pFQWdR9D8Iwv5cgmrnYVJPR9+7/QzqCcfQ3DTZNKTQ J7bGereC1JJivZi3HcJYmDd1rHWhWEmyKsY/WITd0T7xe/oLGEYfp7ib2MJMbEe745iQ uSH+uqV2nusQhgOct5bpRuef0askYX7FUuWiRUCkQ7ruf5QExaUnbXQ/Mo5+HOSk+i4h Ss2w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=cYunF8tEYq+2ajwHU1FHWc2rL4BPeRKMk17xOmv7jeM=; b=I4K8jVcJBie0fhdixU6BxnhcIZUb+BglmIT4LTn86KTB2XP5LJDE+YahncpJJK86iU 4LDPMmoFt63JI25LpiAjzciiVF/kHXZG8ztrPUZ0gXewebTN0JpO7k115uj/qvyp/WkF Pyf/RKwXySWOSuNl5UG0bZE8q4zhWSh8/yZ0iz9672ADq1oRKHZgqZErVW2C9d3fLKtV /yNfjGaxfMYq/voNUHSRN+5/zz8uLHOxeXmmN9LnRVlXsLpw+7hnirw6mG/lDHlapHne /FuR9G44dT+TAK7Lx5hfUlheSOyEwWF/G/dMaoh4UHZJtnTW/mvGK+zzMAvmS0a9KMNi GF4A== X-Gm-Message-State: AOAM531hqxZLPdhP4RA2GQx8ToHy36C4VW07+3ResmxOT+vrp+Yj+uuN AbIEfbJgu48K6EZ4/79qW4MZsbsu0RPcD381CexU4Q== X-Received: by 2002:a05:6512:e99:: with SMTP id bi25mr3314856lfb.486.1629817051781; Tue, 24 Aug 2021 07:57:31 -0700 (PDT) MIME-Version: 1.0 References: <20210824073934.19727-1-cw9316.lee@samsung.com> In-Reply-To: <20210824073934.19727-1-cw9316.lee@samsung.com> From: Ulf Hansson Date: Tue, 24 Aug 2021 16:56:55 +0200 Message-ID: Subject: Re: [PATCH] mmc: queue: Match the data type of max_segments To: Chanwoo Lee Cc: Adrian Hunter , Coly Li , Jens Axboe , Eric Biggers , Peter Collingbourne , Luca Porzio , linux-mmc , Linux Kernel Mailing List , grant.jung@samsung.com, jt77.jang@samsung.com, DooHyun Hwang , Seunghui Lee Content-Type: text/plain; charset="UTF-8" Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, 24 Aug 2021 at 09:46, Chanwoo Lee wrote: > > From: ChanWoo Lee > > 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 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 >