Received: by 2002:a05:6a10:206:0:0:0:0 with SMTP id 6csp1398046pxj; Fri, 21 May 2021 13:15:42 -0700 (PDT) X-Google-Smtp-Source: ABdhPJz0oS0F61Gs9IWQnlE//NKS+ZOLtDGJkQwwXnEgaPlwElzyhpv7XKyTFvF8EvIpK47gmv6G X-Received: by 2002:a5d:884e:: with SMTP id t14mr520210ios.111.1621628142215; Fri, 21 May 2021 13:15:42 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1621628142; cv=none; d=google.com; s=arc-20160816; b=BmzWIoNw5UTwBZgOPiTseT7Mb66egCjtaEm0b8xRbo2USuxkynTKlfa8miQhNMaFgU glyH7Mi2D8Hubmi8vWNaLGsxsaN/lQ4VY1oPEViiMV0JgQs8XQBcluB9Vv6f78qr1DEv WyQbDn+0/MUWyi2311CGe76GGi7CnjIKkLFV/AUzz2LmGUZj1upJ5cCUr68yuH0k2iBM 865EmLvUaRH9qyqlpWSJEN5m4Oztrumx+ENI/ZnQgb6nuDhRupLBlNQ8JMjwC8qMGhNa LVkFLPninRrV2ZYb5Zp9UEiZSd/2mlgbSn/bBqS644PsU2ARMeqxKtEBIZXpg3nAhpz5 bB1A== 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 :message-id:date:subject:cc:to:from; bh=f029AvLHBPe6hiYcJtTY7RwZYAONB1sP8q7eYMV8Lls=; b=ddWGOj9c4M7UheLjDmCPF1BQ9FXeoHXQXKYCMo6G5zr7N1ax582qnbGcly3rpyZWn3 HGyVPlqP1VuczHQTsy+cchX90uVzBe39dKKzviQP4Au/w5DTrPj+l0r+GK5SmHqakIYg SsylPFhDAqhLI2cHvMDKF13wMz1okzz1HBgBVTyQOZ7nn6QyzHs5prpnmVSt/M25CGzl BPWT2P+V2JerII6r/JUsusgOaKgHiK69+pQFeotanwSVxsdJCFNCr36VNfHKD5NN0Zcr CJ/VHUBZNG1xD18aHYQVHuNXxJSA9fEmzZDX2qvAnRVxxFVctp0u0ywMLmyuJwHHGjQg sXFw== ARC-Authentication-Results: i=1; mx.google.com; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id t22si7355881ioh.58.2021.05.21.13.15.29; Fri, 21 May 2021 13:15:42 -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; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234279AbhEUMtA (ORCPT + 99 others); Fri, 21 May 2021 08:49:00 -0400 Received: from mailgw.kylinos.cn ([123.150.8.42]:43804 "EHLO nksmu.kylinos.cn" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S234145AbhEUMs6 (ORCPT ); Fri, 21 May 2021 08:48:58 -0400 X-Greylist: delayed 304 seconds by postgrey-1.27 at vger.kernel.org; Fri, 21 May 2021 08:48:37 EDT X-UUID: c72d25bcf0b54f778f2a912c437cfc23-20210521 X-UUID: c72d25bcf0b54f778f2a912c437cfc23-20210521 X-User: luriwen@kylinos.cn Received: from localhost.localdomain [(116.128.244.169)] by nksmu.kylinos.cn (envelope-from ) (Generic MTA) with ESMTP id 1469929180; Fri, 21 May 2021 20:42:08 +0800 From: Riwen Lu To: jdelvare@suse.com, linux@roeck-us.net Cc: linux-hwmon@vger.kernel.org, linux-kernel@vger.kernel.org, Riwen Lu , Xin Chen Subject: [PATCH v1] hwmon: (scpi-hwmon) shows the negative temperature properly Date: Fri, 21 May 2021 20:42:04 +0800 Message-Id: <20210521124204.22263-1-luriwen@kylinos.cn> X-Mailer: git-send-email 2.25.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org The scpi hwmon shows the sub-zero temperature in an unsigned integer, which would confuse the users when the machine works in low temperature environment. This shows the sub-zero temperature in an signed value and users can get it properly from sensors. Signed-off-by: Riwen Lu Tested-by: Xin Chen --- drivers/hwmon/scpi-hwmon.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/hwmon/scpi-hwmon.c b/drivers/hwmon/scpi-hwmon.c index 25aac40f2764..583a600bc82d 100644 --- a/drivers/hwmon/scpi-hwmon.c +++ b/drivers/hwmon/scpi-hwmon.c @@ -99,7 +99,7 @@ scpi_show_sensor(struct device *dev, struct device_attribute *attr, char *buf) scpi_scale_reading(&value, sensor); - return sprintf(buf, "%llu\n", value); + return sprintf(buf, "%lld\n", value); } static ssize_t -- 2.25.1 No virus found Checked by Hillstone Network AntiVirus