* Re: [PATCH 5/6] PM / devfreq: Modify the indentation of trans_stat sysfs for readability
@ 2015-11-23 6:51 MyungJoo Ham
0 siblings, 0 replies; 2+ messages in thread
From: MyungJoo Ham @ 2015-11-23 6:51 UTC (permalink / raw)
To: 최찬우, 박경민
Cc: linux-kernel@vger.kernel.org, linux-pm@vger.kernel.org
>
> This patch modifies the indentation of 'trans_stat' sysfs to improve readability.
> The 1GHz is 1000,000,000. So it needs the least 10 position to show the GHz unit.
Applied with resolution of merge conflict described at:
https://git.kernel.org/cgit/linux/kernel/git/mzx/devfreq.git/commit/?h=for-rafael&id=91808a77fa01efcf5116ffd2f0f15bbd031be78b
Cheers,
MyungJoo
^ permalink raw reply [flat|nested] 2+ messages in thread* [PATCH 0/6] PM / devfreq: Clean code and add set the freq_table array @ 2015-11-19 8:17 Chanwoo Choi 2015-11-19 8:17 ` [PATCH 5/6] PM / devfreq: Modify the indentation of trans_stat sysfs for readability Chanwoo Choi 0 siblings, 1 reply; 2+ messages in thread From: Chanwoo Choi @ 2015-11-19 8:17 UTC (permalink / raw) To: myungjoo.ham, kyungmin.park; +Cc: linux-kernel, linux-pm, Chanwoo Choi This patch-set clean the code for both devfreq and devfreq-event framework and add the 'freq_table' for devfreq device. After initializing the 'freq_table', the 'trans_stat' sysfs provide the appropriate information. Chanwoo Choi (6): PM / devfreq: event: Remove the error log of devfreq_event_get_edev_by_phandle() PM / devfreq: event: Fix the error and warning from script/checkpatch.pl PM / devfreq: Add show_one macro to delete the duplicate code PM / devfreq: Set the freq_table of devfreq device PM / devfreq: Modify the indentation of trans_stat sysfs for readability PM / devfreq: Set the min_freq and max_freq of devfreq device drivers/devfreq/devfreq-event.c | 16 +++----- drivers/devfreq/devfreq.c | 81 ++++++++++++++++++++++++++++++++--------- include/linux/devfreq.h | 4 +- 3 files changed, 71 insertions(+), 30 deletions(-) -- 1.9.1 ^ permalink raw reply [flat|nested] 2+ messages in thread
* [PATCH 5/6] PM / devfreq: Modify the indentation of trans_stat sysfs for readability 2015-11-19 8:17 [PATCH 0/6] PM / devfreq: Clean code and add set the freq_table array Chanwoo Choi @ 2015-11-19 8:17 ` Chanwoo Choi 0 siblings, 0 replies; 2+ messages in thread From: Chanwoo Choi @ 2015-11-19 8:17 UTC (permalink / raw) To: myungjoo.ham, kyungmin.park; +Cc: linux-kernel, linux-pm, Chanwoo Choi This patch modifies the indentation of 'trans_stat' sysfs to improve readability. The 1GHz is 1000,000,000. So it needs the least 10 position to show the GHz unit. - Before apply this patch, -sh-3.2# cat trans_stat From : To :50000000100000000133000000200000000400000000 time(ms) *50000000: 0 0 0 0 7 1817635 100000000: 4 0 0 0 4 1590 133000000: 1 4 0 0 7 975 200000000: 2 2 7 0 1 2655 400000000: 0 2 5 12 0 1860 Total transition : 58 - After apply this patch, -sh-3.2# cat trans_stat From : To : 50000000 100000000 133000000 200000000 400000000 time(ms) * 50000000: 0 0 0 0 7 14405 100000000: 4 0 0 0 3 2015 133000000: 2 3 0 0 7 1020 200000000: 1 2 7 0 0 2970 400000000: 0 2 5 10 0 1575 Total transition : 53 Signed-off-by: Chanwoo Choi <cw00.choi@samsung.com> --- drivers/devfreq/devfreq.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/drivers/devfreq/devfreq.c b/drivers/devfreq/devfreq.c index 761e46a95c4b..c292ceb7ff19 100644 --- a/drivers/devfreq/devfreq.c +++ b/drivers/devfreq/devfreq.c @@ -1048,10 +1048,10 @@ static ssize_t trans_stat_show(struct device *dev, devfreq_update_status(devfreq, devfreq->previous_freq)) return 0; - len = sprintf(buf, " From : To\n"); - len += sprintf(buf + len, " :"); + len = sprintf(buf, " From : To\n"); + len += sprintf(buf + len, " :"); for (i = 0; i < max_state; i++) - len += sprintf(buf + len, "%8ld", + len += sprintf(buf + len, "%10ld", devfreq->profile->freq_table[i]); len += sprintf(buf + len, " time(ms)\n"); @@ -1063,10 +1063,10 @@ static ssize_t trans_stat_show(struct device *dev, } else { len += sprintf(buf + len, " "); } - len += sprintf(buf + len, "%8ld:", + len += sprintf(buf + len, "%10ld:", devfreq->profile->freq_table[i]); for (j = 0; j < max_state; j++) - len += sprintf(buf + len, "%8u", + len += sprintf(buf + len, "%10u", devfreq->trans_table[(i * max_state) + j]); len += sprintf(buf + len, "%10u\n", jiffies_to_msecs(devfreq->time_in_state[i])); -- 1.9.1 ^ permalink raw reply related [flat|nested] 2+ messages in thread
end of thread, other threads:[~2015-11-23 6:51 UTC | newest] Thread overview: 2+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2015-11-23 6:51 [PATCH 5/6] PM / devfreq: Modify the indentation of trans_stat sysfs for readability MyungJoo Ham -- strict thread matches above, loose matches on Subject: below -- 2015-11-19 8:17 [PATCH 0/6] PM / devfreq: Clean code and add set the freq_table array Chanwoo Choi 2015-11-19 8:17 ` [PATCH 5/6] PM / devfreq: Modify the indentation of trans_stat sysfs for readability Chanwoo Choi
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox