linux_dsm_epyc7002/arch/powerpc
Gerhard Sittig 45d20e8348 powerpc/mpc512x: silence build warning upon disabled DIU
a disabled Kconfig option results in a reference to a not implemented
routine when the IS_ENABLED() macro is used for both conditional
implementation of the routine as well as a C language source code test
at the call site -- the "if (0) func();" construct only gets eliminated
later by the optimizer, while the compiler already has emitted its
warning about "func()" being undeclared

provide an empty implementation for the mpc512x_setup_diu() and
mpc512x_init_diu() routines in case of the disabled option, to avoid the
compiler warning which is considered fatal and breaks compilation

the bug appeared with commit 2abbbb63c9
"powerpc/mpc512x: move common code to shared.c file", how to reproduce:

  make mpc512x_defconfig
  echo CONFIG_FB_FSL_DIU=n >> .config && make olddefconfig
  make

    CC      arch/powerpc/platforms/512x/mpc512x_shared.o
  .../arch/powerpc/platforms/512x/mpc512x_shared.c: In function 'mpc512x_init_early':
  .../arch/powerpc/platforms/512x/mpc512x_shared.c:456:3: error: implicit declaration of function 'mpc512x_init_diu' [-Werror=implicit-function-declaration]
  .../arch/powerpc/platforms/512x/mpc512x_shared.c: In function 'mpc512x_setup_arch':
  .../arch/powerpc/platforms/512x/mpc512x_shared.c:469:3: error: implicit declaration of function 'mpc512x_setup_diu' [-Werror=implicit-function-declaration]
  cc1: all warnings being treated as errors
  make[4]: *** [arch/powerpc/platforms/512x/mpc512x_shared.o] Error 1

Signed-off-by: Gerhard Sittig <gsi@denx.de>
CC: <stable@vger.kernel.org> # v3.11
Signed-off-by: Anatolij Gustschin <agust@denx.de>
2013-10-30 22:34:02 +01:00
..
boot powerpc/boot: Don't change link address for OF-based platforms 2013-10-30 16:00:17 +11:00
configs powerpc: Enable virtio on ppc64 and pseries configs 2013-10-30 16:02:09 +11:00
crypto
include powerpc/powernv: Code update interface 2013-10-30 16:12:02 +11:00
kernel powerpc/kexec: kexec_sequence() is in misc_64.S 2013-10-30 16:02:18 +11:00
kvm Merge branch 'for-kvm' into next 2013-10-11 18:23:53 +11:00
lib powerpc: Add VMX optimised xor for RAID5 2013-10-30 16:02:28 +11:00
math-emu powerpc/math-emu: Fix load/store indexed emulation 2013-08-14 14:59:57 +10:00
mm powerpc: Fix warnings for arch/powerpc/mm/numa.c 2013-10-30 16:00:24 +11:00
net
oprofile Merge branch 'next' of git://git.kernel.org/pub/scm/linux/kernel/git/benh/powerpc 2013-09-06 10:49:42 -07:00
perf powerpc/perf: Fix handling of FAB events 2013-10-03 17:25:38 +10:00
platforms powerpc/mpc512x: silence build warning upon disabled DIU 2013-10-30 22:34:02 +01:00
sysdev powerpc/mv643xx_eth: fix return check in mv64x60_eth_register_shared_pdev() 2013-10-28 21:11:23 -05:00
xmon powerpc/xmon: Fix printing of set of CPUs in xmon 2013-09-05 17:29:19 +10:00
Kconfig powerpc: FA_DUMP depends on KEXEC 2013-10-30 16:00:44 +11:00
Kconfig.debug Merge branch 'kconfig-diet' from Dave Hansen 2013-07-04 11:25:51 -07:00
Makefile powerpc: Work around little endian gcc bug 2013-10-11 16:48:57 +11:00
relocs_check.pl