linux/arch/powerpc
Stephen Rothwell 06a901c562 [POWERPC] mpic: Fix use of uninitialized variable
Compiling ppc64_defconfig with gcc 4.3 gives thes warnings:

arch/powerpc/sysdev/mpic.c: In function 'mpic_irq_get_priority':
arch/powerpc/sysdev/mpic.c:1351: warning: 'is_ipi' may be used uninitialized in this function
arch/powerpc/sysdev/mpic.c: In function 'mpic_irq_set_priority':
arch/powerpc/sysdev/mpic.c:1328: warning: 'is_ipi' may be used uninitialized in this function

It turns out that in the cases where is_ipi is uninitialized, another
variable (mpic) will be NULL and it is dereferenced.  Protect against
this by returning if mpic is NULL in mpic_irq_set_priority, and removing
mpic_irq_get_priority completely as it has no in tree callers.

This has the nice side effect of making the warning go away.

Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au>
Acked-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Signed-off-by: Paul Mackerras <paulus@samba.org>
2008-05-23 16:15:37 +10:00
..
boot Merge branch 'for-2.6.26' of master.kernel.org:/pub/scm/linux/kernel/git/galak/powerpc into merge 2008-05-20 19:46:37 +10:00
configs [POWERPC] Update defconfigs for desktop/server systems 2008-05-20 20:04:12 +10:00
kernel [POWERPC] Add kernstart_addr to list of allowed symbols in prom_init 2008-05-23 16:15:35 +10:00
kvm KVM: ppc: deliver INTERRUPT_FP_UNAVAIL to the guest 2008-05-04 14:44:45 +03:00
lib [POWERPC] ppc: More compile fixes 2008-05-12 22:57:51 +10:00
math-emu
mm [POWERPC] Fix __set_fixmap() for STRICT_MM_TYPECHECKS 2008-05-23 16:15:32 +10:00
oprofile
platforms [POWERPC] PS3: Fix memory hotplug 2008-05-23 16:15:29 +10:00
sysdev [POWERPC] mpic: Fix use of uninitialized variable 2008-05-23 16:15:37 +10:00
xmon [POWERPC] spufs: fix concurrent delivery of class 0 & 1 exceptions 2008-05-05 13:33:44 +10:00
.gitignore
Kconfig
Kconfig.debug
Makefile