From: Daniel Lezcano <daniel.lezcano@linaro.org>
To: viresh.kumar@linaro.org, edubezval@gmail.com
Cc: kevin.wangtao@linaro.org, leo.yan@linaro.org,
vincent.guittot@linaro.org, linux-kernel@vger.kernel.org,
javi.merino@kernel.org, rui.zhang@intel.com,
daniel.thompson@linaro.org, linux-pm@vger.kernel.org,
Amit Daniel Kachhap <amit.kachhap@gmail.com>
Subject: [PATCH v3 3/7] thermal/drivers/cpu_cooling: Remove pointless field
Date: Thu, 5 Apr 2018 18:16:40 +0200 [thread overview]
Message-ID: <1522945005-7165-4-git-send-email-daniel.lezcano@linaro.org> (raw)
In-Reply-To: <1522945005-7165-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.
Acked-by: Viresh Kumar <viresh.kumar@linaro.org>
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 d7528bc..7bdc19f 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-04-05 16:16 UTC|newest]
Thread overview: 46+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-04-05 16:16 [PATCH v3 0/7] CPU cooling device new strategies Daniel Lezcano
2018-04-05 16:16 ` [PATCH v3 1/7] thermal/drivers/cpu_cooling: Fixup the header and copyright Daniel Lezcano
[not found] ` <20180411061514.GL7671@vireshk-i7>
2018-04-11 8:56 ` Daniel Lezcano
2018-04-05 16:16 ` [PATCH v3 2/7] thermal/drivers/cpu_cooling: Add Software Package Data Exchange (SPDX) Daniel Lezcano
2018-04-05 16:16 ` Daniel Lezcano [this message]
2018-04-05 16:16 ` [PATCH v3 4/7] thermal/drivers/Kconfig: Convert the CPU cooling device to a choice Daniel Lezcano
[not found] ` <20180411061851.GM7671@vireshk-i7>
2018-04-11 8:58 ` Daniel Lezcano
2018-04-05 16:16 ` [PATCH v3 5/7] thermal/drivers/cpu_cooling: Add idle cooling device documentation Daniel Lezcano
2018-04-05 16:16 ` [PATCH v3 6/7] thermal/drivers/cpu_cooling: Introduce the cpu idle cooling driver Daniel Lezcano
2018-04-11 8:51 ` Viresh Kumar
2018-04-11 9:29 ` Daniel Lezcano
2018-04-13 11:23 ` Sudeep Holla
2018-04-13 11:47 ` Daniel Lezcano
2018-04-16 7:37 ` Viresh Kumar
2018-04-16 7:44 ` Daniel Lezcano
2018-04-16 9:34 ` Sudeep Holla
2018-04-16 9:37 ` Viresh Kumar
2018-04-16 9:45 ` Daniel Lezcano
2018-04-16 9:50 ` Viresh Kumar
2018-04-16 10:03 ` Daniel Lezcano
2018-04-16 10:10 ` Viresh Kumar
2018-04-16 12:10 ` Daniel Lezcano
2018-04-16 12:30 ` Lorenzo Pieralisi
2018-04-16 13:57 ` Daniel Lezcano
2018-04-16 14:22 ` Lorenzo Pieralisi
2018-04-17 7:17 ` Daniel Lezcano
2018-04-17 10:24 ` Lorenzo Pieralisi
2018-04-16 12:31 ` Sudeep Holla
2018-04-16 12:49 ` Daniel Lezcano
2018-04-16 13:03 ` Sudeep Holla
2018-04-16 12:29 ` Sudeep Holla
2018-04-13 11:38 ` Daniel Thompson
2018-04-13 11:46 ` Daniel Lezcano
2019-08-05 5:11 ` Martin Kepplinger
2019-08-05 6:53 ` Martin Kepplinger
2019-08-05 7:39 ` Daniel Lezcano
2019-08-05 7:42 ` Martin Kepplinger
2019-08-05 7:58 ` Daniel Lezcano
2019-10-25 11:22 ` Martin Kepplinger
2019-10-25 14:45 ` Daniel Lezcano
2019-10-26 18:23 ` Martin Kepplinger
2019-10-28 15:16 ` Daniel Lezcano
2019-08-05 7:37 ` Daniel Lezcano
2019-08-05 7:40 ` Martin Kepplinger
2018-04-05 16:16 ` [PATCH v3 7/7] cpuidle/drivers/cpuidle-arm: Register the cooling device Daniel Lezcano
2018-04-11 8:51 ` Viresh Kumar
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=1522945005-7165-4-git-send-email-daniel.lezcano@linaro.org \
--to=daniel.lezcano@linaro.org \
--cc=amit.kachhap@gmail.com \
--cc=daniel.thompson@linaro.org \
--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).