Received: by 2002:a25:6193:0:0:0:0:0 with SMTP id v141csp3772137ybb; Mon, 23 Mar 2020 07:27:06 -0700 (PDT) X-Google-Smtp-Source: ADFU+vtNlY003guVRUi1UtYlWKh6KLCVERDHUJiCV4IersPVi+bjoMSR+qOpOyC/iHPAYLtxa/cv X-Received: by 2002:aca:3c56:: with SMTP id j83mr17695624oia.52.1584973626272; Mon, 23 Mar 2020 07:27:06 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1584973626; cv=none; d=google.com; s=arc-20160816; b=kX6umnDRzKCYNxAMz7p7VhAWKiIDp0iXrmWPRECVHnPH21xE3maoW0qFQAPS7Nku6y nPnSVN1gd3qP6MJ6ibinXX1peGgyjjcNE/nN8YOJELOHyLxVE0PA255MxNfwLl/8nIaz 9eDaQbeh5F22OOcMpPxGthgpc8tEmkhcrgIm490DkUyE0VvMKi88t7iNR8YozTcZsa+f VCfrt8l/m+b8nAwpa4aimF0DPNPUO0YoKFviqFJHLnXvjP4fCnLnoy09+gB/dVYitwRX XhH0l+DPHhZDQw9JOX7wULFLsdnmtsZWgDf2BRRVqyQx3PHYdB+Yrt4xwwFMa+x5owAK vWwA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:message-id:date:subject:cc:to:from; bh=HXas8F40uG+Q+Jw9hm+aooVgS/mE+J9ndj8yIOM69OU=; b=E67p0De1L9w64qkf0AzrSLFHsPhlAwDhoBK15Oy5dkjfLDCnTwOY5q4y9vscV4QJ/z 32BATTkmqH+fGvaJL78Kb480PuPxsF0655iGzNUU9nGlJLBn8VTfmdk+ENtgN6PLyb46 GvtJBqXT15Ml6n/yxOsFF2P95wtVwKrfUa1VZboAkpJU7XPDVO29DH1bRmZqO8itRqtH wBG/oYPvyM3pZJNIY0z5AJtxv5mb0NYHtzHyVPprkxBDH022tr7WXilDBHRJAkmWbmDk 0IIJ7NOygE33jsLr6BmDSI6wUNeZUts1uxlW9F4TSUxAH2zmeLEt4Loe/Zbfl2HHVH1L XNwA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=nxp.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id n62si7777402oig.196.2020.03.23.07.26.54; Mon, 23 Mar 2020 07:27:06 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=nxp.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727093AbgCWO00 (ORCPT + 99 others); Mon, 23 Mar 2020 10:26:26 -0400 Received: from inva021.nxp.com ([92.121.34.21]:49278 "EHLO inva021.nxp.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725861AbgCWO0Z (ORCPT ); Mon, 23 Mar 2020 10:26:25 -0400 Received: from inva021.nxp.com (localhost [127.0.0.1]) by inva021.eu-rdc02.nxp.com (Postfix) with ESMTP id BA6D3201262; Mon, 23 Mar 2020 15:26:23 +0100 (CET) Received: from invc005.ap-rdc01.nxp.com (invc005.ap-rdc01.nxp.com [165.114.16.14]) by inva021.eu-rdc02.nxp.com (Postfix) with ESMTP id 0C05F200ED6; Mon, 23 Mar 2020 15:26:18 +0100 (CET) Received: from localhost.localdomain (shlinux2.ap.freescale.net [10.192.224.44]) by invc005.ap-rdc01.nxp.com (Postfix) with ESMTP id CCFB3402AF; Mon, 23 Mar 2020 22:26:10 +0800 (SGT) From: Anson Huang To: rui.zhang@intel.com, daniel.lezcano@linaro.org, amit.kucheria@verdurent.com, shawnguo@kernel.org, s.hauer@pengutronix.de, kernel@pengutronix.de, festevam@gmail.com, linux-pm@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org Cc: Linux-imx@nxp.com Subject: [PATCH] thermal: imx8mm: Fix build warning of incorrect argument type Date: Mon, 23 Mar 2020 22:19:16 +0800 Message-Id: <1584973156-25734-1-git-send-email-Anson.Huang@nxp.com> X-Mailer: git-send-email 2.7.4 X-Virus-Scanned: ClamAV using ClamSMTP Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Fix below sparse warning: drivers/thermal/imx8mm_thermal.c:82:36: sparse: sparse: incorrect type in argument 2 (different address spaces), expected unsigned long const volatile *addr drivers/thermal/imx8mm_thermal.c:82:36: sparse: expected unsigned long const volatile *addr Signed-off-by: Anson Huang --- drivers/thermal/imx8mm_thermal.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/drivers/thermal/imx8mm_thermal.c b/drivers/thermal/imx8mm_thermal.c index c32308b..0d60f8d 100644 --- a/drivers/thermal/imx8mm_thermal.c +++ b/drivers/thermal/imx8mm_thermal.c @@ -75,15 +75,14 @@ static int imx8mp_tmu_get_temp(void *data, int *temp) { struct tmu_sensor *sensor = data; struct imx8mm_tmu *tmu = sensor->priv; + unsigned long val; bool ready; - u32 val; - ready = test_bit(probe_status_offset(sensor->hw_id), - tmu->base + TRITSR); + val = readl_relaxed(tmu->base + TRITSR); + ready = test_bit(probe_status_offset(sensor->hw_id), &val); if (!ready) return -EAGAIN; - val = readl_relaxed(tmu->base + TRITSR); val = sensor->hw_id ? FIELD_GET(TRITSR_TEMP1_VAL_MASK, val) : FIELD_GET(TRITSR_TEMP0_VAL_MASK, val); if (val & SIGN_BIT) /* negative */ -- 2.7.4