Re: [PATCH] nds32: Move static keyword to the front of declaration

From: Greentime Hu
Date: Thu Nov 21 2019 - 04:13:21 EST


Krzysztof Wilczynski <kw@xxxxxxxxx> æ 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@xxxxxxxxx>
> ---
> Related: https://lore.kernel.org/r/20190827233017.GK9987@xxxxxxxxxx
>
> 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@xxxxxxxxx>

I will queue it in nds32 next tree.