lkml.org 
[lkml]   [2016]   [Jun]   [22]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH v2 10/11] clk: Show CRITICAL clks in clk_summary output
On Fri, May 27, 2016 at 04:38:13PM -0400, Rhyland Klein wrote:
> Add a '^' character to the beginning of clk entries that are for
> CRITICAL clks.
>
> Signed-off-by: Rhyland Klein <rklein@nvidia.com>
> ---
> drivers/clk/clk.c | 7 +++++--
> 1 file changed, 5 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/clk/clk.c b/drivers/clk/clk.c
> index 874c7dd8ef66..22dd0ca1e491 100644
> --- a/drivers/clk/clk.c
> +++ b/drivers/clk/clk.c
> @@ -1948,8 +1948,9 @@ static void clk_summary_show_one(struct seq_file *s, struct clk_core *c,
> if (!c)
> return;
>
> - seq_printf(s, "%*s%-*s %11d %12d %11lu %10lu %-3d\n",
> - level * 3 + 1, "",
> + seq_printf(s, "%s%*s%-*s %11d %12d %11lu %10lu %-3d\n",
> + (c->flags & CLK_IS_CRITICAL ? "^" : ""),
> + level * 3 + (c->flags & CLK_IS_CRITICAL ? 0 : 1), "",

Maybe output " " instead of "" for CLK_IS_CRITICAL, that way you can
omit the second conditional.

I wonder if it might be easier to read if this flag was at the end of
the line. There's also the fact that someone may have written a script
that expects the clock name as the first word on the line and may get
confused by this change. If you put it at the very end of the line the
likelihood of upsetting scripts will be reduced.

Thierry
[unhandled content-type:application/pgp-signature]
\
 
 \ /
  Last update: 2016-06-22 15:01    [W:0.115 / U:0.732 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site