Re: [PATCH] serialize assign_irq_vector() use of static variables

From: Randy.Dunlap
Date: Wed Apr 26 2006 - 11:51:02 EST


On Wed, 26 Apr 2006 16:07:53 +0200 Jan Beulich wrote:

> Since assign_irq_vector() can be called at runtime, its access of static
> variables should be protected by a lock.
>
> Signed-off-by: Jan Beulich <jbeulich@xxxxxxxxxx>

Hi,
Would you include diffstat output also, as mentioned (optional)
in Documentation/SubmittingPatches? I'd really like to see a list
of patched files without having to scan the entire patch.
Thanks.

Oh, the diff filenames should begin at the linux-2.x.y level so
that they can be applied with patch -p1.
Lots of tools know how to do this.

> diff -Npru /home/jbeulich/tmp/linux-2.6.17-rc2/arch/i386/kernel/io_apic.c
> 2.6.17-rc2-x86-assign_irq_vector-lock/arch/i386/kernel/io_apic.c
> --- /home/jbeulich/tmp/linux-2.6.17-rc2/arch/i386/kernel/io_apic.c 2006-04-26 10:55:11.000000000 +0200
> +++ 2.6.17-rc2-x86-assign_irq_vector-lock/arch/i386/kernel/io_apic.c 2006-04-25 15:38:32.000000000 +0200
> @@ -1163,16 +1170,21 @@ next:
>
> if (current_vector >= FIRST_SYSTEM_VECTOR) {
> offset++;
> - if (!(offset%8))
> + if (!(offset%8)) {

Use better spacing here: (offset % 8)

> + spin_unlock(&vector_lock);
> return -ENOSPC;
> + }
> current_vector = FIRST_DEVICE_VECTOR + offset;
> }
>

---
~Randy
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/