lkml.org 
[lkml]   [2012]   [Mar]   [29]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Date
From
Subject[PATCH] x86, acpi/irq: Minor readability cleanup of gsi_to_irq()
Init value of 'irq' variable is never used. So do not initialize it.

Signed-off-by: Alexander Gordeev <agordeev@redhat.com>
---
arch/x86/kernel/acpi/boot.c | 10 ++++------
1 files changed, 4 insertions(+), 6 deletions(-)

diff --git a/arch/x86/kernel/acpi/boot.c b/arch/x86/kernel/acpi/boot.c
index 406ed77..f148557 100644
--- a/arch/x86/kernel/acpi/boot.c
+++ b/arch/x86/kernel/acpi/boot.c
@@ -103,13 +103,11 @@ static u32 isa_irq_to_gsi[NR_IRQS_LEGACY] __read_mostly = {

static unsigned int gsi_to_irq(unsigned int gsi)
{
- unsigned int irq = gsi + NR_IRQS_LEGACY;
- unsigned int i;
+ unsigned int irq;

- for (i = 0; i < NR_IRQS_LEGACY; i++) {
- if (isa_irq_to_gsi[i] == gsi) {
- return i;
- }
+ for (irq = 0; irq < NR_IRQS_LEGACY; irq++) {
+ if (isa_irq_to_gsi[irq] == gsi)
+ return irq;
}

/* Provide an identity mapping of gsi == irq
--
1.7.7.6


\
 
 \ /
  Last update: 2012-03-29 18:51    [W:0.286 / U:0.032 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site