From patchwork Thu Nov 19 17:49:03 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Cristian Marussi X-Patchwork-Id: 11918583 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=-16.8 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,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 DE290C63697 for ; Thu, 19 Nov 2020 17:51:19 +0000 (UTC) Received: from merlin.infradead.org (merlin.infradead.org [205.233.59.134]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 68FBB22202 for ; Thu, 19 Nov 2020 17:51:19 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="id9QCGJ7" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 68FBB22202 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=arm.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=merlin.20170209; h=Sender:Content-Transfer-Encoding: Content-Type:MIME-Version:Cc:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:References:In-Reply-To:Message-Id:Date:Subject:To: From:Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=gQtfhH+rop92K5iZQ5GH2jRQXGR1kiMObYiXg0jryZY=; b=id9QCGJ7oj00tCsxyoUerdBmbe P+AVrwAzud84SKWxQsvzHWkuZ0ZFmoSlgkRzuuthu6dQS8v68bw8KmAA7fH9tF5BHbzOC4GBv0zuC azCB1B2LWrItNU1BagypeQuyBAZz7BQ0CXQHp9xUMf4QSK8jJOs6qmog08IExpDzWNWr4gq4MMtn3 JlHS32qyP+Jn0byNbJ+5+PIetd2zjlyUJ7wne32fm0fib3zw2u74dZAPO0sSCuw8/xpLyz0K4xREE 4y2e6WAKxCrSSMSplByjoag9RMijFnY4YTXNuFbER6laOstqjKK/IfE2qMFgjW9Ityy2sphG6trUo ud0ibM7A==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1kfo4H-0006eX-6N; Thu, 19 Nov 2020 17:50:01 +0000 Received: from foss.arm.com ([217.140.110.172]) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1kfo3w-0006XZ-34 for linux-arm-kernel@lists.infradead.org; Thu, 19 Nov 2020 17:49:41 +0000 Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.121.207.14]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id 665B315DB; Thu, 19 Nov 2020 09:49:38 -0800 (PST) Received: from e120937-lin.home (unknown [172.31.20.19]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id 8C4A03F70D; Thu, 19 Nov 2020 09:49:36 -0800 (PST) From: Cristian Marussi To: linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org Subject: [PATCH v4 3/6] hwmon: scmi: update hwmon internal scale data type Date: Thu, 19 Nov 2020 17:49:03 +0000 Message-Id: <20201119174906.43862-4-cristian.marussi@arm.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20201119174906.43862-1-cristian.marussi@arm.com> References: <20201119174906.43862-1-cristian.marussi@arm.com> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20201119_124940_246806_2D4153CF X-CRM114-Status: GOOD ( 13.25 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: linux-hwmon@vger.kernel.org, mikhail.golubev@opensynergy.com, Guenter Roeck , Igor.Skalkin@opensynergy.com, jbhayana@google.com, sudeep.holla@arm.com, peter.hilber@opensynergy.com, Cristian Marussi , james.quinlan@broadcom.com, Jonathan.Cameron@Huawei.com, egranata@google.com, lukasz.luba@arm.com MIME-Version: 1.0 Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org Use an int to calculate scale values inside scmi_hwmon_scale() to match the updated scale data type in struct scmi_sensor_info. Cc: linux-hwmon@vger.kernel.org Cc: Guenter Roeck Signed-off-by: Cristian Marussi Acked-by: Guenter Roeck --- drivers/hwmon/scmi-hwmon.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/hwmon/scmi-hwmon.c b/drivers/hwmon/scmi-hwmon.c index 09ce30cba54b..17d064e58938 100644 --- a/drivers/hwmon/scmi-hwmon.c +++ b/drivers/hwmon/scmi-hwmon.c @@ -30,7 +30,7 @@ static inline u64 __pow10(u8 x) static int scmi_hwmon_scale(const struct scmi_sensor_info *sensor, u64 *value) { - s8 scale = sensor->scale; + int scale = sensor->scale; u64 f; switch (sensor->type) {