]> git.baikalelectronics.ru Git - kernel.git/commit
powerpc/wii: Fix declaration made after definition
authorNathan Chancellor <natechancellor@gmail.com>
Mon, 13 Apr 2020 19:06:45 +0000 (12:06 -0700)
committerMichael Ellerman <mpe@ellerman.id.au>
Wed, 20 May 2020 13:39:56 +0000 (23:39 +1000)
commit503af5a6bc6426a24f5a3c844258be1378d5021c
tree089830440164983e2c896376bf8c7b2632328125
parent9736af8d066c2dd9419a54802e2b908fc38a8aeb
powerpc/wii: Fix declaration made after definition

A 0day randconfig uncovered an error with clang, trimmed for brevity:

arch/powerpc/platforms/embedded6xx/wii.c:195:7: error: attribute
declaration must precede definition [-Werror,-Wignored-attributes]
        if (!machine_is(wii))
             ^

The macro machine_is declares mach_##name but define_machine actually
defines mach_##name, hence the warning.

To fix this, move define_machine after the is_machine usage.

Fixes: 1ed2416382ed ("powerpc: wii: platform support")
Reported-by: kbuild test robot <lkp@intel.com>
Signed-off-by: Nathan Chancellor <natechancellor@gmail.com>
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
Link: https://github.com/ClangBuiltLinux/linux/issues/989
Link: https://lore.kernel.org/r/20200413190644.16757-1-natechancellor@gmail.com
arch/powerpc/platforms/embedded6xx/wii.c