Commit 2c6b0218 authored by Juergen Gross's avatar Juergen Gross Committed by Thomas Gleixner

irq: Simplify condition in irq_matrix_reserve()

The if condition in irq_matrix_reserve() can be much simpler.

While at it fix a typo in the comment.
Signed-off-by: default avatarJuergen Gross <jgross@suse.com>
Signed-off-by: default avatarThomas Gleixner <tglx@linutronix.de>
Link: https://lore.kernel.org/r/20210211070953.5914-1-jgross@suse.com
parent ba9e6cab
...@@ -337,15 +337,14 @@ void irq_matrix_assign(struct irq_matrix *m, unsigned int bit) ...@@ -337,15 +337,14 @@ void irq_matrix_assign(struct irq_matrix *m, unsigned int bit)
* irq_matrix_reserve - Reserve interrupts * irq_matrix_reserve - Reserve interrupts
* @m: Matrix pointer * @m: Matrix pointer
* *
* This is merily a book keeping call. It increments the number of globally * This is merely a book keeping call. It increments the number of globally
* reserved interrupt bits w/o actually allocating them. This allows to * reserved interrupt bits w/o actually allocating them. This allows to
* setup interrupt descriptors w/o assigning low level resources to it. * setup interrupt descriptors w/o assigning low level resources to it.
* The actual allocation happens when the interrupt gets activated. * The actual allocation happens when the interrupt gets activated.
*/ */
void irq_matrix_reserve(struct irq_matrix *m) void irq_matrix_reserve(struct irq_matrix *m)
{ {
if (m->global_reserved <= m->global_available && if (m->global_reserved == m->global_available)
m->global_reserved + 1 > m->global_available)
pr_warn("Interrupt reservation exceeds available resources\n"); pr_warn("Interrupt reservation exceeds available resources\n");
m->global_reserved++; m->global_reserved++;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment