Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp6363074imu; Mon, 21 Jan 2019 07:39:17 -0800 (PST) X-Google-Smtp-Source: ALg8bN5oNT3deKXc7pu+7ScbPafU2xfX1Nt5N4qZn5pkyaOxAhi3iPj0z1YgV5WGSHfT0sb/mbSb X-Received: by 2002:a17:902:7848:: with SMTP id e8mr31261010pln.100.1548085157165; Mon, 21 Jan 2019 07:39:17 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1548085157; cv=none; d=google.com; s=arc-20160816; b=ET+OCXH/7pXW74m3n24FYbRq92BFAO8oRx9sL+zYi2LsL6HZx8bF0yRZaCb9xNByVO JUHmzjlwIAJJXnUCcyo3WcXxLQJgdKDONdInK2aq9ItGh4qGqovUMlTIIKcUVBXHL6Qd zb03BclIBrKwh4B5Ug/sVx394Ikxd9DonwMV74ofNEIrTaAsyFAyZpI3hKGaDPfFYVGR rz2RKe+TEJAntkhq3+qSJ5V+NT8bqtHXPcJbYD6Bx4/hMBH1q35L9x61SSYQOvE6//fW 71Wdvfk/rJwdbHJzi5mOIgZsGmwWL1Al2poLU+EgyV0aMmMBQC+EyjDAxwwqITXuzloY BzIA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:dkim-signature; bh=P+QB4YZGEJLcPSkGnAhuoFe4nirgoy69vDlYb4K4aCQ=; b=so2r90e3DDMkWZBZD2CdQLEVSokfL2SgBU5xtoHESmMSK4J9B78uJJypXSPMszdM8Y ZSkQ24G43j4JfEona6YUDNbltxYOHdYZkz2URLHwZ0gfQoj72buatYFXccEzUdlNswaL QYEyS27huGxgFKieWP42VWuUoyA4qxwU3vUhJk0sToon1kPNMomYhcukoVyVpUrO82Jx 77M1BAJU9RNaXEUZ3Sskn0sYuD5ZJt1gZ/0hcDDC2MwxV4hysg047c4nJ6jWujOoKdEe M1BX+U8xUTOHCGrDTR0eBohfAgGCwbVszLJestjd4E7Lzdq/0EtuYpMm35hmRuQb5RQn Tg1Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=XpSNJvA3; 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 l61si13948392plb.6.2019.01.21.07.39.01; Mon, 21 Jan 2019 07:39:17 -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=@linaro.org header.s=google header.b=XpSNJvA3; 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 S1730698AbfAUPf7 (ORCPT + 99 others); Mon, 21 Jan 2019 10:35:59 -0500 Received: from mail-vs1-f65.google.com ([209.85.217.65]:44397 "EHLO mail-vs1-f65.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1730135AbfAUPf5 (ORCPT ); Mon, 21 Jan 2019 10:35:57 -0500 Received: by mail-vs1-f65.google.com with SMTP id u11so12813561vsp.11 for ; Mon, 21 Jan 2019 07:35:57 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=P+QB4YZGEJLcPSkGnAhuoFe4nirgoy69vDlYb4K4aCQ=; b=XpSNJvA31VORta233d9tgGET0O1mugOj/Wqy1IfVVwWc2D0CztIYeLjsxSlvWfANSy UBLpu5A23chNkqlRpdscDVrMU6W2k6GiFcgKfhxsk6ayX4o7ndog6bD9iaGRkKedvSvD rlkuBgbbXwPonhrkP/genyI4TflOVx55lhsY0= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=P+QB4YZGEJLcPSkGnAhuoFe4nirgoy69vDlYb4K4aCQ=; b=TEuj0a84srloORY6spqy+e1N2C4DB/qra5Q8kPqcaNIo9NEwuSB8kV15ziYk4pcfFn wQxHV7/OfL6F14amRHtCeivOU4GUj0JnBBl55Rj4PC+qSNgdjh+a1ILu6dH7K+C02sXW SAiy7nrlKGqzAzM5e68FMTsfWUmSSSA/gJgyJG4SCBNXfd3BOLIWgeYLL1aIrSU0+kCX 7AWS6RGtEw3f/8v/NEa8YFlUzyVmtYsCc1w2lh6t7LBx83uQ4DXDElGdDCm7e9d4F3mu ZScbK+3+JQYHbvFIKXMZaxb6d8OsjZD8LWWEPvj/YpuMqLA5NLgh+HSHb76NyHsKmlid iVfg== X-Gm-Message-State: AJcUukdpdwgepI2kaNDrHKKzPQ2ttCe+9RGUupmQAMxQu0KqchxYe9Ml fbgKeAUGX2Lt6zdBkiq7AsvK2nci9550u6ZLApCKfw== X-Received: by 2002:a67:e0d4:: with SMTP id m20mr12739834vsl.182.1548084956390; Mon, 21 Jan 2019 07:35:56 -0800 (PST) MIME-Version: 1.0 References: <168294311714f269b1050bcbf5d3324eae0808f2.1547481320.git.amit.kucheria@linaro.org> <1718046.8NPD0iV1Wv@aspire.rjw.lan> In-Reply-To: <1718046.8NPD0iV1Wv@aspire.rjw.lan> From: Amit Kucheria Date: Mon, 21 Jan 2019 21:05:45 +0530 Message-ID: Subject: Re: [PATCH v1 01/10] cpufreq: Add thermal_cooling_device pointer to struct cpufreq_policy To: "Rafael J. Wysocki" Cc: LKML , linux-arm-msm , Viresh Kumar , Eduardo Valentin , Stephen Boyd , Douglas Anderson , Matthias Kaehlcke , Linux PM list Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, Jan 17, 2019 at 4:27 AM Rafael J. Wysocki wrote: > > 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? Fixed > > struct list_head policy_list; > > struct kobject kobj; > > struct completion kobj_unregister; > > > > Also, I would suggest combining this one with patch [02/10]. Will do. Thanks for the review.