Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752875AbbGUHbc (ORCPT ); Tue, 21 Jul 2015 03:31:32 -0400 Received: from metis.ext.pengutronix.de ([92.198.50.35]:50353 "EHLO metis.ext.pengutronix.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752791AbbGUHb3 (ORCPT ); Tue, 21 Jul 2015 03:31:29 -0400 Date: Tue, 21 Jul 2015 09:31:11 +0200 From: Sascha Hauer To: Punit Agrawal Cc: linux-pm@vger.kernel.org, Zhang Rui , Eduardo Valentin , linux-kernel@vger.kernel.org, Jean Delvare , Peter Feuerer , Heiko Stuebner , Lukasz Majewski , Stephen Warren , Thierry Reding , linux-acpi@vger.kernel.org, platform-driver-x86@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-omap@vger.kernel.org, linux-samsung-soc@vger.kernel.org, Guenter Roeck , "Rafael J. Wysocki" , Maxime Ripard , Darren Hart , lm-sensors@lm-sensors.org Subject: Re: [PATCH] thermal: consistently use int for temperatures Message-ID: <20150721073111.GH5161@pengutronix.de> References: <1436167189-29835-1-git-send-email-s.hauer@pengutronix.de> <9hhd1zrc9yb.fsf@e105922-lin.cambridge.arm.com> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-15 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <9hhd1zrc9yb.fsf@e105922-lin.cambridge.arm.com> X-Sent-From: Pengutronix Hildesheim X-URL: http://www.pengutronix.de/ X-IRC: #ptxdist @freenode X-Accept-Language: de,en X-Accept-Content-Type: text/plain X-Uptime: 09:30:06 up 26 days, 1:51, 68 users, load average: 0.07, 0.12, 0.13 User-Agent: Mutt/1.5.21 (2010-09-15) X-SA-Exim-Connect-IP: 2001:67c:670:100:1d::c0 X-SA-Exim-Mail-From: sha@pengutronix.de X-SA-Exim-Scanned: No (on metis.ext.pengutronix.de); SAEximRunCond expanded to false X-PTX-Original-Recipient: linux-kernel@vger.kernel.org Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 2038 Lines: 50 Hi Punit, On Fri, Jul 17, 2015 at 12:14:36PM +0100, Punit Agrawal wrote: > Hi Sascha, > > Sascha Hauer writes: > > > The thermal code uses int, long and unsigned long for temperatures > > in different places. > > > > Using an unsigned type limits the thermal framework to positive > > temperatures without need. Also several drivers currently will report > > temperatures near UINT_MAX for temperatures below 0?C. This will probably > > immediately shut the machine down due to overtemperature if started below > > 0?C. > > > > 'long' is 64bit on several architectures. This is not needed since INT_MAX ?mC > > is above the melting point of all known materials. > > > > Consistently use a plain 'int' for temperatures throughout the thermal code and > > the drivers. This only changes the places in the drivers where the temperature > > is passed around as pointer, when drivers internally use another type this is > > not changed. > > > > Signed-off-by: Sascha Hauer > > Thanks for moving over the thermal sub-system in Linux to consistently > use a single type. > > In your patch, you missed migrating over power_allocator governor and > it's associated trace events. It got merged for v4.2. > > Could you incorporate something like below in your next version? It seems I have changed drivers/thermal/power_allocator.c but missed include/trace/events/thermal_power_allocator.h. Please check out the v2 patch I just sent. Sascha -- Pengutronix e.K. | | Industrial Linux Solutions | http://www.pengutronix.de/ | Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0 | Amtsgericht Hildesheim, HRA 2686 | Fax: +49-5121-206917-5555 | -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/