Skip to contentSkip to conversation

Patch "clk: Fix JSON output in debugfs" has been added to the 4.1-stable tree

PATCH [email protected] 1 participant 1 message Jul 31, 2015

Subsystems (2)
lore
Share & tools
lore

[email protected]

author maintainer Applied
#0 lore raw

This is a note to let you know that I've just added the patch titled

clk: Fix JSON output in debugfs

to the 4.1-stable tree which can be found at:
http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary

The filename of the patch is:
clk-fix-json-output-in-debugfs.patch
and it can be found in the queue-4.1 subdirectory.

If you, or anyone else, feels it should not be added to the stable tree, please let <[email protected]> know about it.

Quoted 1 line

From 7cb81136d2efe0f5ed9d965857f4756a15e6c338 Mon Sep 17 00:00:00 2001

From: Stefan Wahren <[email protected]>
Date: Wed, 29 Apr 2015 16:36:43 +0000
Subject: clk: Fix JSON output in debugfs

From: Stefan Wahren <[email protected]>

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")
[[email protected]: Added comment in function]
---
 drivers/clk/clk.c |    5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)
drivers/clk/clk.c +3 -2
@@ -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));
 }
 

Patches currently in stable-queue which might be from [email protected] are

queue-4.1/clk-fix-json-output-in-debugfs.patch queue-4.1/usb-phy-mxs-suspend-to-ram-causes-null-pointer-dereference.patch queue-4.1/arm-dts-mx23-fix-iio-hwmon-support.patch