Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp1304946imu; Wed, 16 Jan 2019 16:50:00 -0800 (PST) X-Google-Smtp-Source: ALg8bN5IlEbiffBjnr4k8M8minnUEr+piIBCmKWmdqFCztx7dGe36naxW1g51emSk96tnzma9vNb X-Received: by 2002:a62:cd44:: with SMTP id o65mr12737374pfg.222.1547686199955; Wed, 16 Jan 2019 16:49:59 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1547686199; cv=none; d=google.com; s=arc-20160816; b=EkD4Jd32/8XDexz0xZOOhoV6MWS0ooCV2syIZ6Svyv7IWS17ypN3BtVDXTbjzTELfu sSBLJHNDygxnW1vISvhiKixFWy+yvz1CitAAMSTwb91f/iWXUSP5AkfgnLLThKXrAxBv Su4t4wc8nzUpiVwkZ0hjI0rE4EUtkG6TBRkAslA4vdTj133GHB3AOFQKoAbdN+sx6wxR AtmyLZzPocm3ldbiLCSgeY/Z0EyA9Vt1aE4Zui1oTWTGkhwAUa20GU8gHWCE6rqqvJ5r 3qa2aF47ZHndZ3R8EqavsysMkuBC2DVvd9xOUGs3jDmiBDTdwdoUUJVZCTmVdKSCxM92 MXSw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from; bh=wngCoJmnmomy43VccCvXTeWZ37DoG8YYAnqN7FQLi08=; b=nPf4rPUhrhKjcy8ye42sNOrRQOzIbPN44G0CZoUA1RFgx0Exe6hECemKymBgHhN2wH TgwPcA8+wzjbnD4kbskQYWGhYSWKj7EBNA04JogtCT71m3nrBjPOOZ4KXpdz0lEcypke FXP1W04XbXVEoWWX+3ODc9wYjXr08jSYRsDq09dSG51Zzt2xHxFrTHMXkYlccBPjYrId iiSbucVl6CidEpIfp3EiXjxm8H66lkJMgbXb/BUaYUF7WFOQYdjgng+y87LQDV99O8DF +m3vV1b0RC6wlQJmSA3p3jANJaCEvsK+j8AvpnwN0oaKzcv0WFzL5mDJf+V7lAIfgE2n m85A== ARC-Authentication-Results: i=1; mx.google.com; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id s5si969104pgl.481.2019.01.16.16.49.41; Wed, 16 Jan 2019 16:49:59 -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; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728199AbfAPW5A (ORCPT + 99 others); Wed, 16 Jan 2019 17:57:00 -0500 Received: from cloudserver094114.home.pl ([79.96.170.134]:48065 "EHLO cloudserver094114.home.pl" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727702AbfAPW47 (ORCPT ); Wed, 16 Jan 2019 17:56:59 -0500 Received: from 79.184.255.239.ipv4.supernova.orange.pl (79.184.255.239) (HELO aspire.rjw.lan) by serwer1319399.home.pl (79.96.170.134) with SMTP (IdeaSmtpServer 0.83.183) id fdacdc8b9883e575; Wed, 16 Jan 2019 23:56:57 +0100 From: "Rafael J. Wysocki" To: Amit Kucheria Cc: linux-kernel@vger.kernel.org, linux-arm-msm@vger.kernel.org, viresh.kumar@linaro.org, edubezval@gmail.com, swboyd@chromium.org, dianders@chromium.org, mka@chromium.org, linux-pm@vger.kernel.org Subject: Re: [PATCH v1 01/10] cpufreq: Add thermal_cooling_device pointer to struct cpufreq_policy Date: Wed, 16 Jan 2019 23:56:05 +0100 Message-ID: <1718046.8NPD0iV1Wv@aspire.rjw.lan> In-Reply-To: <168294311714f269b1050bcbf5d3324eae0808f2.1547481320.git.amit.kucheria@linaro.org> References: <168294311714f269b1050bcbf5d3324eae0808f2.1547481320.git.amit.kucheria@linaro.org> MIME-Version: 1.0 Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="us-ascii" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Monday, January 14, 2019 5:34:53 PM CET Amit Kucheria wrote: > Several cpufreq drivers register themselves as thermal cooling devices. > Adding a pointer to struct cpufreq_policy removes the need for them to > store this pointer in a private data structure. > > We can then auto-register the cpufreq driver as a thermal cooling device > from cpufreq core code. > > Signed-off-by: Amit Kucheria > --- > include/linux/cpufreq.h | 5 +++++ > 1 file changed, 5 insertions(+) > > diff --git a/include/linux/cpufreq.h b/include/linux/cpufreq.h > index c86d6d8bdfed..7d0cf54125fa 100644 > --- a/include/linux/cpufreq.h > +++ b/include/linux/cpufreq.h > @@ -95,6 +95,11 @@ struct cpufreq_policy { > struct cpufreq_frequency_table *freq_table; > enum cpufreq_table_sorting freq_table_sorted; > > +#ifdef CONFIG_CPU_THERMAL > + /* Pointer to the cooling device if used for thermal mitigation */ > + struct thermal_cooling_device *cooldev; > +#endif > + Why here and not at the end of the struct? > struct list_head policy_list; > struct kobject kobj; > struct completion kobj_unregister; > Also, I would suggest combining this one with patch [02/10].