Received: by 2002:a25:7ec1:0:0:0:0:0 with SMTP id z184csp6872968ybc; Thu, 28 Nov 2019 06:58:29 -0800 (PST) X-Google-Smtp-Source: APXvYqz7MaleRI8G5p3aQAy3My2vl+uxsNX7HsEnqDL84B1B0g8migKqfWBVEgpkCEK+FzhvHOm+ X-Received: by 2002:a17:906:2651:: with SMTP id i17mr5489105ejc.246.1574953109054; Thu, 28 Nov 2019 06:58:29 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1574953109; cv=none; d=google.com; s=arc-20160816; b=VYC97bNgXVnWY3HeM3VR87Iv4vzI5NtHHB7XBC5VEn31bdivFnPxTF1KWPTRUCC+OW koLQUfoCeU2ya3akmvT2eNAVfghRdzzKu3VNsbr+LrF//XJYZ8PZPPqvfJ9b8uN9JyPX hcrWdZsGjeG554F97iKp/cWKlaRWYNGrIWSjqSQR8fN3MPvJXwvoygESNOc9gLjlXF5w NC5zqHGPxPvQ5wmzifnVrXMU45Zq1YYZik4KRrwokUeQoi5m8Jk+Sl0f5vhla2s8OMn9 9ylHdfKbfpoaMEGXuBj3+k208ZQVB4+hAV2G8cOfmRjx52AnMZf8Dm+31G1vkGSacOr5 atNw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:message-id:date:subject:cc:to:from :dkim-signature; bh=P/DvvVqY88h8qjrElwC+TntQygBRJpTMf+ORNvfk45c=; b=AY0kkf9+UDbPNgH0HnJPgOLCnUSduzck4dIzj9VDYUTR5P8KyOBxFs9nSChoh9rxGU Wjxrtjj+XGqT8ulcloUDNk7hc776IBGlMTDTaa1dYpR3qlcOJUDZmcGr+Pr4yYFGjmG6 0ndn+L3JJNl/Agu3nybLubuGLs7EFbVf5cpeTr/LeU7cELURlUEiUieclDYOgx1GGJP1 wNg35B5jqbbnS5xl5pMuffN0gwpk8nZHSQ1SIzFrVawyUNsOqNo1e+VfZwMxKuvq9rmE 2RSWSvXGOzWoU50ReSLPhGjQ0CHqQJClhrqW8fyXuFi99+ZuVNApFIDmzxoiltmlAS2L 1diA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=aLMIKFsQ; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id 63si14908689edl.131.2019.11.28.06.58.04; Thu, 28 Nov 2019 06:58:29 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=aLMIKFsQ; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726608AbfK1Oy6 (ORCPT + 99 others); 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-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-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@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 -- 2.7.4