lkml.org 
[lkml]   [2015]   [Jul]   [31]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    Patch in this message
    /
    From
    Subject[PATCH 4.1 239/267] clk: Fix JSON output in debugfs
    Date
    4.1-stable review patch.  If anyone has any objections, please let me know.

    ------------------

    From: Stefan Wahren <stefan.wahren@i2se.com>

    commit 7cb81136d2efe0f5ed9d965857f4756a15e6c338 upstream.

    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: 5279fc402ae5 ("clk: add clk accuracy retrieval support")
    Signed-off-by: Stefan Wahren <stefan.wahren@i2se.com>
    [sboyd@codeaurora.org: Added comment in function]
    Signed-off-by: Stephen Boyd <sboyd@codeaurora.org>
    Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

    ---
    drivers/clk/clk.c | 5 +++--
    1 file changed, 3 insertions(+), 2 deletions(-)

    --- a/drivers/clk/clk.c
    +++ b/drivers/clk/clk.c
    @@ -230,11 +230,12 @@ static void clk_dump_one(struct seq_file
    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);
    - seq_printf(s, "\"rate\": %lu", clk_core_get_rate(c));
    - seq_printf(s, "\"accuracy\": %lu", clk_core_get_accuracy(c));
    + seq_printf(s, "\"rate\": %lu,", clk_core_get_rate(c));
    + seq_printf(s, "\"accuracy\": %lu,", clk_core_get_accuracy(c));
    seq_printf(s, "\"phase\": %d", clk_core_get_phase(c));
    }




    \
     
     \ /
      Last update: 2015-07-31 23:41    [W:4.068 / U:0.388 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site