From patchwork Tue Sep 4 22:41:14 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kim Kukjin X-Patchwork-Id: 1404521 Return-Path: X-Original-To: patchwork-linux-arm@patchwork.kernel.org Delivered-To: patchwork-process-083081@patchwork1.kernel.org Received: from merlin.infradead.org (merlin.infradead.org [205.233.59.134]) by patchwork1.kernel.org (Postfix) with ESMTP id 139473FC71 for ; Tue, 4 Sep 2012 22:43:56 +0000 (UTC) Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.76 #1 (Red Hat Linux)) id 1T91oA-0007c5-Mi; Tue, 04 Sep 2012 22:41:22 +0000 Received: from mailout1.samsung.com ([203.254.224.24]) by merlin.infradead.org with esmtp (Exim 4.76 #1 (Red Hat Linux)) id 1T91o4-0007ab-C4 for linux-arm-kernel@lists.infradead.org; Tue, 04 Sep 2012 22:41:19 +0000 Received: from epcpsbgm2.samsung.com (epcpsbgm2 [203.254.230.27]) by mailout1.samsung.com (Oracle Communications Messaging Server 7u4-24.01(7.0.4.24.0) 64bit (built Nov 17 2011)) with ESMTP id <0M9U003XIKCNFF00@mailout1.samsung.com> for linux-arm-kernel@lists.infradead.org; Wed, 05 Sep 2012 07:41:14 +0900 (KST) X-AuditID: cbfee61b-b7f056d000002c30-de-5046838af5c5 Received: from epmmp2 ( [203.254.227.17]) by epcpsbgm2.samsung.com (EPCPMTA) with SMTP id 37.38.11312.A8386405; Wed, 05 Sep 2012 07:41:14 +0900 (KST) Received: from DOKGENEKIM03 ([12.23.119.152]) by mmp2.samsung.com (Oracle Communications Messaging Server 7u4-24.01 (7.0.4.24.0) 64bit (built Nov 17 2011)) with ESMTPA id <0M9U003GMKCQ9310@mmp2.samsung.com> for linux-arm-kernel@lists.infradead.org; Wed, 05 Sep 2012 07:41:14 +0900 (KST) From: Kukjin Kim To: 'Sylwester Nawrocki' References: <1346603823-14422-1-git-send-email-sylvester.nawrocki@gmail.com> In-reply-to: <1346603823-14422-1-git-send-email-sylvester.nawrocki@gmail.com> Subject: RE: [PATCH] ARM: Samsung: Remove unused code for the clocks debug-fs interface Date: Wed, 05 Sep 2012 07:41:14 +0900 Message-id: <227c01cd8aee$638ee0d0$2aaca270$%kim@samsung.com> MIME-version: 1.0 X-Mailer: Microsoft Office Outlook 12.0 Thread-index: Ac2JKTwvAamZNEPFRVenjl0KLq1TugBw5FRw Content-language: ko X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFjrFLMWRmVeSWpSXmKPExsVy+t9jQd2uZrcAg8O9ghabHl9jdWD02Lyk PoAxissmJTUnsyy1SN8ugStj6mX+gj/CFT0L57M1MG4S6GLk4JAQMJHYcjWti5ETyBSTuHBv PVsXIxeHkMB0RokrRw9AOcuYJHq6FrCAVLEJaEgcfv+MHcQWETCX6PzXzwxSxCywjlHi+NPN YAkhAR+J6b/6wBo4BXwlbq++ygqyTVggUqJ9lwVImEVAVeL03NesIDavgK3E15dHWCBsQYkf k++B2cwCWhLrdx5ngrDlJTavecsMcbS6xKO/uiCmiICRxNpTihAVIhL7XrxjnMAoNAvJoFlI Bs1CMmgWkpYFjCyrGEVTC5ILipPSc430ihNzi0vz0vWS83M3MYJD+Jn0DsZVDRaHGAU4GJV4 eBm83QKEWBPLiitzDzFKcDArifDeXu0aIMSbklhZlVqUH19UmpNafIhRmoNFSZzX6ZxdgJBA emJJanZqakFqEUyWiYNTqoFR+qL9lR8Tb674U7BwR2DpdGOdKVNrFxutDhWbtfnOU27BGT5W 88+xRk/aZ7OQhdFl7QHRQxavQ9f9O2jCMbX32C7jeavXTrm/1b7/YYW7gtmNFYI7o+oNl61j kpzwxz5uzqbL5i2nnyY8F13NPvUHw+f8p8Vn191xUfNcHJgze2J2pUf6rfBeUyWW4oxEQy3m ouJEAJ3vfX1dAgAA X-Spam-Note: CRM114 invocation failed X-Spam-Score: -7.1 (-------) X-Spam-Report: SpamAssassin version 3.3.2 on merlin.infradead.org summary: Content analysis details: (-7.1 points) pts rule name description ---- ---------------------- -------------------------------------------------- -5.0 RCVD_IN_DNSWL_HI RBL: Sender listed at http://www.dnswl.org/, high trust [203.254.224.24 listed in list.dnswl.org] -0.0 SPF_HELO_PASS SPF: HELO matches SPF record -0.2 RP_MATCHES_RCVD Envelope sender domain matches handover relay domain -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] Cc: linux-samsung-soc@vger.kernel.org, arve@android.com, amit.daniel@samsung.com, thomas.abraham@linaro.org, jhbird.choi@samsung.com, linux-arm-kernel@lists.infradead.org X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: linux-arm-kernel-bounces@lists.infradead.org Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org Sylwester Nawrocki wrote: > > Commit f86c6660927614fcda257 "ARM: SAMSUNG: Add clkdev infrastructure" > disabled population of the 'clocks' list - the clocks are now on the > clkdev clock list. However, this effectively broke the existing clocks > debug-fs interface on all Samsung platforms. Nobody complained about > this missing feature for over one year, so remove the unused code. > Yeah, could be. BTW, following will fix it on Samsung platforms? From: Arve Hjnnevg Subject: [PATCH] ARM: SAMSUNG: Fix clock debugfs code Restore list add deleted by commit f86c66609276('ARM: SAMSUNG: Add clkdev infrastructure') and fix clk_debugfs_register_one to not crash when devname is NULL. Signed-off-by: Arve Hjnnevg Signed-off-by: Jonghwan Choi --- arch/arm/plat-samsung/clock.c | 15 ++++++++++++++- 1 files changed, 14 insertions(+), 1 deletions(-) diff --git a/arch/arm/plat-samsung/clock.c b/arch/arm/plat-samsung/clock.c index 65c5eca..b7338ce 100644 --- a/arch/arm/plat-samsung/clock.c +++ b/arch/arm/plat-samsung/clock.c @@ -281,6 +281,15 @@ int s3c24xx_register_clock(struct clk *clk) if (clk->enable == NULL) clk->enable = clk_null_enable; + /* add to the list of available clocks */ + + /* Quick check to see if this clock has already been registered. */ + BUG_ON(clk->list.prev != clk->list.next); + + spin_lock(&clocks_lock); + list_add(&clk->list, &clocks); + spin_unlock(&clocks_lock); + /* fill up the clk_lookup structure and register it*/ clk->lookup.dev_id = clk->devname; clk->lookup.con_id = clk->name; @@ -395,7 +404,11 @@ static int clk_debugfs_register_one(struct clk *c) char s[255]; char *p = s; - p += sprintf(p, "%s", c->devname); + if (c->name) + p += sprintf(p, "%s", c->name); + + if (c->devname) + p += sprintf(p, ":%s", c->devname); d = debugfs_create_dir(s, pa ? pa->dent : clk_debugfs_root); if (!d)