From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S933085AbbD1Hme (ORCPT ); Tue, 28 Apr 2015 03:42:34 -0400 Received: from metis.ext.pengutronix.de ([92.198.50.35]:58036 "EHLO metis.ext.pengutronix.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932649AbbD1Hmc (ORCPT ); Tue, 28 Apr 2015 03:42:32 -0400 Date: Tue, 28 Apr 2015 09:42:24 +0200 From: Sascha Hauer To: Pavel Machek Cc: linux-pm@vger.kernel.org, Zhang Rui , Eduardo Valentin , linux-kernel@vger.kernel.org, Stephen Warren , Mikko Perttunen , kernel@pengutronix.de, linux-mediatek@lists.infradead.org, linux-arm-kernel@lists.infradead.org Subject: Re: [PATCH 01/13] thermal: Make temperatures consistently unsigned long Message-ID: <20150428074224.GI6325@pengutronix.de> References: <1427385240-6086-1-git-send-email-s.hauer@pengutronix.de> <1427385240-6086-2-git-send-email-s.hauer@pengutronix.de> <20150427203608.GD29351@xo-6d-61-c0.localdomain> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20150427203608.GD29351@xo-6d-61-c0.localdomain> 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:31:24 up 42 days, 19:23, 64 users, load average: 0.09, 0.07, 0.08 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 On Mon, Apr 27, 2015 at 10:36:08PM +0200, Pavel Machek wrote: > On Thu 2015-03-26 16:53:48, Sascha Hauer wrote: > > The thermal framework uses int, long and unsigned long for temperatures > > in millicelsius. The majority of functions uses unsigned long, so change > > the remaining functions to use this type aswell. > > Maybe millicelsius_t should be introduced, so that readers immediately know > what type it is? Some parts of kernel also use decicelsius and decikelvin, IIRC (ACPI). I have no strong opinion on this. I'll send out the next version without typedef for now. Since in my patch I identified most places which need a type change anyway it might be a good opportunity to change to a typedef if we want to. Any other opinions on this? > > Pavel > > > if (trip_type == THERMAL_TRIP_CRITICAL) { > > dev_emerg(&tz->device, > > - "critical temperature reached(%d C),shutting down\n", > > + "critical temperature reached(%lu C),shutting down\n", > > space after , ? Turns out that in the new version of this series I don't have to modify this line anymore. Made this a separate patch. 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 | From mboxrd@z Thu Jan 1 00:00:00 1970 From: s.hauer@pengutronix.de (Sascha Hauer) Date: Tue, 28 Apr 2015 09:42:24 +0200 Subject: [PATCH 01/13] thermal: Make temperatures consistently unsigned long In-Reply-To: <20150427203608.GD29351@xo-6d-61-c0.localdomain> References: <1427385240-6086-1-git-send-email-s.hauer@pengutronix.de> <1427385240-6086-2-git-send-email-s.hauer@pengutronix.de> <20150427203608.GD29351@xo-6d-61-c0.localdomain> Message-ID: <20150428074224.GI6325@pengutronix.de> To: linux-arm-kernel@lists.infradead.org List-Id: linux-arm-kernel.lists.infradead.org On Mon, Apr 27, 2015 at 10:36:08PM +0200, Pavel Machek wrote: > On Thu 2015-03-26 16:53:48, Sascha Hauer wrote: > > The thermal framework uses int, long and unsigned long for temperatures > > in millicelsius. The majority of functions uses unsigned long, so change > > the remaining functions to use this type aswell. > > Maybe millicelsius_t should be introduced, so that readers immediately know > what type it is? Some parts of kernel also use decicelsius and decikelvin, IIRC (ACPI). I have no strong opinion on this. I'll send out the next version without typedef for now. Since in my patch I identified most places which need a type change anyway it might be a good opportunity to change to a typedef if we want to. Any other opinions on this? > > Pavel > > > if (trip_type == THERMAL_TRIP_CRITICAL) { > > dev_emerg(&tz->device, > > - "critical temperature reached(%d C),shutting down\n", > > + "critical temperature reached(%lu C),shutting down\n", > > space after , ? Turns out that in the new version of this series I don't have to modify this line anymore. Made this a separate patch. 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 |