From mboxrd@z Thu Jan 1 00:00:00 1970 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=-8.0 required=3.0 tests=DKIM_INVALID,DKIM_SIGNED, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH,MAILING_LIST_MULTI,SIGNED_OFF_BY, SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED,USER_AGENT_SANE_1 autolearn=unavailable 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 35ABCC432C3 for ; Sun, 24 Nov 2019 15:17:54 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 0A1F5207DD for ; Sun, 24 Nov 2019 15:17:54 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=fail reason="signature verification failed" (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="Jpx1440Y" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727090AbfKXPRv (ORCPT ); Sun, 24 Nov 2019 10:17:51 -0500 Received: from mail-oi1-f195.google.com ([209.85.167.195]:34414 "EHLO mail-oi1-f195.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726948AbfKXPRu (ORCPT ); Sun, 24 Nov 2019 10:17:50 -0500 Received: by mail-oi1-f195.google.com with SMTP id l202so10883253oig.1; Sun, 24 Nov 2019 07:17:49 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:subject:to:cc:references:from:message-id:date:user-agent :mime-version:in-reply-to:content-language:content-transfer-encoding; bh=5C9fcZplZbhqVRMPmr2V23XeMRp4oEU3og0P7QEerd4=; b=Jpx1440YYqzexRpdjA3SiAXYclFcRW+1AfgPguF0jIkyAvx6JHX8y+wllMlbcSgDco eK2aFQg70ozNQNHxITEOvlqPDYLnndXq9eeXtS4Oi1Z8oBPuAZMLjB4TEa+V3ptHcNG6 e0hCF5JuyilIJRpYC8aMsh4Lf5ExTN3ISK1ulc9fzIgZ7F/HQITN2iDR6i933R4h6llG 7oMm6hcdle9fL/RUJhFwLps0dU5tvK4Nh9N5kFbRk1wOnr2ebRLzeTyVJugqrWcGYdVY Vkx3FdnZaoBHvR4vkWkyksMbdAHh+QJApDTek7WBJxQHySdHoVoXT37KH6PJSmMgAosL jqNA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:subject:to:cc:references:from:message-id :date:user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=5C9fcZplZbhqVRMPmr2V23XeMRp4oEU3og0P7QEerd4=; b=NHOtDzD9m3Yvlf1mbg8XkWJ60DWU3j81MWYXs1LdDil3E4RB0YXX5WapBJLpo3F07n P4KFVjlZUGDv7hzJUsW8SPzcH55/fHnZlp9j8tQ5i/HC1Kpv3g4dyUYP1J0nL9pL3qt5 0xjK8CFXVH4whjIJ608Y+k0GklPuIo+rRFbQ+uoz82hABVuuyXT9SN4Lyp6NkvQSFWkr Ta9lEHyfNw9ha83txkUMBnzQXvaYbfv/G8vJHQjf/0ObabaKtJOos2AKxg7XwM+M8cuQ 5oc1oeX0jtwJjdK9Z5gIB1BH1o/CrrNKAaHv3zRkjz4AKHX7ADUFEGA/ZBzOGJ5Bdw/F l0MA== X-Gm-Message-State: APjAAAVGV89M1f2I3NV71rNGcbM6ftsUJDGbNTMNovHYrSs6wtTFAE7a ofnSiLtr1xSoVCJBZFUbtxIB5NVN X-Google-Smtp-Source: APXvYqyo788a2sh7C+EcGrnmfMQbs2nuTW/CVkvqD52t1x6QsdY3JKPC2qKdW9qWYn5up2z8JtTfBw== X-Received: by 2002:aca:d78a:: with SMTP id o132mr20032815oig.79.1574608669287; Sun, 24 Nov 2019 07:17:49 -0800 (PST) Received: from server.roeck-us.net ([2600:1700:e321:62f0:329c:23ff:fee3:9d7c]) by smtp.gmail.com with ESMTPSA id v7sm1548686oie.51.2019.11.24.07.17.47 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sun, 24 Nov 2019 07:17:48 -0800 (PST) Subject: Re: [PATCH 2/8] ACPI: thermal: switch to use helpers To: Akinobu Mita , linux-nvme@lists.infradead.org, linux-hwmon@vger.kernel.org, linux-pm@vger.kernel.org, linux-kernel@vger.kernel.org Cc: Sujith Thomas , Darren Hart , Andy Shevchenko , Zhang Rui , Eduardo Valentin , Daniel Lezcano , Amit Kucheria , Jean Delvare , Keith Busch , Jens Axboe , Christoph Hellwig , Sagi Grimberg References: <1574604530-9024-1-git-send-email-akinobu.mita@gmail.com> <1574604530-9024-3-git-send-email-akinobu.mita@gmail.com> From: Guenter Roeck Message-ID: <00fff683-d0e2-67ae-83e3-c472fdbe9e1d@roeck-us.net> Date: Sun, 24 Nov 2019 07:17:46 -0800 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.9.0 MIME-Version: 1.0 In-Reply-To: <1574604530-9024-3-git-send-email-akinobu.mita@gmail.com> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 11/24/19 6:08 AM, Akinobu Mita wrote: > This switches the ACPI thermal zone driver to use celsius_to_deci_kelvin() > and deci_kelvin_to_celsius() in instead of helpers > in . > > This is preparation for centralizing the kelvin to/from Celsius conversion > helpers in . > s/temprature/temperature/ Looks like this applies to all patches. > Cc: Sujith Thomas > Cc: Darren Hart > Cc: Andy Shevchenko > Cc: Zhang Rui > Cc: Eduardo Valentin > Cc: Daniel Lezcano > Cc: Amit Kucheria > Cc: Jean Delvare > Cc: Guenter Roeck > Cc: Keith Busch > Cc: Jens Axboe > Cc: Christoph Hellwig > Cc: Sagi Grimberg > Signed-off-by: Akinobu Mita > --- > drivers/acpi/thermal.c | 15 +++++++++------ > 1 file changed, 9 insertions(+), 6 deletions(-) > > diff --git a/drivers/acpi/thermal.c b/drivers/acpi/thermal.c > index d831a61..bd9b6eb 100644 > --- a/drivers/acpi/thermal.c > +++ b/drivers/acpi/thermal.c > @@ -297,7 +297,9 @@ static int acpi_thermal_trips_update(struct acpi_thermal *tz, int flag) > if (crt == -1) { > tz->trips.critical.flags.valid = 0; > } else if (crt > 0) { > - unsigned long crt_k = CELSIUS_TO_DECI_KELVIN(crt); > + unsigned long crt_k = > + celsius_to_deci_kelvin(crt); > + > /* > * Allow override critical threshold > */ > @@ -333,7 +335,7 @@ static int acpi_thermal_trips_update(struct acpi_thermal *tz, int flag) > if (psv == -1) { > status = AE_SUPPORT; > } else if (psv > 0) { > - tmp = CELSIUS_TO_DECI_KELVIN(psv); > + tmp = celsius_to_deci_kelvin(psv); > status = AE_OK; > } else { > status = acpi_evaluate_integer(tz->device->handle, > @@ -413,7 +415,7 @@ static int acpi_thermal_trips_update(struct acpi_thermal *tz, int flag) > break; > if (i == 1) > tz->trips.active[0].temperature = > - CELSIUS_TO_DECI_KELVIN(act); > + celsius_to_deci_kelvin(act); > else > /* > * Don't allow override higher than > @@ -421,9 +423,9 @@ static int acpi_thermal_trips_update(struct acpi_thermal *tz, int flag) > */ > tz->trips.active[i - 1].temperature = > (tz->trips.active[i - 2].temperature < > - CELSIUS_TO_DECI_KELVIN(act) ? > + celsius_to_deci_kelvin(act) ? > tz->trips.active[i - 2].temperature : > - CELSIUS_TO_DECI_KELVIN(act)); > + celsius_to_deci_kelvin(act)); > break; > } else { > tz->trips.active[i].temperature = tmp; > @@ -1087,7 +1089,8 @@ static int acpi_thermal_add(struct acpi_device *device) > INIT_WORK(&tz->thermal_check_work, acpi_thermal_check_fn); > > pr_info(PREFIX "%s [%s] (%ld C)\n", acpi_device_name(device), > - acpi_device_bid(device), DECI_KELVIN_TO_CELSIUS(tz->temperature)); > + acpi_device_bid(device), > + deci_kelvin_to_celsius(tz->temperature)); > goto end; > > free_memory: >