Received: by 2002:a05:6a11:4021:0:0:0:0 with SMTP id ky33csp1527782pxb; Thu, 16 Sep 2021 09:16:33 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyxvf78AaNNGkEisrD2e3OAUqaRs6b9Bh/5qWJJ0AvjRZsrAEaQqeBYnafqMI2v7Ph7ootI X-Received: by 2002:a17:906:a3c3:: with SMTP id ca3mr7154659ejb.337.1631808993591; Thu, 16 Sep 2021 09:16:33 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1631808993; cv=none; d=google.com; s=arc-20160816; b=xh8ulApY/FY1BMU+hS9+xyZMgd5ecL+wMaDh6XcfAer7XO4PfTBfv/MY8NC82BSRsr sRigrFDfSa0jmL1BkYXabewoVoo9xAHwKXsO3IoWtn8l9M5gw94s3wV3ZdHGnfP+sty0 DKoePbJTDYCmNIJ1D4p38ZVYJClZmCExemw+HQD5JPN5r5RqmLY/s3qFHnhVtidcXkYl cLTs816zK7fzw3FolygHuO3hy4YpGJJWuXni2yxkLO3+pCkilb5Chahj3VywiqWGMg2o ztMzRzrViaLeTP8UwZeOpzMa4UVXqxxzwg25hN7LJMUNcd54cb1+oD5Iueb/eQiLtUL/ c42Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=tySVkM63ELsrDwIvFNACA1L6pXBrZOp60RI+3QigIRo=; b=GTWgPHIumS8ju9x5O3iRkrv8x6VzfGNe3CkAaJwWitXpHocGzBjOaBoPklvKwo0zwx 7jxhjIISZQ7LkmiWZBjt7qRJlqCuwJ7xTtqKLq71PCJgPLZ46iiD/Xv3MjY08rEpe7Uv h2tjbUPLe1nTd3vP40Yk9h2MykBBX4QJDrF8WLMch5AeKCX/Dy2vj8FJyyD/EKrNvMzL +FSpqWx92DFdOfATCVfeT3yuTcKBgMozCssj9Vytri1Y7zpowchylWP02F6N4+WMWCc6 P/vXaANCWVioJhSOUJlcFU0zbvccfNkuUiiUIPqu4sUktiLy2rltFJ40/EtT4nFte2eB pnQg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=bF03UKvj; 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=linuxfoundation.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id la20si4660743ejc.3.2021.09.16.09.16.07; Thu, 16 Sep 2021 09:16:33 -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=@linuxfoundation.org header.s=korg header.b=bF03UKvj; 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=linuxfoundation.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S240910AbhIPQOh (ORCPT + 99 others); Thu, 16 Sep 2021 12:14:37 -0400 Received: from mail.kernel.org ([198.145.29.99]:49144 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235322AbhIPQIq (ORCPT ); Thu, 16 Sep 2021 12:08:46 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id 85C8361351; Thu, 16 Sep 2021 16:07:24 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1631808445; bh=gGAvN8+OozOp8m8QhHWhRw230nuepddHX0OLUf66zsI=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=bF03UKvjBqaI4tKZB7nHVo2MeTD1qsPqK+QZ8gyDrjXJEWpARSzrL0kn56ThVPt+9 DraHiPvs9WMQfDISyWw+pOQzAXYm53IhxAxrUV5UcgJsxOFFIh7bbnRhdoEKV/mAnd fXatQULH7uUcK7cvqCBQ/C0b9+uR2Nj2cdtXm6AM= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Dan Carpenter , Alim Akhtar , "Martin K. Petersen" , Sasha Levin Subject: [PATCH 5.10 093/306] scsi: ufs: ufs-exynos: Fix static checker warning Date: Thu, 16 Sep 2021 17:57:18 +0200 Message-Id: <20210916155757.238098158@linuxfoundation.org> X-Mailer: git-send-email 2.33.0 In-Reply-To: <20210916155753.903069397@linuxfoundation.org> References: <20210916155753.903069397@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Alim Akhtar [ Upstream commit 313bf281f2091552f509fd05a74172c70ce7572f ] 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') Link: https://lore.kernel.org/r/20210819171131.55912-1-alim.akhtar@samsung.com Fixes: 55f4b1f73631 ("scsi: ufs: ufs-exynos: Add UFS host support for Exynos SoCs") Reported-by: Dan Carpenter Signed-off-by: Alim Akhtar Signed-off-by: Martin K. Petersen Signed-off-by: Sasha Levin --- drivers/scsi/ufs/ufs-exynos.c | 4 ++-- drivers/scsi/ufs/ufs-exynos.h | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/scsi/ufs/ufs-exynos.c b/drivers/scsi/ufs/ufs-exynos.c index f54b494ca448..3f4f3d6f48f9 100644 --- a/drivers/scsi/ufs/ufs-exynos.c +++ b/drivers/scsi/ufs/ufs-exynos.c @@ -259,7 +259,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; @@ -298,7 +298,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 76d6e39efb2f..541b577c371c 100644 --- a/drivers/scsi/ufs/ufs-exynos.h +++ b/drivers/scsi/ufs/ufs-exynos.h @@ -197,7 +197,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; -- 2.30.2