From patchwork Sun Apr 28 09:51:04 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Daniel Lezcano X-Patchwork-Id: 163005 Delivered-To: patch@linaro.org Received: by 2002:a92:7e86:0:0:0:0:0 with SMTP id q6csp635785ill; Sun, 28 Apr 2019 02:51:41 -0700 (PDT) X-Google-Smtp-Source: APXvYqx1onH4cL6X7L85VUIi+/it7KhhDF/SYvAB01u0etbAagm1R4wqQG4thVTWkZMXBTvkzCId X-Received: by 2002:a17:902:b703:: with SMTP id d3mr13963483pls.93.1556445101612; Sun, 28 Apr 2019 02:51:41 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1556445101; cv=none; d=google.com; s=arc-20160816; b=dQjKNEbqLsmpzVGPOQNUnBGYoabMxatpEvZ6wbe+oN2oFd6+5lpOfumzS/rgh/i7mx rIpvtayAUyS19jVb/4vB6zZWJf/RfPCu3/KIcPzrwYcHo1XqRIsZpBaliI1cVqAEqSJz DwHnsurnZti8qowmmQqbWeo2FytVVex7JT9zD2esYveBlKlZF3xAwNVXL9rhe4YYQ2UF YJhxfae9Ndrnk8ywWZ6hLYSxchcbEYs/HFW6lUlZqwTiHb+rjSPIxej2r8PJfxTDFYWm YJjsNY6zr7DEqXZB3CFGxcG+0vkFsWjnC2VO8KGYS9pSczcPZ7rJtSvQxyrphsCG9fHg vHRA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:references:in-reply-to:message-id:date :subject:cc:to:from:dkim-signature; bh=5xrv+roHMyTgrScP6HnGJBXKE2TsH49nxvl3B7+wocw=; b=bLJS0ZWXRYCYz7bChwVRZkrwnlRFnVtzkEfW9gJnYqsmUTZ31TyUclyXkm55TVmVTN mejTOD4HJkUQ+MouHjJ0WhhYVdjbBZrNx8cJkDi2HE+v0Nhxed71NdmPkK02JGuDiTZE 0zq5hHQT+Jpakw9DNiJRdySJWLk0O7A79iQqNbAjflNDVxq2XQAWAJv5gNXutk+PBtEq i3ixXOWXIssNaoGJC27Kj06q5ZtmxnErIJyY/rxG3ueE6r+8IeE5B/UnqToGojea/m+O wIn8uI3hpnZIC4wBvcL90WNUpqSpfph7l3tem+XXqur5J6p9m1OUF2opwI88zKGX6bo2 Px3w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=oc9EakPl; 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=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id c13si30301086pgg.452.2019.04.28.02.51.41; Sun, 28 Apr 2019 02:51:41 -0700 (PDT) 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=@linaro.org header.s=google header.b=oc9EakPl; 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=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726650AbfD1Jvh (ORCPT + 30 others); Sun, 28 Apr 2019 05:51:37 -0400 Received: from mail-wm1-f68.google.com ([209.85.128.68]:34440 "EHLO mail-wm1-f68.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726583AbfD1Jvh (ORCPT ); Sun, 28 Apr 2019 05:51:37 -0400 Received: by mail-wm1-f68.google.com with SMTP id b67so632321wmg.1 for ; Sun, 28 Apr 2019 02:51:35 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=5xrv+roHMyTgrScP6HnGJBXKE2TsH49nxvl3B7+wocw=; b=oc9EakPlbe5w9lqeY60aCtQzpTdktaayjwRlelIJAIMQAftSolF/3kS30WeQ7splSu HHlOQuqn91A7CjgOceu7YX66T3rG++7FVBzd0k2Mm/77lFGS8PJp5BOLpZCU1jXcpU/n /hbUYaVa6RONgxLSodmuFqGIQWyD5U32AsrFMaBmDm7wukPFNI0gST4fSfPXQAORkF/V KyPS28AUMyXfDwt6KiPROmHqb3KaFx1xMDq0WOezv4PPvfR21EJyF247AF/o0O8Qxw8M ophYnf+kQTy5StyjBe2EN5Te3yYYsyLEv97leNJAFUDf9pDItDlEjNv85J9sf8b6SnEE gUGw== 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:in-reply-to :references; bh=5xrv+roHMyTgrScP6HnGJBXKE2TsH49nxvl3B7+wocw=; b=Bqkpc1lMjUYZf0u4M+lDOXQqerzuXwKnLyp8HulcOtJ9dlx8z4epV2A+WSvGN7YMKI W1Rf+RVlLP41K8U0nlgOxLNpViUVMsmaEpicU2G0WTUm44beyYhjzKLWWRf3uVNPJJ8u aNey+gf/CeHTGxj+nj3mg75Fsh85Vsx7vT7/NCtsdku9chCFXV8smcsJkTSKhvKmxUCx 0q6eEPjtYn08MzFrkpFTjDPb7UG0mba6ySMWfXBt+SK08yFiyzMUbl9urVZj3d6CTAvu FsBO0dJPrN//A4i1YiaX6c9nPt2bBvy7ox7s5Q1oX46IMx7ujdMNaM+jqU53By1i/AQV 80wQ== X-Gm-Message-State: APjAAAUr64fuLTAk+xapY0GAvhagmGpMXIP3t+wNyCfFxe3dbVeZcxyD oK791YKfklPkzePmernYcFwYgw== X-Received: by 2002:a7b:c458:: with SMTP id l24mr14472087wmi.75.1556445094884; Sun, 28 Apr 2019 02:51:34 -0700 (PDT) Received: from clegane.local (86.204.129.77.rev.sfr.net. [77.129.204.86]) by smtp.gmail.com with ESMTPSA id e5sm1560675wrh.79.2019.04.28.02.51.33 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sun, 28 Apr 2019 02:51:34 -0700 (PDT) From: Daniel Lezcano To: edubezval@gmail.com, rui.zhang@intel.com Cc: linux-kernel@vger.kernel.org, linux-pm@vger.kernel.org, Viresh Kumar , Philippe Ombredanne , Amit Daniel Kachhap , Javi Merino Subject: [PATCH - resend 2/3] thermal/drivers/cpu_cooling: Add Software Package Data Exchange (SPDX) Date: Sun, 28 Apr 2019 11:51:04 +0200 Message-Id: <20190428095106.5171-2-daniel.lezcano@linaro.org> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20190428095106.5171-1-daniel.lezcano@linaro.org> References: <20190428095106.5171-1-daniel.lezcano@linaro.org> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org For license auditing purpose, let's add the SPDX tag. Signed-off-by: Daniel Lezcano Acked-by: Viresh Kumar Acked-by: Philippe Ombredanne --- drivers/thermal/cpu_cooling.c | 16 +--------------- 1 file changed, 1 insertion(+), 15 deletions(-) -- 2.17.1 diff --git a/drivers/thermal/cpu_cooling.c b/drivers/thermal/cpu_cooling.c index 42aeb9087cab..b9d152a5f7ba 100644 --- a/drivers/thermal/cpu_cooling.c +++ b/drivers/thermal/cpu_cooling.c @@ -1,3 +1,4 @@ +// SPDX-License-Identifier: GPL-2.0 /* * linux/drivers/thermal/cpu_cooling.c * @@ -8,21 +9,6 @@ * Authors: Amit Daniel * Viresh Kumar * - * ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; version 2 of the License. - * - * This program is distributed in the hope that it will be useful, but - * WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * General Public License for more details. - * - * You should have received a copy of the GNU General Public License along - * with this program; if not, write to the Free Software Foundation, Inc., - * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. - * - * ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ */ #include #include From patchwork Sun Apr 28 09:51:05 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Daniel Lezcano X-Patchwork-Id: 163006 Delivered-To: patch@linaro.org Received: by 2002:a92:7e86:0:0:0:0:0 with SMTP id q6csp635793ill; Sun, 28 Apr 2019 02:51:42 -0700 (PDT) X-Google-Smtp-Source: APXvYqzdj7CqdHYapYbS0yrL5d1pBDVDYwnfOayIJKXP8BnKz0tiu06CzMuLWJCv7K8oBbCxAYgq X-Received: by 2002:aa7:818a:: with SMTP id g10mr36850670pfi.178.1556445102022; Sun, 28 Apr 2019 02:51:42 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1556445102; cv=none; d=google.com; s=arc-20160816; b=ou3vtl/xBTwAZGJi1o9LCsystO4xx/r6C8wHjXhke12H01MF5XMULry/2N8TsDYzbc 9oKM3PWuOfkDfc83wPXOikWa/SCktZNNdYAgoNxYX9hC8qRwhvS5AQRbcs04RTQKhbCi 99TXqgkQyyUDoWV5m2Q65XgqtSGHBmAtqZmWmutd+tnxV7D7toy3aPCK0NcRBAkVdhd3 ntqI8KBy5j5/8pozXgcWH9Q/p+z1Pa3D4QU3LalJ3o/GyXB2GRFAh6iboFo/hQfogAIk M0zDQqdadgx/g3hTvkHTjrs11FWiThKlHqXYEWEhzXlDgEHewwywu6RCpuSj9uaPnIPN 1maw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:references:in-reply-to:message-id:date :subject:cc:to:from:dkim-signature; bh=40vQhCWF25KCOygjTxWMwR00SFUppKuwSlIi4NPfG4I=; b=uDJI1HNp6SO0YnJ5NF0F9DCZnkAh8ChRmFjMi2cBNxwUm75LDw2ZWu/ZXpAYdqwVHT XPdPB8AC2aL9AB/vugnn7F2KhnuvjsiXSv3lsSmtBDV68AA0jn8QsQMS98+2sWfP/bXs uV3OlpoRtdXJvs9DM30OZKDJ/31YtS+pzybI6G0x7+TeL/s5QBmsbUg3Nhs7DBxZtXOv P6ZSXREBKbqPHg15yg5bRryvjM2XnyKQ4kgj7R4sCfnfMBtWSbXKSFm2QJQiE3dai60D bVhN4xMOSLFomys6gki3wLvTEfkAWwPDn/ogSAA1fo5Vx7j4BUH/C5xQB3E/hjMWMT/F Hekw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=Lx+jPmcT; 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=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id c13si30301086pgg.452.2019.04.28.02.51.41; Sun, 28 Apr 2019 02:51:42 -0700 (PDT) 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=@linaro.org header.s=google header.b=Lx+jPmcT; 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=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726687AbfD1Jvj (ORCPT + 30 others); Sun, 28 Apr 2019 05:51:39 -0400 Received: from mail-wr1-f65.google.com ([209.85.221.65]:39277 "EHLO mail-wr1-f65.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726592AbfD1Jvi (ORCPT ); Sun, 28 Apr 2019 05:51:38 -0400 Received: by mail-wr1-f65.google.com with SMTP id a9so11148126wrp.6 for ; Sun, 28 Apr 2019 02:51:37 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=40vQhCWF25KCOygjTxWMwR00SFUppKuwSlIi4NPfG4I=; b=Lx+jPmcTYGJuK8G7wOr1Hg6U+yhw+gL4mmxquj/CLIDtsag/ZM0B3C1VqTJLYrIYXt 0RK+cDTUhMBkv8aeQipfghWXbKa3fdVw4l3p3NcP3G80kQZKLf63CYq3SfrrfWvRytg9 hqNeUDHK7FLELHlDvhi6iRH3j4t+4ZkM357v+0YTFf29/iocxTgacEXE7fLRrNFw0kMO e4+4j8GMpouzh1itkcOLsqvrT1VniJ3jM/+OD4H4tnZF8gHrwmS+uYKKe+IrsUNU5M0t 05Uv2GcYR+tVjxpM8aBt98XkBFZB8C8BUSBnEb5lLazDfubqcXOAbjaGxF48WJz3WSUV 8gEg== 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:in-reply-to :references; bh=40vQhCWF25KCOygjTxWMwR00SFUppKuwSlIi4NPfG4I=; b=WrLc82u7kxgblA28/uYR27Ha1Pz/6+A4QS0cQqlFuFVjE09FGc67hdhm9uegGUsqEE QEkI+oCR078ZhTclb7IhhD46x9CWxf6jRm+iFqNRx+cMkGHuK+bGd5Nm28jcbyqtPMWG WuXV22WLBNfcdDBTl6L2JekqkmMN+glmRU/o/Z7efILJNGtyvopkWzOtysptVbWXijPR e9WpFtkas9/x3HbI0xv3d5IH6dVcCKis6w3wabeQLYVz70wPXYGS/0ephpfF/k6+zak2 f0LVMFHisccZXcmEzhEljjHRgqG1vQknDKLIsfrtZsgZiyAtsX4Ixx2KaUE4o4aKGbSA 9crg== X-Gm-Message-State: APjAAAXoPC8PSAPVbFYfi9TEqw6npShzjspyOiMzjoR43Sv9eRc0uvrN uaMUG589lWURJ1v9Sdv8cwcEWLrtebw= X-Received: by 2002:a5d:6ac3:: with SMTP id u3mr3683132wrw.13.1556445096437; Sun, 28 Apr 2019 02:51:36 -0700 (PDT) Received: from clegane.local (86.204.129.77.rev.sfr.net. [77.129.204.86]) by smtp.gmail.com with ESMTPSA id e5sm1560675wrh.79.2019.04.28.02.51.35 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sun, 28 Apr 2019 02:51:35 -0700 (PDT) From: Daniel Lezcano To: edubezval@gmail.com, rui.zhang@intel.com Cc: linux-kernel@vger.kernel.org, linux-pm@vger.kernel.org, Viresh Kumar , Amit Daniel Kachhap , Javi Merino Subject: [PATCH - resend 3/3] thermal/drivers/cpu_cooling: Remove pointless field Date: Sun, 28 Apr 2019 11:51:05 +0200 Message-Id: <20190428095106.5171-3-daniel.lezcano@linaro.org> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20190428095106.5171-1-daniel.lezcano@linaro.org> References: <20190428095106.5171-1-daniel.lezcano@linaro.org> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org The structure cpufreq_cooling_device provides a backpointer to the thermal device but this one is used for a trace and to unregister. For the trace, we don't really need this field and the unregister function as the same pointer passed as parameter. Remove it. Acked-by: Viresh Kumar Signed-off-by: Daniel Lezcano --- drivers/thermal/cpu_cooling.c | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) -- 2.17.1 diff --git a/drivers/thermal/cpu_cooling.c b/drivers/thermal/cpu_cooling.c index b9d152a5f7ba..9b014d0e8e70 100644 --- a/drivers/thermal/cpu_cooling.c +++ b/drivers/thermal/cpu_cooling.c @@ -87,7 +87,6 @@ struct cpufreq_cooling_device { unsigned int clipped_freq; unsigned int max_level; struct freq_table *freq_table; /* In descending order */ - struct thermal_cooling_device *cdev; struct cpufreq_policy *policy; struct list_head node; struct time_in_idle *idle_time; @@ -195,8 +194,7 @@ static int update_freq_table(struct cpufreq_cooling_device *cpufreq_cdev, dev = get_cpu_device(cpu); if (unlikely(!dev)) { - dev_warn(&cpufreq_cdev->cdev->device, - "No cpu device for cpu %d\n", cpu); + pr_warn("No cpu device for cpu %d\n", cpu); return -ENODEV; } @@ -679,7 +677,6 @@ __cpufreq_cooling_register(struct device_node *np, goto remove_ida; cpufreq_cdev->clipped_freq = cpufreq_cdev->freq_table[0].frequency; - cpufreq_cdev->cdev = cdev; mutex_lock(&cooling_list_lock); /* Register the notifier for first cpufreq cooling device */ @@ -797,7 +794,7 @@ void cpufreq_cooling_unregister(struct thermal_cooling_device *cdev) cpufreq_unregister_notifier(&thermal_cpufreq_notifier_block, CPUFREQ_POLICY_NOTIFIER); - thermal_cooling_device_unregister(cpufreq_cdev->cdev); + thermal_cooling_device_unregister(cdev); ida_simple_remove(&cpufreq_ida, cpufreq_cdev->id); kfree(cpufreq_cdev->idle_time); kfree(cpufreq_cdev->freq_table);