Skip to content

Commit 70b66cb

Browse files
Ivan Kokshayskytorvalds
authored andcommitted
alpha: nautilus - fix compile failure with gcc-4.3
init_srm_irq() deals with irq's raspberrypi#16 and above, but size of irq_desc array on nautilus and some other system types is 16. So gcc-4.3 complains that "array subscript is above array bounds", even though this function is never called on those systems. This adds a check for NR_IRQS <= 16, which effectively optimizes init_srm_irq() code away on problematic platforms. Thanks to Daniel Drake <dsd@gentoo.org> for detailed analysis of the problem. Signed-off-by: Ivan Kokshaysky <ink@jurassic.park.msu.ru> Cc: Richard Henderson <rth@twiddle.net> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
1 parent 46666d8 commit 70b66cb

1 file changed

Lines changed: 2 additions & 0 deletions

File tree

‎arch/alpha/kernel/irq_srm.c‎

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -63,6 +63,8 @@ init_srm_irqs(long max, unsigned long ignore_mask)
6363
{
6464
long i;
6565

66+
if (NR_IRQS <= 16)
67+
return;
6668
for (i = 16; i < max; ++i) {
6769
if (i < 64 && ((ignore_mask >> i) & 1))
6870
continue;

0 commit comments

Comments
 (0)