diff mbox

[7/7] cpufreq: intel_pstate: Make intel_pstate_kobject local

Message ID 53962096.1060202@semaphore.gr (mailing list archive)
State Not Applicable, archived
Headers show

Commit Message

Stratos Karafotis June 9, 2014, 9:01 p.m. UTC
Since we never remove sysfs entry, we can make the intel_pstate_kobject
local.

Signed-off-by: Stratos Karafotis <stratosk@semaphore.gr>
---
 drivers/cpufreq/intel_pstate.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

David Rientjes June 9, 2014, 9:07 p.m. UTC | #1
On Tue, 10 Jun 2014, Stratos Karafotis wrote:

> Since we never remove sysfs entry, we can make the intel_pstate_kobject
> local.
> 

For even more savings, this function and 
intel_pstate_debug_expose_params() can be annotated with __init and freed 
after bootstrap.

> Signed-off-by: Stratos Karafotis <stratosk@semaphore.gr>
> ---
>  drivers/cpufreq/intel_pstate.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/cpufreq/intel_pstate.c b/drivers/cpufreq/intel_pstate.c
> index fa44f0f..9533fff 100644
> --- a/drivers/cpufreq/intel_pstate.c
> +++ b/drivers/cpufreq/intel_pstate.c
> @@ -387,10 +387,10 @@ static struct attribute *intel_pstate_attributes[] = {
>  static struct attribute_group intel_pstate_attr_group = {
>  	.attrs = intel_pstate_attributes,
>  };
> -static struct kobject *intel_pstate_kobject;
>  
>  static void intel_pstate_sysfs_expose_params(void)
>  {
> +	struct kobject *intel_pstate_kobject;
>  	int rc;
>  
>  	intel_pstate_kobject = kobject_create_and_add("intel_pstate",
--
To unsubscribe from this list: send the line "unsubscribe linux-pm" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Stratos Karafotis June 9, 2014, 9:24 p.m. UTC | #2
On 10/06/2014 12:07 ??, David Rientjes wrote:
> On Tue, 10 Jun 2014, Stratos Karafotis wrote:
> 
>> Since we never remove sysfs entry, we can make the intel_pstate_kobject
>> local.
>>
> 
> For even more savings, this function and 
> intel_pstate_debug_expose_params() can be annotated with __init and freed 
> after bootstrap.

Thanks for your comment, David!
I will do this in v2.


Stratos

--
To unsubscribe from this list: send the line "unsubscribe linux-pm" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
dirk.brandewie@gmail.com June 10, 2014, 5:19 p.m. UTC | #3
On 06/09/2014 02:01 PM, Stratos Karafotis wrote:
> Since we never remove sysfs entry, we can make the intel_pstate_kobject
> local.
>
> Signed-off-by: Stratos Karafotis <stratosk@semaphore.gr>
Acked-by: Dirk Brandewie <dirk.j.brandewie@intel.com>

>   drivers/cpufreq/intel_pstate.c | 2 +-
>   1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/cpufreq/intel_pstate.c b/drivers/cpufreq/intel_pstate.c
> index fa44f0f..9533fff 100644
> --- a/drivers/cpufreq/intel_pstate.c
> +++ b/drivers/cpufreq/intel_pstate.c
> @@ -387,10 +387,10 @@ static struct attribute *intel_pstate_attributes[] = {
>   static struct attribute_group intel_pstate_attr_group = {
>   	.attrs = intel_pstate_attributes,
>   };
> -static struct kobject *intel_pstate_kobject;
>
>   static void intel_pstate_sysfs_expose_params(void)
>   {
> +	struct kobject *intel_pstate_kobject;
>   	int rc;
>
>   	intel_pstate_kobject = kobject_create_and_add("intel_pstate",
>

--
To unsubscribe from this list: send the line "unsubscribe linux-pm" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
diff mbox

Patch

diff --git a/drivers/cpufreq/intel_pstate.c b/drivers/cpufreq/intel_pstate.c
index fa44f0f..9533fff 100644
--- a/drivers/cpufreq/intel_pstate.c
+++ b/drivers/cpufreq/intel_pstate.c
@@ -387,10 +387,10 @@  static struct attribute *intel_pstate_attributes[] = {
 static struct attribute_group intel_pstate_attr_group = {
 	.attrs = intel_pstate_attributes,
 };
-static struct kobject *intel_pstate_kobject;
 
 static void intel_pstate_sysfs_expose_params(void)
 {
+	struct kobject *intel_pstate_kobject;
 	int rc;
 
 	intel_pstate_kobject = kobject_create_and_add("intel_pstate",