linux/include/asm-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
..
2008-01-30 13:34:07 +01:00
2006-01-09 14:49:54 +11:00
2007-07-31 21:12:07 -07:00
2005-09-28 15:42:53 +10:00
2008-02-03 16:32:51 +02:00
2008-02-06 10:41:00 -08:00
2006-12-04 20:39:30 +11:00
2007-10-15 14:29:49 -04:00
2008-02-06 10:41:02 -08:00
2007-03-09 15:03:25 +11:00
2007-03-22 22:52:55 +11:00
2007-07-17 10:23:11 -07:00
2007-10-17 08:42:55 -07:00
2007-10-11 09:14:31 -05:00
2008-04-18 00:46:35 +02:00
2008-05-05 16:47:14 +10:00
2008-04-29 08:06:02 -07:00
2008-01-25 22:52:50 +11:00
2008-04-27 18:21:39 +03:00
2007-05-08 11:15:20 -07:00
2007-06-28 19:16:38 +10:00
2006-02-15 15:32:22 -08:00
2007-10-19 11:53:41 -07:00
2008-04-27 18:21:37 +03:00
2007-08-20 07:28:48 -05:00
2006-12-11 16:35:07 +11:00
2007-05-08 11:15:05 -07:00
2008-03-05 16:34:39 -06:00
2006-06-30 18:20:44 +02:00
2007-04-24 21:31:51 +10:00
2007-05-11 08:29:34 -07:00
2007-12-11 15:43:35 +11:00
2007-06-28 19:19:20 +10:00
2008-04-17 01:01:39 -05:00
2008-03-03 08:03:14 +01:00
2008-04-17 10:42:34 -04:00
2005-11-03 16:24:25 +11:00
2005-11-03 16:02:23 +11:00
2007-05-02 20:04:30 +10:00
2006-10-25 11:54:18 +10:00
2007-05-08 11:54:20 +10:00
2005-11-03 16:59:17 +11:00
2008-02-07 08:42:30 -08:00