From: Leonard Crestez <leonard.crestez@nxp.com> To: Stephen Boyd <sboyd@kernel.org>, Geert Uytterhoeven <geert@linux-m68k.org> Cc: Michael Turquette <mturquette@baylibre.com>, "linux-clk@vger.kernel.org" <linux-clk@vger.kernel.org>, "linux-arm-kernel@lists.infradead.org" <linux-arm-kernel@lists.infradead.org> Subject: Re: [PATCH v3 1/2] clk: Add clk_min/max_rate entries in debugfs Date: Thu, 8 Aug 2019 16:46:48 +0000 [thread overview] Message-ID: <VI1PR04MB7023C8A78321E34492290E56EED70@VI1PR04MB7023.eurprd04.prod.outlook.com> (raw) In-Reply-To: 20190808150028.0BC1F217D7@mail.kernel.org On 8/8/2019 6:00 PM, Stephen Boyd wrote: > Quoting Leonard Crestez (2019-07-02 06:27:09) >> diff --git a/drivers/clk/clk.c b/drivers/clk/clk.c >> static void clk_dump_one(struct seq_file *s, struct clk_core *c, int level) >> { >> + clk_core_get_boundaries(c, &min_rate, &max_rate); >> + if (min_rate != 0) >> + seq_printf(s, "\"min_rate\": %lu,", min_rate); >> + if (max_rate != ULONG_MAX) >> + seq_printf(s, "\"max_rate\": %lu,", max_rate); > > What are the if conditions about? We always output the values in the > individual files, but for some reason we don't want to do that in the > json output? These if conditions are an easy way to avoid spamming "min_rate": 0, "max_rate": 18446744073709551615 in json. If you object to the inconsistency a nice solution would to be show "null" in both debugfs and json. Outright hiding min/max files from debugfs is impractical, it would require filesystem calls from clk_set_min_rate -- Regards, Leonard
WARNING: multiple messages have this Message-ID (diff)
From: Leonard Crestez <leonard.crestez@nxp.com> To: Stephen Boyd <sboyd@kernel.org>, Geert Uytterhoeven <geert@linux-m68k.org> Cc: Michael Turquette <mturquette@baylibre.com>, "linux-clk@vger.kernel.org" <linux-clk@vger.kernel.org>, "linux-arm-kernel@lists.infradead.org" <linux-arm-kernel@lists.infradead.org> Subject: Re: [PATCH v3 1/2] clk: Add clk_min/max_rate entries in debugfs Date: Thu, 8 Aug 2019 16:46:48 +0000 [thread overview] Message-ID: <VI1PR04MB7023C8A78321E34492290E56EED70@VI1PR04MB7023.eurprd04.prod.outlook.com> (raw) In-Reply-To: 20190808150028.0BC1F217D7@mail.kernel.org On 8/8/2019 6:00 PM, Stephen Boyd wrote: > Quoting Leonard Crestez (2019-07-02 06:27:09) >> diff --git a/drivers/clk/clk.c b/drivers/clk/clk.c >> static void clk_dump_one(struct seq_file *s, struct clk_core *c, int level) >> { >> + clk_core_get_boundaries(c, &min_rate, &max_rate); >> + if (min_rate != 0) >> + seq_printf(s, "\"min_rate\": %lu,", min_rate); >> + if (max_rate != ULONG_MAX) >> + seq_printf(s, "\"max_rate\": %lu,", max_rate); > > What are the if conditions about? We always output the values in the > individual files, but for some reason we don't want to do that in the > json output? These if conditions are an easy way to avoid spamming "min_rate": 0, "max_rate": 18446744073709551615 in json. If you object to the inconsistency a nice solution would to be show "null" in both debugfs and json. Outright hiding min/max files from debugfs is impractical, it would require filesystem calls from clk_set_min_rate -- Regards, Leonard _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
next prev parent reply other threads:[~2019-08-08 16:46 UTC|newest] Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top 2019-07-02 13:27 [PATCH v3 1/2] clk: Add clk_min/max_rate entries in debugfs Leonard Crestez 2019-07-02 13:27 ` Leonard Crestez 2019-07-02 13:27 ` [PATCH v3 2/2] clk: Assert prepare_lock in clk_core_get_boundaries Leonard Crestez 2019-07-02 13:27 ` Leonard Crestez 2019-08-08 15:00 ` Stephen Boyd 2019-08-08 15:00 ` Stephen Boyd 2019-08-08 15:00 ` [PATCH v3 1/2] clk: Add clk_min/max_rate entries in debugfs Stephen Boyd 2019-08-08 15:00 ` Stephen Boyd 2019-08-08 16:46 ` Leonard Crestez [this message] 2019-08-08 16:46 ` Leonard Crestez 2019-08-08 19:46 ` Stephen Boyd 2019-08-08 19:46 ` Stephen Boyd 2019-07-16 10:32 Leonard Crestez 2019-07-16 17:13 ` Stephen Boyd 2019-07-16 17:13 ` Stephen Boyd
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to=VI1PR04MB7023C8A78321E34492290E56EED70@VI1PR04MB7023.eurprd04.prod.outlook.com \ --to=leonard.crestez@nxp.com \ --cc=geert@linux-m68k.org \ --cc=linux-arm-kernel@lists.infradead.org \ --cc=linux-clk@vger.kernel.org \ --cc=mturquette@baylibre.com \ --cc=sboyd@kernel.org \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: linkBe sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes, see mirroring instructions on how to clone and mirror all data and code used by this external index.