From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752283AbcBEHN2 (ORCPT ); Fri, 5 Feb 2016 02:13:28 -0500 Received: from mail-pf0-f178.google.com ([209.85.192.178]:34145 "EHLO mail-pf0-f178.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751788AbcBEHN1 (ORCPT ); Fri, 5 Feb 2016 02:13:27 -0500 Date: Fri, 5 Feb 2016 12:43:24 +0530 From: Viresh Kumar To: "Rafael J. Wysocki" Cc: Linux PM list , Linux Kernel Mailing List , Srinivas Pandruvada , Juri Lelli , Steve Muckle , Saravana Kannan Subject: Re: [PATCH v2 4/10] cpufreq: governor: Put governor structure into common_dbs_data Message-ID: <20160205071324.GG21792@vireshk> References: <3705929.bslqXH980s@vostro.rjw.lan> <9008098.QDD8C89zDx@vostro.rjw.lan> <6890353.1AtO67aiJ6@vostro.rjw.lan> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <6890353.1AtO67aiJ6@vostro.rjw.lan> User-Agent: Mutt/1.5.23 (2014-03-12) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 05-02-16, 03:16, Rafael J. Wysocki wrote: > From: Rafael J. Wysocki > > For the ondemand and conservative governors (generally, governors > that use the common code in cpufreq_governor.c), there are two static > data structures representing the governor, the struct governor > structure (the interface to the cpufreq core) and the struct > common_dbs_data one (the interface to the cpufreq_governor.c code). > > There's no fundamental reason why those two structures have to be > separate. Moreover, if the struct governor one is included into > struct common_dbs_data, it will be possible to reach the latter from > the policy via its policy->governor pointer, so it won't be necessary > to pass a separate pointer to it around. For this reason, embed > struct governor in struct common_dbs_data. > > Signed-off-by: Rafael J. Wysocki > Acked-by: Saravana Kannan Acked-by: Viresh Kumar -- viresh