linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] nds32: Move static keyword to the front of declaration
@ 2019-09-04 23:52 Krzysztof Wilczynski
  2019-11-21  9:12 ` Greentime Hu
  0 siblings, 1 reply; 2+ messages in thread
From: Krzysztof Wilczynski @ 2019-09-04 23:52 UTC (permalink / raw)
  To: Peter Zijlstra
  Cc: Ingo Molnar, Arnaldo Carvalho de Melo, Alexander Shishkin,
	Jiri Olsa, Namhyung Kim, Greentime Hu, Vincent Chen,
	linux-kernel

Move the static keyword to the front of declaration of
cpu_pmu_of_device_ids, and resolve the following compiler
warning that can be seen when building with warnings
enabled (W=1):

arch/nds32/kernel/perf_event_cpu.c:1122:1: warning:
  ‘static’ is not at beginning of declaration [-Wold-style-declaration]

Signed-off-by: Krzysztof Wilczynski <kw@linux.com>
---
Related: https://lore.kernel.org/r/20190827233017.GK9987@google.com

 arch/nds32/kernel/perf_event_cpu.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/arch/nds32/kernel/perf_event_cpu.c b/arch/nds32/kernel/perf_event_cpu.c
index 334c2a6cec23..0ce6f9f307e6 100644
--- a/arch/nds32/kernel/perf_event_cpu.c
+++ b/arch/nds32/kernel/perf_event_cpu.c
@@ -1119,7 +1119,7 @@ static void cpu_pmu_init(struct nds32_pmu *cpu_pmu)
 		on_each_cpu(cpu_pmu->reset, cpu_pmu, 1);
 }
 
-const static struct of_device_id cpu_pmu_of_device_ids[] = {
+static const struct of_device_id cpu_pmu_of_device_ids[] = {
 	{.compatible = "andestech,nds32v3-pmu",
 	 .data = device_pmu_init},
 	{},
-- 
2.22.1


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

* Re: [PATCH] nds32: Move static keyword to the front of declaration
  2019-09-04 23:52 [PATCH] nds32: Move static keyword to the front of declaration Krzysztof Wilczynski
@ 2019-11-21  9:12 ` Greentime Hu
  0 siblings, 0 replies; 2+ messages in thread
From: Greentime Hu @ 2019-11-21  9:12 UTC (permalink / raw)
  To: Krzysztof Wilczynski
  Cc: Peter Zijlstra, Ingo Molnar, Arnaldo Carvalho de Melo,
	Alexander Shishkin, Jiri Olsa, Namhyung Kim, Vincent Chen,
	Linux Kernel Mailing List

Krzysztof Wilczynski <kw@linux.com> 於 2019年9月5日 週四 上午7:52寫道:
>
> Move the static keyword to the front of declaration of
> cpu_pmu_of_device_ids, and resolve the following compiler
> warning that can be seen when building with warnings
> enabled (W=1):
>
> arch/nds32/kernel/perf_event_cpu.c:1122:1: warning:
>   ‘static’ is not at beginning of declaration [-Wold-style-declaration]
>
> Signed-off-by: Krzysztof Wilczynski <kw@linux.com>
> ---
> Related: https://lore.kernel.org/r/20190827233017.GK9987@google.com
>
>  arch/nds32/kernel/perf_event_cpu.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/arch/nds32/kernel/perf_event_cpu.c b/arch/nds32/kernel/perf_event_cpu.c
> index 334c2a6cec23..0ce6f9f307e6 100644
> --- a/arch/nds32/kernel/perf_event_cpu.c
> +++ b/arch/nds32/kernel/perf_event_cpu.c
> @@ -1119,7 +1119,7 @@ static void cpu_pmu_init(struct nds32_pmu *cpu_pmu)
>                 on_each_cpu(cpu_pmu->reset, cpu_pmu, 1);
>  }
>
> -const static struct of_device_id cpu_pmu_of_device_ids[] = {
> +static const struct of_device_id cpu_pmu_of_device_ids[] = {
>         {.compatible = "andestech,nds32v3-pmu",
>          .data = device_pmu_init},
>         {},

Thanks, Krzysztof.
Acked-by: Greentime Hu <green.hu@gmail.com>

I will queue it in nds32 next tree.

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

end of thread, other threads:[~2019-11-21  9:13 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-09-04 23:52 [PATCH] nds32: Move static keyword to the front of declaration Krzysztof Wilczynski
2019-11-21  9:12 ` Greentime Hu

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).