lkml.org 
[lkml]   [2010]   [May]   [5]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
Date
Subject[PATCH] x86 acpi/irq: Fix harmless typo.

YH noticed that the function irq_to_gsi has an off by one error
when translating high irq numbers to gsis. Today this bug is harmless
because all of the callers restrict their input to the first 16 irqs
so this bug does not matter, but we should fix it to avoid confusion
and later.

Signed-off-by: Eric W. Biederman <ebiederm@xmission.com>
---
arch/x86/kernel/acpi/boot.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/arch/x86/kernel/acpi/boot.c b/arch/x86/kernel/acpi/boot.c
index c9a5d3f..78222c8 100644
--- a/arch/x86/kernel/acpi/boot.c
+++ b/arch/x86/kernel/acpi/boot.c
@@ -132,7 +132,7 @@ static u32 irq_to_gsi(int irq)
else if (irq <= gsi_end)
gsi = irq;
else if (irq <= (gsi_end + NR_IRQS_LEGACY))
- gsi = irq - gsi_end;
+ gsi = irq - (gsi_end + 1);
else
gsi = 0xffffffff;

--
1.6.5.2.143.g8cc62


\
 
 \ /
  Last update: 2010-05-05 10:55    [W:0.153 / U:21.404 seconds]
©2003-2018 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site