2012-06-11 07:43:12

by Alexander Gordeev

[permalink] [raw]
Subject: [Fw: Re: [PATCH] x86, acpi/irq: Minor readability cleanup of gsi_to_irq()]

Hi Ingo,

This patch probably get lost.
Should I repost?

----- Forwarded message from "Eric W. Biederman" <[email protected]> -----

Date: Fri, 30 Mar 2012 00:15:05 -0700
From: "Eric W. Biederman" <[email protected]>
To: Alexander Gordeev <[email protected]>
Cc: "H. Peter Anvin" <[email protected]>, [email protected]
Subject: Re: [PATCH] x86, acpi/irq: Minor readability cleanup of gsi_to_irq()
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.2 (gnu/linux)

Alexander Gordeev <[email protected]> writes:

> Init value of 'irq' variable is never used. So do not initialize it.

Reviewed-by: "Eric W. Biederman" <[email protected]>

> Signed-off-by: Alexander Gordeev <[email protected]>
> ---

Looks good to me. I was going to ask what idiot wrote that silly
thing but it appears that idiot was me. I must have rewritten
the function and forgotten to cleanup that initial assignment to irq.

That change makes it much clearer what is going on thank you.

Eric

> 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

----- End forwarded message -----

--
Regards,
Alexander Gordeev
[email protected]


2012-06-11 08:37:32

by Ingo Molnar

[permalink] [raw]
Subject: Re: [Fw: Re: [PATCH] x86, acpi/irq: Minor readability cleanup of gsi_to_irq()]


* Alexander Gordeev <[email protected]> wrote:

> Hi Ingo,
>
> This patch probably get lost.
> Should I repost?

Yeah, please do.

Btw., it was not missed but is the regular workflow: when
there's review feedback and it's resolved via a Reviewed-by
somewhere inside the discussion then you should resend the same
patch but with the Reviewed-by tag added. (and all reviewers and
affected maintainers Cc:-ed.)

Thanks,

Ingo