mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH] clk: Neaten clk_summary output
@ 2014-03-25 11:16 Geert Uytterhoeven
       [not found] ` <20140513001759.5943.52169@quantum>
  0 siblings, 1 reply; 3+ messages in thread
From: Geert Uytterhoeven @ 2014-03-25 11:16 UTC (permalink / raw)
  To: Mike Turquette; +Cc: linux-kernel, Geert Uytterhoeven

From: Geert Uytterhoeven <geert+renesas@glider.be>

  - Limit ruler to 80 characters (was: 81),
  - Widen rate column by 1 for nicer spacing,
  - Right-align numbers and their column headers,
  - Move a newline to reduce the number of seq_printf() calls,
  - Use set_puts() for fixed strings.

Before:

   clock                        enable_cnt  prepare_cnt  rate        accuracy
---------------------------------------------------------------------------------
 extal                          2           2            20000000   0
    thermal                     1           1            20000000   0
    cp                          0           0            10000000   0
       tpu0                     0           0            10000000   0
       tmu0                     0           0            10000000   0
    main                        1           1            20000000   0
       pll3                     0           0            1600000000 0
          ddr                   0           0            200000000  0
          zb3d2                 0           0            200000000  0
          zb3                   0           0            400000000  0
       pll1                     4           4            1560000000 0
          oscclk                0           0            126953     0
          rclk                  1           1            31738      0
             cmt1               0           0            31738      0
             cmt0               1           1            31738      0
          imp                   0           0            390000000  0

After:

   clock                         enable_cnt  prepare_cnt        rate   accuracy
--------------------------------------------------------------------------------
 extal                                    2            2    20000000          0
    thermal                               1            1    20000000          0
    cp                                    0            0    10000000          0
       tpu0                               0            0    10000000          0
       tmu0                               0            0    10000000          0
    main                                  1            1    20000000          0
       pll3                               0            0  1600000000          0
          ddr                             0            0   200000000          0
          zb3d2                           0            0   200000000          0
          zb3                             0            0   400000000          0
       pll1                               4            4  1560000000          0
          oscclk                          0            0      126953          0
          rclk                            1            1       31738          0
             cmt1                         0            0       31738          0
             cmt0                         1            1       31738          0
          imp                             0            0   390000000          0

Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
---
 drivers/clk/clk.c |    7 +++----
 1 file changed, 3 insertions(+), 4 deletions(-)

diff --git a/drivers/clk/clk.c b/drivers/clk/clk.c
index fb3c40b4fbe2..73fe1fade11f 100644
--- a/drivers/clk/clk.c
+++ b/drivers/clk/clk.c
@@ -106,12 +106,11 @@ static void clk_summary_show_one(struct seq_file *s, struct clk *c, int level)
 	if (!c)
 		return;
 
-	seq_printf(s, "%*s%-*s %-11d %-12d %-10lu %-11lu",
+	seq_printf(s, "%*s%-*s %11d %12d %11lu %10lu\n",
 		   level * 3 + 1, "",
 		   30 - level * 3, c->name,
 		   c->enable_count, c->prepare_count, clk_get_rate(c),
 		   clk_get_accuracy(c));
-	seq_printf(s, "\n");
 }
 
 static void clk_summary_show_subtree(struct seq_file *s, struct clk *c,
@@ -132,8 +131,8 @@ static int clk_summary_show(struct seq_file *s, void *data)
 {
 	struct clk *c;
 
-	seq_printf(s, "   clock                        enable_cnt  prepare_cnt  rate        accuracy\n");
-	seq_printf(s, "---------------------------------------------------------------------------------\n");
+	seq_puts(s, "   clock                         enable_cnt  prepare_cnt        rate   accuracy\n");
+	seq_puts(s, "--------------------------------------------------------------------------------\n");
 
 	clk_prepare_lock();
 
-- 
1.7.9.5


^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] clk: Neaten clk_summary output
       [not found] ` <20140513001759.5943.52169@quantum>
@ 2014-05-23  7:14   ` Geert Uytterhoeven
       [not found]     ` <20140523211221.23136.12584@quantum>
  0 siblings, 1 reply; 3+ messages in thread
From: Geert Uytterhoeven @ 2014-05-23  7:14 UTC (permalink / raw)
  To: Mike Turquette; +Cc: linux-kernel, Geert Uytterhoeven

Hi Mike,

On Tue, May 13, 2014 at 2:17 AM, Mike Turquette <mturquette@linaro.org> wrote:
> Quoting Geert Uytterhoeven (2014-03-25 04:16:24)
>> From: Geert Uytterhoeven <geert+renesas@glider.be>
>>
>>   - Limit ruler to 80 characters (was: 81),
>>   - Widen rate column by 1 for nicer spacing,
>>   - Right-align numbers and their column headers,
>>   - Move a newline to reduce the number of seq_printf() calls,
>>   - Use set_puts() for fixed strings.

>> Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
>
> Thanks for the fix. Taken into clk-next.

I don't see it in clk-next, though?

Gr{oetje,eeting}s,

                        Geert

--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org

In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
                                -- Linus Torvalds

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] clk: Neaten clk_summary output
       [not found]     ` <20140523211221.23136.12584@quantum>
@ 2014-05-26  7:58       ` Geert Uytterhoeven
  0 siblings, 0 replies; 3+ messages in thread
From: Geert Uytterhoeven @ 2014-05-26  7:58 UTC (permalink / raw)
  To: Mike Turquette; +Cc: linux-kernel, Geert Uytterhoeven

Hi Mike,

On Fri, May 23, 2014 at 11:12 PM, Mike Turquette <mturquette@linaro.org> wrote:
> Quoting Geert Uytterhoeven (2014-05-23 00:14:41)
>> On Tue, May 13, 2014 at 2:17 AM, Mike Turquette <mturquette@linaro.org> wrote:
>> > Quoting Geert Uytterhoeven (2014-03-25 04:16:24)
>> >> From: Geert Uytterhoeven <geert+renesas@glider.be>
>> >>
>> >>   - Limit ruler to 80 characters (was: 81),
>> >>   - Widen rate column by 1 for nicer spacing,
>> >>   - Right-align numbers and their column headers,
>> >>   - Move a newline to reduce the number of seq_printf() calls,
>> >>   - Use set_puts() for fixed strings.
>>
>> >> Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
>> >
>> > Thanks for the fix. Taken into clk-next.
>>
>> I don't see it in clk-next, though?
>
> When I say "clk-next" I really mean my local/private branch. You'll see
> it at the end of today when I push my next set of tested patches out to
> my linaro mirror.

Thanks, I can see it now.

Sorry for being so impatient.

Gr{oetje,eeting}s,

                        Geert

--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org

In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
                                -- Linus Torvalds

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2014-05-26  7:58 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-03-25 11:16 [PATCH] clk: Neaten clk_summary output Geert Uytterhoeven
     [not found] ` <20140513001759.5943.52169@quantum>
2014-05-23  7:14   ` Geert Uytterhoeven
     [not found]     ` <20140523211221.23136.12584@quantum>
2014-05-26  7:58       ` Geert Uytterhoeven

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®