Skip to contentSkip to conversation

nds32: Move static keyword to the front of declaration

PATCH In review Krzysztof Wilczynski 2 participants 2 messages Sep 4, 2019 – Nov 21, 2019 perf events

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 nds32: Move static keyword to the front of declaration

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]

---
Related: https://lore.kernel.org/r/[email protected]

 arch/nds32/kernel/perf_event_cpu.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
arch/nds32/kernel/perf_event_cpu.c +1 -1
index 334c2a6cec23..0ce6f9f307e6 100644
@@ -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},
 	{},
Signature · 1 line
2.22.1
Acked-by on v1 1/1
#1 lore raw

Krzysztof Wilczynski <[email protected]> 於 2019年9月5日 週四 上午7:52寫道:

Quoted 21 lines

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]

---
Related: https://lore.kernel.org/r/[email protected]

 arch/nds32/kernel/perf_event_cpu.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
arch/nds32/kernel/perf_event_cpu.c +0 -0
index 334c2a6cec23..0ce6f9f307e6 100644

arch/nds32/kernel/perf_event_cpu.c static void cpu_pmu_init(struct nds32_pmu *cpu_pmu) · line 1125

Quoted 8 lines
arch/nds32/kernel/perf_event_cpu.c +1 -1
@@ -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.

I will queue it in nds32 next tree.