linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] clk: Really show symbolic clock flags in debugfs
@ 2018-07-04 13:01 Geert Uytterhoeven
  2018-07-06 15:12 ` Stephen Boyd
  0 siblings, 1 reply; 3+ messages in thread
From: Geert Uytterhoeven @ 2018-07-04 13:01 UTC (permalink / raw)
  To: Michael Turquette, Stephen Boyd
  Cc: linux-clk, linux-kernel, Geert Uytterhoeven

The last-minute fold-in of the ENTRY() macro did change behavior:
instead of printing the symbolic name (e.g. "CLK_IS_BASIC"), it prints
the expansion of it (e.g. "(1UL << (5))").

Use "#" instead of  __stringify() to fix this.

Fixes: a6059ab98130fb56 ("clk: Show symbolic clock flags in debugfs")
Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
---
 drivers/clk/clk.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/clk/clk.c b/drivers/clk/clk.c
index e108f591d84a9539..f4856d49bd3a698c 100644
--- a/drivers/clk/clk.c
+++ b/drivers/clk/clk.c
@@ -2739,7 +2739,7 @@ static const struct {
 	unsigned long flag;
 	const char *name;
 } clk_flags[] = {
-#define ENTRY(f) { f, __stringify(f) }
+#define ENTRY(f) { f, #f }
 	ENTRY(CLK_SET_RATE_GATE),
 	ENTRY(CLK_SET_PARENT_GATE),
 	ENTRY(CLK_SET_RATE_PARENT),
-- 
2.17.1


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

* Re: [PATCH] clk: Really show symbolic clock flags in debugfs
  2018-07-04 13:01 [PATCH] clk: Really show symbolic clock flags in debugfs Geert Uytterhoeven
@ 2018-07-06 15:12 ` Stephen Boyd
  2018-07-06 15:18   ` Geert Uytterhoeven
  0 siblings, 1 reply; 3+ messages in thread
From: Stephen Boyd @ 2018-07-06 15:12 UTC (permalink / raw)
  To: Geert Uytterhoeven, Michael Turquette
  Cc: linux-clk, linux-kernel, Geert Uytterhoeven

Quoting Geert Uytterhoeven (2018-07-04 06:01:03)
> The last-minute fold-in of the ENTRY() macro did change behavior:
> instead of printing the symbolic name (e.g. "CLK_IS_BASIC"), it prints
> the expansion of it (e.g. "(1UL << (5))").
> 
> Use "#" instead of  __stringify() to fix this.

Do we need the stringify.h include anymore then?


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

* Re: [PATCH] clk: Really show symbolic clock flags in debugfs
  2018-07-06 15:12 ` Stephen Boyd
@ 2018-07-06 15:18   ` Geert Uytterhoeven
  0 siblings, 0 replies; 3+ messages in thread
From: Geert Uytterhoeven @ 2018-07-06 15:18 UTC (permalink / raw)
  To: Stephen Boyd
  Cc: Geert Uytterhoeven, Michael Turquette, linux-clk,
	Linux Kernel Mailing List

Hi Stephen,

On Fri, Jul 6, 2018 at 5:12 PM Stephen Boyd <sboyd@kernel.org> wrote:
> Quoting Geert Uytterhoeven (2018-07-04 06:01:03)
> > The last-minute fold-in of the ENTRY() macro did change behavior:
> > instead of printing the symbolic name (e.g. "CLK_IS_BASIC"), it prints
> > the expansion of it (e.g. "(1UL << (5))").
> >
> > Use "#" instead of  __stringify() to fix this.
>
> Do we need the stringify.h include anymore then?

No we don't. I had planned to remove it, but forgot in the end :-(

Thanks, v2 sent.

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:[~2018-07-06 15:18 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-07-04 13:01 [PATCH] clk: Really show symbolic clock flags in debugfs Geert Uytterhoeven
2018-07-06 15:12 ` Stephen Boyd
2018-07-06 15:18   ` Geert Uytterhoeven

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).