From patchwork Fri Jun 9 07:48:40 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: =?utf-8?b?V2VuYmluIE1laSAo5qKF5paH5b2sKQ==?= X-Patchwork-Id: 13273379 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 D866DC7EE25 for ; Fri, 9 Jun 2023 07:59:53 +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:MIME-Version:Message-ID:Date:Subject:CC :To:From:Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To:References: List-Owner; bh=tb1Z8/dT/liwtm9dOHlhcBJWcWEGaiPWiGyPKOlK4IE=; b=Yuu/sUCOYbU674 zwn7/V3bb3HDhw3LzmupoZeMkPPfSXDXh4/5AwwRF3VZ8s2l6PtCy9/NYJvGdYWKjsZx9X7kdq4tL mchtC+DKw6ExgQAt6tvnp5IrCBrjdKgogCEiUFDPxxBd0NEO2cENgRq6OHKCkVHFuOWLplKGVRO9g qVoRRtb2F/rdq9oBpVFPr0jgU0TqJpwmgb8lDl0lQlz2d5XMaqWg06Bk1eI82M4WpMzTqUHiNMaei ps7qD2z04H80fPvhuG6Il61//YVbwYLTSyiDjpphUKRTpg76Z+OeUScBl/yyxgzwc7RwsqGSBWpJr yYmL4RoJts4VwfYfESzg==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.96 #2 (Red Hat Linux)) id 1q7X1w-00C9VA-10; Fri, 09 Jun 2023 07:59:32 +0000 Received: from mailgw01.mediatek.com ([216.200.240.184]) by bombadil.infradead.org with esmtps (Exim 4.96 #2 (Red Hat Linux)) id 1q7X1r-00C9Rc-1B; Fri, 09 Jun 2023 07:59:29 +0000 X-UUID: 89fa222c069b11ee912e1518a6540028-20230609 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=mediatek.com; s=dk; h=Content-Type:Content-Transfer-Encoding:MIME-Version:Message-ID:Date:Subject:CC:To:From; bh=8bgwt3YTtRPzBW10jkkA2PfSeU8Lw8ibSj4SfdROJGs=; b=eTLWnOMmJHfkR7xzPaNcK0P2kM2zmyETKQl0Z8M35iK0YNmv/VWCUp8JAs7EdWyBOi3KJ/ScBcneyaFd83N7LhtSMwwCQYj7Ddx3SKksun6RWnJBVY1DkvpHlkECl2qYTJFwYmGfv6uA4E5m1ATeJWBTffMg9Vj61peov9fKSM0=; X-CID-P-RULE: Release_Ham X-CID-O-INFO: VERSION:1.1.26,REQID:ad071e8f-9b64-4658-bd34-7709ec81c0b8,IP:0,U RL:0,TC:0,Content:-25,EDM:0,RT:0,SF:0,FILE:0,BULK:0,RULE:Release_Ham,ACTIO N:release,TS:-25 X-CID-META: VersionHash:cb9a4e1,CLOUDID:63cb8d6e-2f20-4998-991c-3b78627e4938,B ulkID:nil,BulkQuantity:0,Recheck:0,SF:102,TC:nil,Content:0,EDM:-3,IP:nil,U RL:0,File:nil,Bulk:nil,QS:nil,BEC:nil,COL:0,OSI:0,OSA:0,AV:0,LES:1,SPR:NO X-CID-BVR: 0,NGT X-CID-BAS: 0,NGT,0,_ X-CID-FACTOR: TF_CID_SPAM_SNR X-UUID: 89fa222c069b11ee912e1518a6540028-20230609 Received: from mtkmbs11n1.mediatek.inc [(172.21.101.185)] by mailgw01.mediatek.com (envelope-from ) (musrelay.mediatek.com ESMTP with TLSv1.2 ECDHE-RSA-AES256-GCM-SHA384 256/256) with ESMTP id 1772350665; Fri, 09 Jun 2023 00:59:19 -0700 Received: from mtkmbs11n2.mediatek.inc (172.21.101.187) by mtkmbs11n2.mediatek.inc (172.21.101.187) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.1118.26; Fri, 9 Jun 2023 15:48:42 +0800 Received: from mhfsdcap04.gcn.mediatek.inc (10.17.3.154) by mtkmbs11n2.mediatek.inc (172.21.101.73) with Microsoft SMTP Server id 15.2.1118.26 via Frontend Transport; Fri, 9 Jun 2023 15:48:42 +0800 From: Wenbin Mei To: Ulf Hansson CC: Adrian Hunter , Ritesh Harjani , Asutosh Das , Chaotian Jing , Matthias Brugger , AngeloGioacchino Del Regno , Alexandre Mergnat , Wenbin Mei , , , , , kernel test robot Subject: [PATCH] mmc: mtk-sd: include bitfield header and fix incompatible pointer types Date: Fri, 9 Jun 2023 15:48:40 +0800 Message-ID: <20230609074840.4520-1-wenbin.mei@mediatek.com> X-Mailer: git-send-email 2.25.1 MIME-Version: 1.0 X-MTK: N X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20230609_005927_682810_1E8F28E0 X-CRM114-Status: GOOD ( 12.03 ) 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: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org 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. Reported-by: kernel test robot Signed-off-by: Wenbin Mei Fixes: 364dae3e80a4 ("mmc: mtk-sd: reduce CIT for better performance") Reviewed-by: AngeloGioacchino Del Regno --- 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: