From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753105AbbEABeP (ORCPT ); Thu, 30 Apr 2015 21:34:15 -0400 Received: from smtp.codeaurora.org ([198.145.29.96]:53975 "EHLO smtp.codeaurora.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751219AbbEABeO (ORCPT ); Thu, 30 Apr 2015 21:34:14 -0400 Date: Thu, 30 Apr 2015 18:34:12 -0700 From: Stephen Boyd To: Felipe Balbi Cc: Stefan Wahren , Mike Turquette , linux-kernel@vger.kernel.org Subject: Re: [PATCH RESEND] clk: Fix JSON output in debugfs Message-ID: <20150501013412.GA22759@codeaurora.org> References: <1430325403-2647-1-git-send-email-stefan.wahren@i2se.com> <20150501003712.GD32407@codeaurora.org> <20150501005522.GA6020@saruman.tx.rr.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20150501005522.GA6020@saruman.tx.rr.com> User-Agent: Mutt/1.5.21 (2010-09-15) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 04/30, Felipe Balbi wrote: > On Thu, Apr 30, 2015 at 05:37:12PM -0700, Stephen Boyd wrote: > > On 04/29, Stefan Wahren wrote: > > > key/value pairs in a JSON object must be separated by a comma. > > > After adding the properties "accuracy" and "phase" the JSON output > > > of /sys/kernel/debug/clk/clk_dump is invalid. > > > > > > So add the missing commas to fix it. > > > > > > Fixes: 5279fc4 ("clk: add clk accuracy retrieval support") > > > Signed-off-by: Stefan Wahren > > > > Hmph, this regression is old, v3.14 days. We probably ought to > > have a comment in here stating this should be JSON format. > > > > Applied to clk-next with the comment below squashed in. > > > > ----8<---- > > diff --git a/drivers/clk/clk.c b/drivers/clk/clk.c > > index 5edbec6dfb20..b850a0ef5b9f 100644 > > --- a/drivers/clk/clk.c > > +++ b/drivers/clk/clk.c > > @@ -1974,6 +1974,7 @@ static void clk_dump_one(struct seq_file *s, struct clk_core *c, int level) > > if (!c) > > return; > > > > + /* This should be JSON format, i.e. elements separated with a comma */ > > seq_printf(s, "\"%s\": { ", c->name); > > seq_printf(s, "\"enable_count\": %d,", c->enable_count); > > seq_printf(s, "\"prepare_count\": %d,", c->prepare_count); > > you probably want to a newline character after all clocks have been > dumped. Sure. Please send it as a separate patch with signed-off and I'll apply. It doesn't seem like a fix for a regression. -- Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum, a Linux Foundation Collaborative Project