From patchwork Thu Nov 28 14:54:31 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Akinobu Mita X-Patchwork-Id: 11266127 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id B7FBD14B7 for ; Thu, 28 Nov 2019 14:55:02 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 96C2921771 for ; Thu, 28 Nov 2019 14:55:02 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="aLMIKFsQ" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726545AbfK1Oy6 (ORCPT ); Thu, 28 Nov 2019 09:54:58 -0500 Received: from mail-pf1-f195.google.com ([209.85.210.195]:35161 "EHLO mail-pf1-f195.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726401AbfK1Oy6 (ORCPT ); Thu, 28 Nov 2019 09:54:58 -0500 Received: by mail-pf1-f195.google.com with SMTP id q13so13273944pff.2; Thu, 28 Nov 2019 06:54:56 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id; bh=P/DvvVqY88h8qjrElwC+TntQygBRJpTMf+ORNvfk45c=; b=aLMIKFsQBEJTDmAuiv03bBxl3ZQHr8Ul++QJpS0rglPgjm3TOucl7IiAJ9VoZSgc0L cFNNax3aV+x03ClsZiRfPlMwN1Rgy6XaQfl8avt9y+uwfmv5k7Yobo0nc/YdyJMU6CNv yMWMWCplcAOMELOOEVc6U0TJRzw8ZnWuFQ2qbe7CSZXgD0w+gL2WpEiiiXoBDLKiOZeg q/xShB+c2VVujjtJr8M59ZnJclyk+Hm19fowaq8vIJhzFqRcxFxr1L0ecAefvJK3TpC0 IBSsEkaoinBZNCYsKyuLVWzAtSAx9pphtl+2nEO8CcCLzqLaYyRhT4Sfq488m1RLXQGe Qxaw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id; bh=P/DvvVqY88h8qjrElwC+TntQygBRJpTMf+ORNvfk45c=; b=TWzMtZPfkOS73yWUDvyoh0wslTcpl5xVNYN0dr5jK0T30DZ1rDAJIDvN4uM28fPlA9 NIaXQXxTmJ/IgASZSTV+T76vFERWVLQmxqJkbyXJuxjTb2ydTuUrn+J/Tnu1e6whOhro Ym4jFqf4hozytMpky8lcpfWop3fgLNGphbAk/nUph6r1SNtHiccAkE1oTEggL3DhlQmZ zfpk/6aGYpvso6oiSy0iJAm1fH6IBxk1538NqOKRIEsdsiINkfORRBVUWUk9lUkAkdFn tPpwU1vDKYGJuBXIZWGLVjl3VOafLSDGbYVvXULIQ0zOPNtE30vaiL04lsUrtaOyBiLP wzWw== X-Gm-Message-State: APjAAAUyPey5NuNOau9SKxmsdmY5MtKzT6yS0DFrIU+etU/fDNDQf3xs M0g4dJR2I3sKkSQdeSE9+y4= X-Google-Smtp-Source: APXvYqwuNtOJ51bQrQY+Kw3mlYu1GrcIS6mWU2lAq/0U7uWjbvcok0PMGch3BZ5vsUAJyWT226vUgw== X-Received: by 2002:a63:1953:: with SMTP id 19mr5926293pgz.157.1574952896376; Thu, 28 Nov 2019 06:54:56 -0800 (PST) Received: from localhost.localdomain ([240f:34:212d:1:8015:e854:5ef0:f52e]) by smtp.gmail.com with ESMTPSA id z11sm22282563pfg.117.2019.11.28.06.54.50 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Thu, 28 Nov 2019 06:54:54 -0800 (PST) From: Akinobu Mita To: linux-nvme@lists.infradead.org, linux-hwmon@vger.kernel.org, linux-pm@vger.kernel.org, linux-kernel@vger.kernel.org Cc: Akinobu Mita , Sujith Thomas , Darren Hart , Andy Shevchenko , Zhang Rui , Daniel Lezcano , Amit Kucheria , Jean Delvare , Guenter Roeck , Keith Busch , Jens Axboe , Christoph Hellwig , Sagi Grimberg Subject: [PATCH v2 0/8] add header file for kelvin to/from Celsius conversion helpers Date: Thu, 28 Nov 2019 23:54:31 +0900 Message-Id: <1574952879-7200-1-git-send-email-akinobu.mita@gmail.com> X-Mailer: git-send-email 2.7.4 Sender: linux-hwmon-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-hwmon@vger.kernel.org There are several helper macros to convert kelvin to/from Celsius in for thermal drivers. These are useful for any other drivers or subsystems, but it's odd to include just for the helpers. This adds a new that provides the equivalent inline functions for any drivers or subsystems, and switches all the users of conversion helpers in to use helpers. * v2 - add deci_kelvin_to_millicelsius_with_offset() in linux/temperature.h - stop including linux/temperature.h from linux/thermal.h - include explicitly from thermal drivers - fix s/temprature/temperature/ typo in commit log - use deci_kelvin_to_millicelsius_with_offset() in ACPI thermal zone driver - don't mix up another fix (format string for cellsius value) - add Acked-by and Reviewed-by tags Akinobu Mita (8): add header file for kelvin to/from Celsius conversion helpers ACPI: thermal: switch to use helpers platform/x86: asus-wmi: switch to use helpers platform/x86: intel_menlow: switch to use helpers thermal: int340x: switch to use helpers thermal: intel_pch: switch to use helpers nvme: hwmon: switch to use helpers thermal: remove kelvin to/from Celsius conversion helpers from drivers/acpi/thermal.c | 36 ++++++++------- drivers/nvme/host/hwmon.c | 13 +++--- drivers/platform/x86/asus-wmi.c | 7 ++- drivers/platform/x86/intel_menlow.c | 9 ++-- .../intel/int340x_thermal/int340x_thermal_zone.c | 7 +-- drivers/thermal/intel/intel_pch_thermal.c | 3 +- include/linux/temperature.h | 51 ++++++++++++++++++++++ include/linux/thermal.h | 11 ----- 8 files changed, 91 insertions(+), 46 deletions(-) create mode 100644 include/linux/temperature.h Cc: Sujith Thomas Cc: Darren Hart Cc: Andy Shevchenko Cc: Zhang Rui Cc: Daniel Lezcano Cc: Amit Kucheria Cc: Jean Delvare Cc: Guenter Roeck Cc: Keith Busch Cc: Jens Axboe Cc: Christoph Hellwig Cc: Sagi Grimberg