From patchwork Thu Nov 19 08:17:49 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Chanwoo Choi X-Patchwork-Id: 7655721 Return-Path: X-Original-To: patchwork-linux-pm@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork2.web.kernel.org (Postfix) with ESMTP id 2A5EABF90C for ; Thu, 19 Nov 2015 08:18:31 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 56C01205FF for ; Thu, 19 Nov 2015 08:18:30 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 68C0C2052A for ; Thu, 19 Nov 2015 08:18:29 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1757474AbbKSISJ (ORCPT ); Thu, 19 Nov 2015 03:18:09 -0500 Received: from mailout4.samsung.com ([203.254.224.34]:38282 "EHLO mailout4.samsung.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751895AbbKSISG (ORCPT ); Thu, 19 Nov 2015 03:18:06 -0500 Received: from epcpsbgr2.samsung.com (u142.gpu120.samsung.co.kr [203.254.230.142]) by mailout4.samsung.com (Oracle Communications Messaging Server 7.0.5.31.0 64bit (built May 5 2014)) with ESMTP id <0NY102KHSZ1VO540@mailout4.samsung.com>; Thu, 19 Nov 2015 17:17:55 +0900 (KST) Received: from epcpsbgm1new.samsung.com ( [172.20.52.113]) by epcpsbgr2.samsung.com (EPCPMTA) with SMTP id C3.8A.17463.3B58D465; Thu, 19 Nov 2015 17:17:55 +0900 (KST) X-AuditID: cbfee68e-f79f56d000004437-f7-564d85b3fabf Received: from epmmp1.local.host ( [203.254.227.16]) by epcpsbgm1new.samsung.com (EPCPMTA) with SMTP id DA.0E.24993.3B58D465; Thu, 19 Nov 2015 17:17:55 +0900 (KST) Received: from chan.10.32.193.11 ([10.252.81.195]) by mmp1.samsung.com (Oracle Communications Messaging Server 7.0.5.31.0 64bit (built May 5 2014)) with ESMTPA id <0NY1003GGZ1VYC80@mmp1.samsung.com>; Thu, 19 Nov 2015 17:17:55 +0900 (KST) From: Chanwoo Choi To: myungjoo.ham@samsung.com, kyungmin.park@samsung.com Cc: linux-kernel@vger.kernel.org, linux-pm@vger.kernel.org, Chanwoo Choi Subject: [PATCH 5/6] PM / devfreq: Modify the indentation of trans_stat sysfs for readability Date: Thu, 19 Nov 2015 17:17:49 +0900 Message-id: <1447921070-6045-6-git-send-email-cw00.choi@samsung.com> X-Mailer: git-send-email 1.8.0 In-reply-to: <1447921070-6045-1-git-send-email-cw00.choi@samsung.com> References: <1447921070-6045-1-git-send-email-cw00.choi@samsung.com> X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFjrILMWRmVeSWpSXmKPExsWyRsSkUHdzq2+YwbeXlhbXvzxntTjb9Ibd 4vKuOWwWn3uPMFrcblzB5sDq0bdlFaPH501yAUxRXDYpqTmZZalF+nYJXBmrnixhKugUqZja YNXA+Imni5GTQ0LARKL7bTMbhC0mceHeeiCbi0NIYAWjRNeEFewwRRMu7WOGSCxllLh55BYT hPOFUeLwqWusIFVsAloS+1/cABslImAusWvpTzCbWSBJ4vzaJqAaDg5hgXiJpgWhIGEWAVWJ mYcOgJXwCrhIzO3dwQSxTE7iw55HYIs5BVwljq8/xQhiCwHV3Op+wg6yV0LgN5vEvDs32SEG CUh8m3yIBWS+hICsxKYDzBBzJCUOrrjBMoFReAEjwypG0dSC5ILipPQiI73ixNzi0rx0veT8 3E2MwJA9/e9Z3w7GmwesDzEKcDAq8fBuOOUTJsSaWFZcmXuI0RRow0RmKdHkfGBk5JXEGxqb GVmYmpgaG5lbmimJ8yZI/QwWEkhPLEnNTk0tSC2KLyrNSS0+xMjEwSnVwKhbtEuLyfNed8u3 gMaXtWmyj+a5yU+bt4DzY/OZ4zPiRW+snPZxjUzZuWa2VMHjzw1Wps+4NTf71OPpUfM2PnWY dodv5yoO4TlHlhrpvn+UoZ+/tVfwg4XEj5VsHwT3NPSVBU63OfYhffLb/zn9DyYeSD7+b8O0 +DW72lXaXM/+Oqk75cOr4B4VJZbijERDLeai4kQAdXWrm1QCAAA= X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFupjkeLIzCtJLcpLzFFi42I5/e+xgO7mVt8wgwNXTC2uf3nOanG26Q27 xeVdc9gsPvceYbS43biCzYHVo2/LKkaPz5vkApiiGhhtMlITU1KLFFLzkvNTMvPSbZW8g+Od 403NDAx1DS0tzJUU8hJzU22VXHwCdN0yc4DWKSmUJeaUAoUCEouLlfTtME0IDXHTtYBpjND1 DQmC6zEyQAMJaxgzVj1ZwlTQKVIxtcGqgfETTxcjJ4eEgInEhEv7mCFsMYkL99azdTFycQgJ LGWUuHnkFhOE84VR4vCpa6wgVWwCWhL7X9xgA7FFBMwldi39CWYzCyRJnF/bBFTDwSEsEC/R tCAUJMwioCox89ABsBJeAReJub07mCCWyUl82POIHcTmFHCVOL7+FCOILQRUc6v7CfsERt4F jAyrGCVSC5ILipPScw3zUsv1ihNzi0vz0vWS83M3MYLj4pnUDsaDu9wPMQpwMCrx8G445RMm xJpYVlyZe4hRgoNZSYT3QZlvmBBvSmJlVWpRfnxRaU5q8SFGU6DDJjJLiSbnA2M2ryTe0NjE zMjSyNzQwsjYXEmcV9/TKExIID2xJDU7NbUgtQimj4mDU6qBUYWP8eLSquJjDHN2TGypuLBx p6YZc6Ft7Gv9gls+/1hN6r/1/o78fOt2wFKlOanPZK/572reEHX2yzEerVit49635dpPnOXZ yzTDpftYxsNFu7cWb7rVXH1Z2N54FRtf0Y4zbp/b8vheLnxetvRktNm0q7u8C47MqOzc0mMe eOnO0p/79v3p3aLEUpyRaKjFXFScCAC164PnoQIAAA== DLP-Filter: Pass X-MTR: 20000000000000000@CPGS X-CFilter-Loop: Reflected Sender: linux-pm-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-pm@vger.kernel.org X-Spam-Status: No, score=-7.5 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP 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 --- 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]));