linux-stable/arch/powerpc
Nathan Chancellor 1081196571 powerpc/maple: Fix declaration made after definition
[ Upstream commit af6cf95c4d ]

When building ppc64 defconfig, Clang errors (trimmed for brevity):

  arch/powerpc/platforms/maple/setup.c:365:1: error: attribute declaration
  must precede definition [-Werror,-Wignored-attributes]
  machine_device_initcall(maple, maple_cpc925_edac_setup);
  ^

machine_device_initcall expands to __define_machine_initcall, which in
turn has the macro machine_is used in it, which declares mach_##name
with an __attribute__((weak)). define_machine actually defines
mach_##name, which in this file happens before the declaration, hence
the warning.

To fix this, move define_machine after machine_device_initcall so that
the declaration occurs before the definition, which matches how
machine_device_initcall and define_machine work throughout
arch/powerpc.

While we're here, remove some spaces before tabs.

Fixes: 8f101a051e ("edac: cpc925 MC platform device setup")
Reported-by: Nick Desaulniers <ndesaulniers@google.com>
Suggested-by: Ilie Halip <ilie.halip@gmail.com>
Signed-off-by: Nathan Chancellor <natechancellor@gmail.com>
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
Link: https://lore.kernel.org/r/20200323222729.15365-1-natechancellor@gmail.com
Signed-off-by: Sasha Levin <sashal@kernel.org>
2020-04-23 10:30:18 +02:00
..
boot powerpc/44x: Adjust indentation in ibm4xx_denali_fixup_memsize 2020-02-11 04:34:12 -08:00
configs powerpc/mm/radix: Make Radix require HUGETLB_PAGE 2019-05-02 09:58:55 +02:00
crypto
include powerpc: Make setjmp/longjmp signature standard 2020-04-17 10:48:54 +02:00
kernel powerpc: Make setjmp/longjmp signature standard 2020-04-17 10:48:54 +02:00
kvm KVM: PPC: Book3S PR: Free shared page if mmu initialization fails 2020-02-11 04:34:11 -08:00
lib powerpc/64: Fix memcmp reading past the end of src/dest 2019-04-03 06:26:29 +02:00
math-emu
mm powerpc/fsl_booke: Avoid creating duplicate tlb1 entry 2020-04-17 10:48:55 +02:00
net powerpc/bpf: Fix tail call implementation 2019-12-05 09:19:39 +01:00
oprofile
perf powerpc/perf: Fix unit_sel/cache_sel checks 2019-12-05 09:20:41 +01:00
platforms powerpc/maple: Fix declaration made after definition 2020-04-23 10:30:18 +02:00
purgatory
sysdev powerpc/xive: Use XIVE_BAD_IRQ instead of zero to catch non configured IPIs 2020-04-17 10:48:53 +02:00
tools powerpc/tools: Don't quote $objdump in scripts 2020-01-04 19:12:42 +01:00
xmon powerpc: Make setjmp/longjmp signature standard 2020-04-17 10:48:54 +02:00
Kconfig of: Add OF_DMA_DEFAULT_COHERENT & select it on powerpc 2020-02-11 04:34:03 -08:00
Kconfig.debug
Makefile powerpc: vdso: Make vdso32 installation conditional in vdso_install 2020-01-27 14:50:40 +01:00
Makefile.postlink