From patchwork Thu Aug 19 17:11:31 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Alim Akhtar X-Patchwork-Id: 12448191 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-19.4 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_CR_TRAILER,INCLUDES_PATCH,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS, URIBL_BLOCKED,USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 7766EC4338F for ; Fri, 20 Aug 2021 01:49:10 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 4C5A160F9F for ; Fri, 20 Aug 2021 01:49:10 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S236038AbhHTBtq (ORCPT ); Thu, 19 Aug 2021 21:49:46 -0400 Received: from mailout4.samsung.com ([203.254.224.34]:32461 "EHLO mailout4.samsung.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235974AbhHTBto (ORCPT ); Thu, 19 Aug 2021 21:49:44 -0400 Received: from epcas5p2.samsung.com (unknown [182.195.41.40]) by mailout4.samsung.com (KnoxPortal) with ESMTP id 20210820014903epoutp041a8c261b1af65cb01a8e428775d5cf04~c4KA506941141511415epoutp046 for ; Fri, 20 Aug 2021 01:49:03 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 mailout4.samsung.com 20210820014903epoutp041a8c261b1af65cb01a8e428775d5cf04~c4KA506941141511415epoutp046 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=samsung.com; s=mail20170921; t=1629424144; bh=66qEicnIYMhO8Vbu+61zgiZtEIAgnKSoCVqjxIgW6sw=; h=From:To:Cc:Subject:Date:References:From; b=a7Am/Q09+H+FiTtg7Kr4QW8zS8pEIBnTlckQOLQgRck6gzTJJGicb8Mt0c1PoqcVm TpAXBiRvb2vasdkroAGa3udfFG9aMsB0yvoMDeOKQ+M3QvPUFcbw+fHLOle2BrwQBi 67tkJs1OHjIjHvkNub3xTe0Nll+Nb7DYHPIhcgRY= Received: from epsnrtp3.localdomain (unknown [182.195.42.164]) by epcas5p2.samsung.com (KnoxPortal) with ESMTP id 20210820014903epcas5p2e5c058ade7c7e77a10160ad9996e676a~c4KAeumJW1347513475epcas5p2K; Fri, 20 Aug 2021 01:49:03 +0000 (GMT) Received: from epsmges5p3new.samsung.com (unknown [182.195.38.178]) by epsnrtp3.localdomain (Postfix) with ESMTP id 4GrPgX6yrbz4x9QN; Fri, 20 Aug 2021 01:48:56 +0000 (GMT) Received: from epcas5p2.samsung.com ( [182.195.41.40]) by epsmges5p3new.samsung.com (Symantec Messaging Gateway) with SMTP id AE.58.41701.BF90F116; Fri, 20 Aug 2021 10:48:43 +0900 (KST) Received: from epsmtrp2.samsung.com (unknown [182.195.40.14]) by epcas5p2.samsung.com (KnoxPortal) with ESMTPA id 20210819170304epcas5p211ae01fc6ba6f5beaf7afaa90dcd5dda~cw_wfHsUp1503415034epcas5p2p; Thu, 19 Aug 2021 17:03:04 +0000 (GMT) Received: from epsmgms1p2.samsung.com (unknown [182.195.42.42]) by epsmtrp2.samsung.com (KnoxPortal) with ESMTP id 20210819170304epsmtrp2faf230cb549f23c73802a7ebc68b6be0~cw_weIvaM0828208282epsmtrp2x; Thu, 19 Aug 2021 17:03:04 +0000 (GMT) X-AuditID: b6c32a4b-0abff7000001a2e5-6b-611f09fb5a20 Received: from epsmtip2.samsung.com ( [182.195.34.31]) by epsmgms1p2.samsung.com (Symantec Messaging Gateway) with SMTP id 0E.26.32548.7CE8E116; Fri, 20 Aug 2021 02:03:03 +0900 (KST) Received: from Jaguar.sa.corp.samsungelectronics.net (unknown [107.108.73.139]) by epsmtip2.samsung.com (KnoxPortal) with ESMTPA id 20210819170301epsmtip28419697366e72c3c11e7ad95793f5ddf~cw_uRMeka0714007140epsmtip2j; Thu, 19 Aug 2021 17:03:00 +0000 (GMT) From: Alim Akhtar To: linux-scsi@vger.kernel.org, martin.petersen@oracle.com Cc: krzysztof.kozlowski@canonical.com, linux-samsung-soc@vger.kernel.org, avri.altman@wdc.com, kwmad.kim@samsung.com, dan.carpenter@oracle.com, Alim Akhtar Subject: [PATCH] scsi: ufs: ufs-exynos: Fix static checker warning Date: Thu, 19 Aug 2021 22:41:31 +0530 Message-Id: <20210819171131.55912-1-alim.akhtar@samsung.com> X-Mailer: git-send-email 2.17.1 X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFrrEKsWRmVeSWpSXmKPExsWy7bCmhu5vTvlEg0XvBC0ezNvGZvHy51U2 i9f/prNYbHz7g8ni5pajLBYzzu9jsui+voPNYvnxf0wOHB6zGnrZPD4+vcXi0bdlFaPH501y Hu0HupkCWKOybTJSE1NSixRS85LzUzLz0m2VvIPjneNNzQwMdQ0tLcyVFPISc1NtlVx8AnTd MnOAblFSKEvMKQUKBSQWFyvp29kU5ZeWpCpk5BeX2CqlFqTkFJgU6BUn5haX5qXr5aWWWBka GBiZAhUmZGccWr6JueALf8WNz+3MDYyTebsYOTkkBEwkvnXsYupi5OIQEtjNKHH0/Q12kISQ wCdGiauvmSDsz4wST9vLuhg5wBomXUmBCO9ilDi5NACit4VJovHbNkaQBJuAtsTd6VvAekUE rCR+rfzMDGIzC+xklFj+Qh1kjrCAk8Sk5dEgYRYBVYndc/+wgti8AjYSqy/8Zoe4TV5i9YYD zBD2NnaJW+3JELaLxKmrD1ggbGGJV8e3QNVLSXx+t5cN4sxsiZ5dxhDhGoml845BldtLHLgy hwWkhFlAU2L9Ln2IsKzE1FPr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RiDclsbIqtSg/vqg0J7X4EKM0B4uSOO+FrpPxQgLpiSWp2ampBalFMFkmDk6p Biadp8yub4XYr85zLzRjPzc1O5zBhEWPoag7MH2uSmzDIieGCuGcDI+oU5s+sG78GhHzWoGD UdnZ3b/3pMSHhTsyJCJyOmXXsLFL1KYBfTT15UQmXS9pe8eNTWcCXvyRm8LNvd3p978/Uo2N +T9zXVnntcm1bvK3ufFtTvqu1port7P3s55qTTRh/znBSPH2wl8NQg9/depOk9n/3st5e6Sy lKb3K4uUo8yeCyS2Ttlh0L+8UvPsxuQ2tSyDP8b77jhLHDtTJq316+2DCPs3Z7W/S4hFcd0N aTqpHZmof2au/9aIUNOCD3It64NidJ4r6i/ZUBn43fn2xJMbGV8rvFEJnLWmasHBU6rLF2oo sRRnJBpqMRcVJwIANeCg+pYCAAA= X-CMS-MailID: 20210819170304epcas5p211ae01fc6ba6f5beaf7afaa90dcd5dda X-Msg-Generator: CA X-Sendblock-Type: REQ_APPROVE CMS-TYPE: 105P DLP-Filter: Pass X-CFilter-Loop: Reflected X-CMS-RootMailID: 20210819170304epcas5p211ae01fc6ba6f5beaf7afaa90dcd5dda References: Precedence: bulk List-ID: X-Mailing-List: linux-samsung-soc@vger.kernel.org clk_get_rate() returns unsigned long and currently this driver stores the return value in u32 type, resulting the below warning: Fixed smatch warnings: drivers/scsi/ufs/ufs-exynos.c:286 exynos_ufs_get_clk_info() warn: wrong type for 'ufs->mclk_rate' (should be 'ulong') drivers/scsi/ufs/ufs-exynos.c:287 exynos_ufs_get_clk_info() warn: wrong type for 'pclk_rate' (should be 'ulong') Fixes: 55f4b1f73631: "scsi: ufs: ufs-exynos: Add UFS host support for Exynos SoCs" Reported-by: Dan Carpenter Signed-off-by: Alim Akhtar --- drivers/scsi/ufs/ufs-exynos.c | 4 ++-- drivers/scsi/ufs/ufs-exynos.h | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) base-commit: 36a21d51725af2ce0700c6ebcb6b9594aac658a6 diff --git a/drivers/scsi/ufs/ufs-exynos.c b/drivers/scsi/ufs/ufs-exynos.c index cf46d6f86e0e..427a2ff7e9da 100644 --- a/drivers/scsi/ufs/ufs-exynos.c +++ b/drivers/scsi/ufs/ufs-exynos.c @@ -260,7 +260,7 @@ static int exynos_ufs_get_clk_info(struct exynos_ufs *ufs) struct ufs_hba *hba = ufs->hba; struct list_head *head = &hba->clk_list_head; struct ufs_clk_info *clki; - u32 pclk_rate; + unsigned long pclk_rate; u32 f_min, f_max; u8 div = 0; int ret = 0; @@ -299,7 +299,7 @@ static int exynos_ufs_get_clk_info(struct exynos_ufs *ufs) } if (unlikely(pclk_rate < f_min || pclk_rate > f_max)) { - dev_err(hba->dev, "not available pclk range %d\n", pclk_rate); + dev_err(hba->dev, "not available pclk range %lu\n", pclk_rate); ret = -EINVAL; goto out; } diff --git a/drivers/scsi/ufs/ufs-exynos.h b/drivers/scsi/ufs/ufs-exynos.h index 67505fe32ebf..dadf4fd10dd8 100644 --- a/drivers/scsi/ufs/ufs-exynos.h +++ b/drivers/scsi/ufs/ufs-exynos.h @@ -184,7 +184,7 @@ struct exynos_ufs { u32 pclk_div; u32 pclk_avail_min; u32 pclk_avail_max; - u32 mclk_rate; + unsigned long mclk_rate; int avail_ln_rx; int avail_ln_tx; int rx_sel_idx;