cpufreq: CPPC: simply the code access 'highest_perf' value in cppc_perf_caps struct
PATCH v3 1/1 cpufreq: CPPC: simply the code access 'highest_perf' value in cppc_perf_caps struct
The 'caps' variable has been defined, so there is no need to get 'highest_perf' value through 'cpu->caps.highest_perf', you can use 'caps->highest_perf' instead.
--- drivers/cpufreq/cppc_cpufreq.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/cpufreq/cppc_cpufreq.c +2 -2
@@ -161,7 +161,7 @@ static unsigned int cppc_cpufreq_perf_to_khz(struct cppc_cpudata *cpu,if (!max_khz) max_khz =cppc_get_dmi_max_khz (); mul = max_khz; - div = cpu->perf_caps.highest_perf; + div = caps->highest_perf; }return (u64 )perf * mul / div; }
@@ -184,7 +184,7 @@ static unsigned int cppc_cpufreq_khz_to_perf(struct cppc_cpudata *cpu, }else {if (!max_khz) max_khz =cppc_get_dmi_max_khz (); - mul = cpu->perf_caps.highest_perf; + mul = caps->highest_perf; div = max_khz; }
Signature · 1 line
2.24.1
Quoted 23 lines · Xin Hao
The 'caps' variable has been defined, so there is no need to get '
highest_perf' value through 'cpu->caps.highest_perf', you can use 'caps->highest_perf' instead.Signed-off-by Xin Hao <[email protected]>--- drivers/cpufreq/cppc_cpufreq.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)drivers/cpufreq/cppc_cpufreq.c +1
-1@@ -161,7 +161,7 @@ static unsigned int cppc_cpufreq_perf_to_khz(struct cppc_cpudata *cpu,if (!max_khz) max_khz =cppc_get_dmi_max_khz (); mul = max_khz; - div = cpu->perf_caps.highest_perf; + div = caps->highest_perf; }return (u64 )perf * mul / div; }
drivers/cpufreq/cppc_cpufreq.c static unsigned int cppc_cpufreq_khz_to_perf(struct cppc_cpudata *cpu, · line 189
Quoted 7 lines
drivers/cpufreq/cppc_cpufreq.c +1
-1@@ -184,7 +184,7 @@ static unsigned int cppc_cpufreq_khz_to_perf(struct cppc_cpudata *cpu, }else {if (!max_khz) max_khz =cppc_get_dmi_max_khz (); - mul = cpu->perf_caps.highest_perf; + mul = caps->highest_perf; div = max_khz; }
Applied. Thanks.
Signature · 1 line
viresh
Rafael J. Wysocki
maintainerQuoted 26 lines · Viresh Kumar
Quoted 24 lines · Xin Hao
The 'caps' variable has been defined, so there is no need to get '
highest_perf' value through 'cpu->caps.highest_perf', you can use 'caps->highest_perf' instead.Signed-off-by Xin Hao <[email protected]>--- drivers/cpufreq/cppc_cpufreq.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)drivers/cpufreq/cppc_cpufreq.c +1
-1@@ -161,7 +161,7 @@ static unsigned int cppc_cpufreq_perf_to_khz(struct cppc_cpudata *cpu,if (!max_khz) max_khz =cppc_get_dmi_max_khz (); mul = max_khz; - div = cpu->perf_caps.highest_perf; + div = caps->highest_perf; }return (u64 )perf * mul / div; }@@ -184,7 +184,7 @@ static unsigned int cppc_cpufreq_khz_to_perf(struct cppc_cpudata *cpu, }else {
Quoted 8 lines
drivers/cpufreq/cppc_cpufreq.c static unsigned int cppc_cpufreq_khz_to_perf(struct cppc_cpudata *cpu, · line 189
Quoted 6 lines
drivers/cpufreq/cppc_cpufreq.c +1
-1if (!max_khz) max_khz =cppc_get_dmi_max_khz (); - mul = cpu->perf_caps.highest_perf; + mul = caps->highest_perf; div = max_khz; }Applied. Thanks.
I applied the previous cppc_cpufreq patch, hopefully it will not clash with this one.
Are you going to take care of this driver going forward?
Viresh Kumar
maintainerQuoted 36 lines · Rafael J. Wysocki
Quoted 26 lines · Viresh Kumar
Quoted 24 lines · Xin Hao
The 'caps' variable has been defined, so there is no need to get '
highest_perf' value through 'cpu->caps.highest_perf', you can use 'caps->highest_perf' instead.Signed-off-by Xin Hao <[email protected]>--- drivers/cpufreq/cppc_cpufreq.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)drivers/cpufreq/cppc_cpufreq.c +1
-1@@ -161,7 +161,7 @@ static unsigned int cppc_cpufreq_perf_to_khz(struct cppc_cpudata *cpu,if (!max_khz) max_khz =cppc_get_dmi_max_khz (); mul = max_khz; - div = cpu->perf_caps.highest_perf; + div = caps->highest_perf; }return (u64 )perf * mul / div; }@@ -184,7 +184,7 @@ static unsigned int cppc_cpufreq_khz_to_perf(struct cppc_cpudata *cpu, }else {Quoted 8 lines
drivers/cpufreq/cppc_cpufreq.c static unsigned int cppc_cpufreq_khz_to_perf(struct cppc_cpudata *cpu, · line 189
Quoted 6 lines
drivers/cpufreq/cppc_cpufreq.c +1
-1if (!max_khz) max_khz =cppc_get_dmi_max_khz (); - mul = cpu->perf_caps.highest_perf; + mul = caps->highest_perf; div = max_khz; }Applied. Thanks.
Quoted 4 lines
I applied the previous
cppc_cpufreqpatch, hopefully it will not clash with this one.Are you going to take care of this driver going forward?
I started picking up the patches for this driver as it was mostly ARM stuff and FWIW, I picked the previous one as well and because it was sent by me, I never replied with the "Applied" message :)
Will it be possible for you to drop that one? Or should I drop that now ? There shouldn't be any conflicts for now though.
Signature · 1 line
viresh
Rafael J. Wysocki
maintainerQuoted 38 lines · Viresh Kumar
Quoted 36 lines · Rafael J. Wysocki
Quoted 34 lines · Viresh Kumar
Quoted 23 lines · Xin Hao
The 'caps' variable has been defined, so there is no need to get '
highest_perf' value through 'cpu->caps.highest_perf', you can use 'caps->highest_perf' instead.Signed-off-by Xin Hao <[email protected]>--- drivers/cpufreq/cppc_cpufreq.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)drivers/cpufreq/cppc_cpufreq.c +1
-1@@ -161,7 +161,7 @@ static unsigned int cppc_cpufreq_perf_to_khz(struct cppc_cpudata *cpu,if (!max_khz) max_khz =cppc_get_dmi_max_khz (); mul = max_khz; - div = cpu->perf_caps.highest_perf; + div = caps->highest_perf; }return (u64 )perf * mul / div; }drivers/cpufreq/cppc_cpufreq.c static unsigned int cppc_cpufreq_khz_to_perf(struct cppc_cpudata *cpu, · line 189
Quoted 7 lines
drivers/cpufreq/cppc_cpufreq.c +1
-1@@ -184,7 +184,7 @@ static unsigned int cppc_cpufreq_khz_to_perf(struct cppc_cpudata *cpu, }else {if (!max_khz) max_khz =cppc_get_dmi_max_khz (); - mul = cpu->perf_caps.highest_perf; + mul = caps->highest_perf; div = max_khz; }Applied. Thanks.
Quoted 8 lines
Quoted 4 lines
I applied the previous
cppc_cpufreqpatch, hopefully it will not clash with this one.Are you going to take care of this driver going forward?
I started picking up the patches for this driver as it was mostly ARM stuff and FWIW, I picked the previous one as well and because it was sent by me, I never replied with the "Applied" message :)
But you could respond to the "applied" message from me. :-)
Quoted 1 line
Will it be possible for you to drop that one?
Dropped now and I will be assuming that you will pick up cppc_cpufreq patches from now on.
Thanks!
Viresh Kumar
maintainerQuoted 1 line · Rafael J. Wysocki
But you could respond to the "applied" message from me. :-)
Haha. I was expecting you to pick the other patches (around governor cleanup) from me and I completely missed that you picked cppc one as well. In fact, I had to go to the thread again now to check if you replied at all :)
Sorry about that. My fault.
Signature · 1 line
viresh
Hi everyone:
I want to know why my patch didn't merge into upstream ?
Thanks
Quoted 31 lines · Xin Hao
The 'caps' variable has been defined, so there is no need to get '
highest_perf' value through 'cpu->caps.highest_perf', you can use 'caps->highest_perf' instead.Signed-off-by Xin Hao <[email protected]>--- drivers/cpufreq/cppc_cpufreq.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)drivers/cpufreq/cppc_cpufreq.c +2
-2@@ -161,7 +161,7 @@ static unsigned int cppc_cpufreq_perf_to_khz(struct cppc_cpudata *cpu,if (!max_khz) max_khz =cppc_get_dmi_max_khz (); mul = max_khz; - div = cpu->perf_caps.highest_perf; + div = caps->highest_perf; }return (u64 )perf * mul / div; }@@ -184,7 +184,7 @@ static unsigned int cppc_cpufreq_khz_to_perf(struct cppc_cpudata *cpu, }else {if (!max_khz) max_khz =cppc_get_dmi_max_khz (); - mul = cpu->perf_caps.highest_perf; + mul = caps->highest_perf; div = max_khz; }
Viresh Kumar
maintainerQuoted 3 lines · Xin Hao
Hi everyone:
I want to know why my patch didn't merge into upstream ?
I have sent a pull request earlier today to Rafael and this will get merged in the next pull request Rafael will send to Linus.
Signature · 1 line
viresh
Thanks
Quoted 7 lines · Viresh Kumar
Quoted 3 lines · Xin Hao
Hi everyone:
I want to know why my patch didn't merge into upstream ?
I have sent a pull request earlier today to Rafael and this will get merged in the next pull request Rafael will send to Linus.