Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754580AbbGFK1A (ORCPT ); Mon, 6 Jul 2015 06:27:00 -0400 Received: from mailout1.samsung.com ([203.254.224.24]:39432 "EHLO mailout1.samsung.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750967AbbGFK0x convert rfc822-to-8bit (ORCPT ); Mon, 6 Jul 2015 06:26:53 -0400 X-AuditID: cbfee61a-f79516d000006302-1e-559a57eb056a Date: Mon, 06 Jul 2015 12:26:40 +0200 From: Lukasz Majewski To: Sascha Hauer Cc: linux-pm@vger.kernel.org, Zhang Rui , Eduardo Valentin , linux-kernel@vger.kernel.org, Jean Delvare , Peter Feuerer , Heiko Stuebner , 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: <20150706122640.2a61ca05@amdc2363> In-reply-to: <1436167189-29835-1-git-send-email-s.hauer@pengutronix.de> References: <1436167189-29835-1-git-send-email-s.hauer@pengutronix.de> Organization: SPRC Poland X-Mailer: Claws Mail 3.8.1 (GTK+ 2.24.10; x86_64-pc-linux-gnu) MIME-version: 1.0 Content-type: text/plain; charset=UTF-8 Content-transfer-encoding: 8BIT X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFjrHIsWRmVeSWpSXmKPExsVy+t9jQd3X4bNCDZ6+FbToWmhgMf/KNVaL /49es1osvfuJzWL5vn5Gi02PgWKXd81hs5i9pJ/F4nPvEUaLGef3MVk8WXiGyeLOtL1sFls3 7WW2uHAhxmL1nhfMFmdOX2K1ePKwj83i7/ZNLBavDraxWPzcNY/FQcTjyaaLjB47Z91l99i8 Qstj8Z6XTB6bl9R7PJi4m82j/6+Bx4/Lb1g9tlxtZ/HY+b2B3WP7tXnMHptPV3t83iTnsXFu aABfFJdNSmpOZllqkb5dAlfG7TfL2AqucVRMWLKBuYGxh72LkZNDQsBEYs/z06wQtpjEhXvr 2boYuTiEBKYzSvy80soEkhASeMMo8X2zAYjNIqAq0bPtHzOIzSagJ/H57lOwGhEBTYlFCyYw gzQzC6xnldi14AILSEJYwFniwIHtjF2MHBy8QA39FzRBwpwC7hJLN01ggZjvJnG2YyPYEfwC khLt/34wQxxkJ3Hu0wawQ3kFBCV+TL4HVs8soC4xad4iZghbW+LJuwusExgFZyEpm4WkbBaS sgWMzKsYRVMLkguKk9JzDfWKE3OLS/PS9ZLzczcxgmP5mdQOxpUNFocYBTgYlXh4N9TNDBVi TSwrrsw9xCjBwawkwlvtMytUiDclsbIqtSg/vqg0J7X4EKM0B4uSOO/JfJ9QIYH0xJLU7NTU gtQimCwTB6dUA+Mlp/kdOVPt9mtLsV96HFa9W+eG5M8jteJ5C7vKJog/2W3cfytsYSHnqvd/ 4lZwPni4aNKGqwv33NOa7LD4/Y+jpZ6X/IPK+yZ8ODC5+vftNr6CrkfzDu+bLeqz+lRW0O6S P0zzJ29K6HA+eSrQYK/sFqPDfj93/pJattPEquzZvu7vOcLr6l0jlFiKMxINtZiLihMBnnrv h+ECAAA= Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1300 Lines: 36 Hi Sascha, > 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 Sascha, thanks for this cleanup work. Reviewed-by: Lukasz Majewski -- Best regards, Lukasz Majewski Samsung R&D Institute Poland (SRPOL) | Linux Platform Group -- 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/