From: Alexander Gordeev <agordeev@redhat.com>
To: "H. Peter Anvin" <hpa@zytor.com>
Cc: "Eric W. Biederman" <ebiederm@xmission.com>,
linux-kernel@vger.kernel.org
Subject: [PATCH] x86, acpi/irq: Minor readability cleanup of gsi_to_irq()
Date: Thu, 29 Mar 2012 18:48:32 +0200 [thread overview]
Message-ID: <20120329164828.GD21579@dhcp-26-207.brq.redhat.com> (raw)
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
next reply other threads:[~2012-03-29 16:48 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-03-29 16:48 Alexander Gordeev [this message]
2012-03-30 7:15 ` Eric W. Biederman
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20120329164828.GD21579@dhcp-26-207.brq.redhat.com \
--to=agordeev@redhat.com \
--cc=ebiederm@xmission.com \
--cc=hpa@zytor.com \
--cc=linux-kernel@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®