Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 977B2C7EE29 for ; Fri, 9 Jun 2023 09:12:57 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:In-Reply-To:From:References:Cc:To: Subject:MIME-Version:Date:Message-ID:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=DT1HA/JICWvEozNGfmvDwcIee4QbcC+lxxKPqoKbbq8=; b=fOooyxmUsKXlNE dfPHosAMGyRjsKsgJijOqpcpOjnS/VN93HoRGTnwwvaEicqmbgXGw6Mo8olw728K5rcXU8vU0Rbxf iUQGBgN/ZOsxqSvJw073lkD+1cu+4Nu1ZO/rPJCc+jikSaCi8YyqdzHjrtpbRPv6EzEISEWc+wH/a cUtQiN9lY3lHj52IlWE81eV/GYefeCsWV85Am0OCijrS7s8U5GZq0yN7anfFkUVCgmVK+ag8C6ZaQ JnY+mttGyyzQj+wutUdV5j88EIzLGQgukKym0NpHeQWKwLvf9sW9MW3TJTwuZWKLIICV2v7k2GKSs px6WIfe/Dp7dq/uVwJCw==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.96 #2 (Red Hat Linux)) id 1q7YAa-00CMvj-0O; Fri, 09 Jun 2023 09:12:32 +0000 Received: from mga18.intel.com ([134.134.136.126]) by bombadil.infradead.org with esmtps (Exim 4.96 #2 (Red Hat Linux)) id 1q7YAX-00CMu9-0Z; Fri, 09 Jun 2023 09:12:30 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1686301949; x=1717837949; h=message-id:date:mime-version:subject:to:cc:references: from:in-reply-to:content-transfer-encoding; bh=93ZLQ7GbcuEOHJKm+7M5gk5bDuq5Blp9uV7UhfBhj4A=; b=m7dCDHiMD4km1LBsF/a3XJd/BeYLvh5q494WFJc5BMJUvU1xdYbcb4Zp qQevi0l0IN9fuDTFYrPwjvEgMLx/rZhdL0XHX+JoVu6SG1GxDafRktCdT yMz4tW5G64X7NYoZpYSroIxd0zjWw7073ThAzSjIFRVFZ50ftCW/HwpfG EeFK24auTDTPDoxdt2/xkMYZ/kWT4/qHOluZmQKyxqR0RXvfSMDyf/C2T WGQJST9RBTmoOIR5eI81R4nkIM6Ax0jalFh9AWFjJt3j+OkGyczsD4GlM sCccoMp1w3QUATJTwG4XmvCc8lhAdcK+odsamkYPRbQ2cJIbSgauxeVHZ A==; X-IronPort-AV: E=McAfee;i="6600,9927,10735"; a="342230800" X-IronPort-AV: E=Sophos;i="6.00,228,1681196400"; d="scan'208";a="342230800" Received: from fmsmga008.fm.intel.com ([10.253.24.58]) by orsmga106.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 09 Jun 2023 02:12:23 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6600,9927,10735"; a="775428713" X-IronPort-AV: E=Sophos;i="6.00,228,1681196400"; d="scan'208";a="775428713" Received: from ahunter6-mobl1.ger.corp.intel.com (HELO [10.0.2.15]) ([10.251.211.96]) by fmsmga008-auth.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 09 Jun 2023 02:12:19 -0700 Message-ID: Date: Fri, 9 Jun 2023 12:12:15 +0300 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Firefox/102.0 Thunderbird/102.12.0 Subject: Re: [PATCH] mmc: mtk-sd: include bitfield header and fix incompatible pointer types Content-Language: en-US To: Wenbin Mei , Ulf Hansson Cc: Ritesh Harjani , Asutosh Das , Chaotian Jing , Matthias Brugger , AngeloGioacchino Del Regno , Alexandre Mergnat , linux-mmc@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-mediatek@lists.infradead.org, kernel test robot References: <20230609074840.4520-1-wenbin.mei@mediatek.com> From: Adrian Hunter Organization: Intel Finland Oy, Registered Address: PL 281, 00181 Helsinki, Business Identity Code: 0357606 - 4, Domiciled in Helsinki In-Reply-To: <20230609074840.4520-1-wenbin.mei@mediatek.com> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20230609_021229_306291_79492881 X-CRM114-Status: GOOD ( 21.60 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org On 9/06/23 10:48, Wenbin Mei wrote: > The following error appeared due to the patch: > 364dae3e80a4 "mmc: mtk-sd: reduce CIT for better performance" > > drivers/mmc/host/mtk-sd.c: In function 'msdc_cqe_cit_cal': > drivers/mmc/host/cqhci.h:27:41: error: implicit declaration of function 'FIELD_GET' [-Werror=implicit-function-declaration] > > drivers/mmc/host/mtk-sd.c:2471:3: error: incompatible pointer types passing 'unsigned long *' to parameter of type 'uint64_t *' (aka 'unsigned long long *') [-Werror,-Wincompatible-pointer-types] > 2471 | do_div(hclk_freq, 1000); > | ^~~~~~~~~~~~~~~~~~~~~~~ > include/asm-generic/div64.h:238:22: note: expanded from macro 'do_div' > 238 | __rem = __div64_32(&(n), __base); \ > include/asm-generic/div64.h:213:38: note: passing argument to parameter 'dividend' here > 213 | extern uint32_t __div64_32(uint64_t *dividend, uint32_t divisor); > ... > > This patch corrects the issue. It doesn't look like Ulf has done a pull request for the original patch, so it might be better to submit a new version of that. > > Reported-by: kernel test robot > Signed-off-by: Wenbin Mei > Fixes: 364dae3e80a4 ("mmc: mtk-sd: reduce CIT for better performance") > --- > drivers/mmc/host/cqhci.h | 1 + > drivers/mmc/host/mtk-sd.c | 5 ++--- > 2 files changed, 3 insertions(+), 3 deletions(-) > > diff --git a/drivers/mmc/host/cqhci.h b/drivers/mmc/host/cqhci.h > index e35c655edefc..1a12e40a02e6 100644 > --- a/drivers/mmc/host/cqhci.h > +++ b/drivers/mmc/host/cqhci.h > @@ -5,6 +5,7 @@ > #define LINUX_MMC_CQHCI_H > > #include > +#include > #include > #include > #include > diff --git a/drivers/mmc/host/mtk-sd.c b/drivers/mmc/host/mtk-sd.c > index b582f19f82f2..99317fd9f084 100644 > --- a/drivers/mmc/host/mtk-sd.c > +++ b/drivers/mmc/host/mtk-sd.c > @@ -2456,15 +2456,14 @@ static void msdc_cqe_cit_cal(struct msdc_host *host, u64 timer_ns) > struct mmc_host *mmc = mmc_from_priv(host); > struct cqhci_host *cq_host = mmc->cqe_private; > u8 itcfmul; > - unsigned long hclk_freq; > - u64 value; > + u64 hclk_freq, value; > > /* > * On MediaTek SoCs the MSDC controller's CQE uses msdc_hclk as ITCFVAL > * so we multiply/divide the HCLK frequency by ITCFMUL to calculate the > * Send Status Command Idle Timer (CIT) value. > */ > - hclk_freq = clk_get_rate(host->h_clk); > + hclk_freq = (u64)clk_get_rate(host->h_clk); > itcfmul = CQHCI_ITCFMUL(cqhci_readl(cq_host, CQHCI_CAP)); > switch (itcfmul) { > case 0x0: _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel