Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1736297
| From | Chanwoo Choi <cw00.choi@samsung.com> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | [PATCH v2 6/8] PM / devfreq: Remove unneeded conditional statement |
| Date | 2017-09-21 02:40 +0200 |
| Message-ID | <urXH5-1Ui-55@gated-at.bofh.it> (permalink) |
| References | <urXH3-1Ui-3@gated-at.bofh.it> <urXH5-1Ui-57@gated-at.bofh.it> <urXH3-1Ui-3@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
The commit 0ec09ac2cebe9 ("PM / devfreq: Set the freq_table of devfreq
device") initializes the freq_table array of each devfreq device always.
In result, it is unneeded to check whether profile->freq_table is NULL
or not.
Signed-off-by: Chanwoo Choi <cw00.choi@samsung.com>
---
drivers/devfreq/devfreq.c | 7 +++----
1 file changed, 3 insertions(+), 4 deletions(-)
diff --git a/drivers/devfreq/devfreq.c b/drivers/devfreq/devfreq.c
index 3b9662ffe603..b28810cae7ee 100644
--- a/drivers/devfreq/devfreq.c
+++ b/drivers/devfreq/devfreq.c
@@ -315,10 +315,9 @@ int update_devfreq(struct devfreq *devfreq)
freqs.new = freq;
devfreq_notify_transition(devfreq, &freqs, DEVFREQ_POSTCHANGE);
- if (devfreq->profile->freq_table)
- if (devfreq_update_status(devfreq, freq))
- dev_err(&devfreq->dev,
- "Couldn't update frequency transition information.\n");
+ if (devfreq_update_status(devfreq, freq))
+ dev_err(&devfreq->dev,
+ "Couldn't update frequency transition information.\n");
devfreq->previous_freq = freq;
return err;
--
1.9.1
Back to linux.kernel | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
[PATCH v2 0/8] PM / devfreq: Use OPP interface to handle the frequency Chanwoo Choi <cw00.choi@samsung.com> - 2017-09-21 02:40 +0200
[PATCH v2 1/8] PM / devfreq: Set min/max_freq when adding the devfreq device Chanwoo Choi <cw00.choi@samsung.com> - 2017-09-21 02:40 +0200
[PATCH v2 3/8] PM / devfreq: Show the available min/max frequency through sysfs node Chanwoo Choi <cw00.choi@samsung.com> - 2017-09-21 02:40 +0200
[PATCH v2 8/8] PM / devfreq: exynos-bus: Register cooling device Chanwoo Choi <cw00.choi@samsung.com> - 2017-09-21 02:40 +0200
Re: [PATCH v2 8/8] PM / devfreq: exynos-bus: Register cooling device Chanwoo Choi <cw00.choi@samsung.com> - 2017-09-21 07:00 +0200
[PATCH v2 6/8] PM / devfreq: Remove unneeded conditional statement Chanwoo Choi <cw00.choi@samsung.com> - 2017-09-21 02:40 +0200
[PATCH v2.1] PM / devfreq: exynos-bus: Register cooling device Chanwoo Choi <cw00.choi@samsung.com> - 2017-09-26 04:40 +0200
csiph-web