From: Daniel Lezcano <daniel.lezcano@linaro.org>
To: edubezval@gmail.com
Cc: kevin.wangtao@linaro.org, leo.yan@linaro.org,
vincent.guittot@linaro.org, amit.kachhap@gmail.com,
viresh.kumar@linaro.org, linux-kernel@vger.kernel.org,
Javi Merino <javi.merino@kernel.org>,
Zhang Rui <rui.zhang@intel.com>,
"open list:THERMAL/CPU_COOLING" <linux-pm@vger.kernel.org>
Subject: [PATCH 3/8] thermal/drivers/cpu_cooling: Remove pointless field
Date: Tue, 23 Jan 2018 16:34:26 +0100 [thread overview]
Message-ID: <1516721671-16360-4-git-send-email-daniel.lezcano@linaro.org> (raw)
In-Reply-To: <1516721671-16360-1-git-send-email-daniel.lezcano@linaro.org>
The structure cpufreq_cooling_device provides a backpointer to the thermal
device but this one is used for a trace and to unregister. For the trace,
we don't really need this field and the unregister function as the same
pointer passed as parameter. Remove it.
Signed-off-by: Daniel Lezcano <daniel.lezcano@linaro.org>
---
drivers/thermal/cpu_cooling.c | 7 ++-----
1 file changed, 2 insertions(+), 5 deletions(-)
diff --git a/drivers/thermal/cpu_cooling.c b/drivers/thermal/cpu_cooling.c
index e62be75..d05bb73 100644
--- a/drivers/thermal/cpu_cooling.c
+++ b/drivers/thermal/cpu_cooling.c
@@ -88,7 +88,6 @@ struct cpufreq_cooling_device {
unsigned int clipped_freq;
unsigned int max_level;
struct freq_table *freq_table; /* In descending order */
- struct thermal_cooling_device *cdev;
struct cpufreq_policy *policy;
struct list_head node;
struct time_in_idle *idle_time;
@@ -197,8 +196,7 @@ static int update_freq_table(struct cpufreq_cooling_device *cpufreq_cdev,
dev = get_cpu_device(cpu);
if (unlikely(!dev)) {
- dev_warn(&cpufreq_cdev->cdev->device,
- "No cpu device for cpu %d\n", cpu);
+ pr_warn("No cpu device for cpu %d\n", cpu);
return -ENODEV;
}
@@ -762,7 +760,6 @@ __cpufreq_cooling_register(struct device_node *np,
goto remove_ida;
cpufreq_cdev->clipped_freq = cpufreq_cdev->freq_table[0].frequency;
- cpufreq_cdev->cdev = cdev;
mutex_lock(&cooling_list_lock);
/* Register the notifier for first cpufreq cooling device */
@@ -922,7 +919,7 @@ void cpufreq_cooling_unregister(struct thermal_cooling_device *cdev)
cpufreq_unregister_notifier(&thermal_cpufreq_notifier_block,
CPUFREQ_POLICY_NOTIFIER);
- thermal_cooling_device_unregister(cpufreq_cdev->cdev);
+ thermal_cooling_device_unregister(cdev);
ida_simple_remove(&cpufreq_ida, cpufreq_cdev->id);
kfree(cpufreq_cdev->idle_time);
kfree(cpufreq_cdev->freq_table);
--
2.7.4
next prev parent reply other threads:[~2018-01-23 15:35 UTC|newest]
Thread overview: 48+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <1516721671-16360-1-git-send-email-daniel.lezcano@linaro.org>
2018-01-23 15:34 ` [PATCH 1/8] thermal/drivers/cpu_cooling: Fixup the header and copyright Daniel Lezcano
2018-01-31 5:17 ` Viresh Kumar
2018-01-31 7:03 ` Daniel Lezcano
2018-01-23 15:34 ` [PATCH 2/8] thermal/drivers/cpu_cooling: Add Software Package Data Exchange (SPDX) Daniel Lezcano
2018-01-31 5:18 ` Viresh Kumar
2018-02-08 14:05 ` Philippe Ombredanne
2018-02-08 14:07 ` Daniel Lezcano
2018-01-23 15:34 ` Daniel Lezcano [this message]
2018-01-31 5:20 ` [PATCH 3/8] thermal/drivers/cpu_cooling: Remove pointless field Viresh Kumar
2018-01-23 15:34 ` [PATCH 4/8] thermal/drivers/Kconfig: Convert the CPU cooling device to a choice Daniel Lezcano
2018-01-24 16:34 ` Daniel Thompson
2018-01-24 16:59 ` Daniel Lezcano
2018-01-25 10:57 ` Daniel Thompson
2018-01-25 13:36 ` Daniel Lezcano
2018-01-26 12:16 ` Daniel Thompson
2018-01-26 13:25 ` Daniel Lezcano
2018-01-31 10:09 ` Daniel Thompson
2018-02-07 9:04 ` Viresh Kumar
2018-02-07 10:15 ` Daniel Lezcano
2018-02-07 10:20 ` Viresh Kumar
2018-01-23 15:34 ` [PATCH 5/8] thermal/drivers/cpu_cooling: Introduce the cpu idle cooling driver Daniel Lezcano
2018-01-31 9:01 ` Vincent Guittot
2018-01-31 9:33 ` Daniel Lezcano
2018-01-31 9:46 ` Vincent Guittot
2018-01-31 9:50 ` Daniel Lezcano
2018-01-31 9:56 ` Vincent Guittot
2018-01-31 15:27 ` Daniel Lezcano
2018-02-01 7:57 ` Vincent Guittot
2018-02-01 8:25 ` Daniel Lezcano
2018-02-05 13:54 ` Daniel Thompson
2018-02-06 11:34 ` Daniel Lezcano
2018-02-07 9:12 ` Viresh Kumar
2018-02-07 10:34 ` Daniel Lezcano
2018-02-07 10:41 ` Viresh Kumar
2018-02-09 9:41 ` Viresh Kumar
2018-02-16 17:39 ` Daniel Lezcano
2018-01-23 15:34 ` [PATCH 7/8] cpuidle/drivers/cpuidle-arm: Register the cooling device Daniel Lezcano
2018-01-23 15:34 ` [PATCH 8/8] thermal/drivers/cpu_cooling: Add the combo cpu " Daniel Lezcano
2018-02-02 10:42 ` Viresh Kumar
2018-02-02 14:30 ` Daniel Lezcano
2018-02-05 4:17 ` Viresh Kumar
2018-02-05 10:32 ` Daniel Lezcano
2018-02-06 4:28 ` Viresh Kumar
2018-02-06 10:48 ` Daniel Lezcano
2018-02-07 7:26 ` Viresh Kumar
2018-02-07 10:05 ` Daniel Lezcano
2018-02-09 9:44 ` Viresh Kumar
2018-02-16 9:11 ` Daniel Lezcano
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1516721671-16360-4-git-send-email-daniel.lezcano@linaro.org \
--to=daniel.lezcano@linaro.org \
--cc=amit.kachhap@gmail.com \
--cc=edubezval@gmail.com \
--cc=javi.merino@kernel.org \
--cc=kevin.wangtao@linaro.org \
--cc=leo.yan@linaro.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-pm@vger.kernel.org \
--cc=rui.zhang@intel.com \
--cc=vincent.guittot@linaro.org \
--cc=viresh.kumar@linaro.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).