Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit d7df1e46 authored by Chanwoo Choi's avatar Chanwoo Choi Committed by MyungJoo Ham
Browse files

PM / devfreq: Modify the indentation of trans_stat sysfs for readability



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: default avatarChanwoo Choi <cw00.choi@samsung.com>
Signed-off-by: default avatarMyungJoo Ham <myungjoo.ham@samsung.com>
parent 0ec09ac2
Loading
Loading
Loading
Loading
+5 −5
Original line number Diff line number Diff line
@@ -1053,7 +1053,7 @@ static ssize_t trans_stat_show(struct device *dev,
	len = sprintf(buf, "     From  :   To\n");
	len += sprintf(buf + len, "           :");
	for (i = 0; i < max_state; i++)
		len += sprintf(buf + len, "%8lu",
		len += sprintf(buf + len, "%10lu",
				devfreq->profile->freq_table[i]);

	len += sprintf(buf + len, "   time(ms)\n");
@@ -1065,10 +1065,10 @@ static ssize_t trans_stat_show(struct device *dev,
		} else {
			len += sprintf(buf + len, " ");
		}
		len += sprintf(buf + len, "%8lu:",
		len += sprintf(buf + len, "%10lu:",
				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]));