History

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.

Juergen Gross committed 5 years ago

Commit 2c6b0211 parent ba9e6ca1 file · +2 −3Browse files

Unified · Split

kernel/irq/matrix.c+2−3
@@ -337,15 +337,14 @@ void irq_matrix_assign(struct irq_matrix *m, unsigned int bit) · 336 unmodified lines
337 * irq_matrix_reserve - Reserve interrupts337 * irq_matrix_reserve - Reserve interrupts
338 * @m: Matrix pointer338 * @m: Matrix pointer
339 *339 *
340 * This is merily a book keeping call. It increments the number of globally340 * This is merely a book keeping call. It increments the number of globally
341 * reserved interrupt bits w/o actually allocating them. This allows to341 * reserved interrupt bits w/o actually allocating them. This allows to
342 * setup interrupt descriptors w/o assigning low level resources to it.342 * setup interrupt descriptors w/o assigning low level resources to it.
343 * The actual allocation happens when the interrupt gets activated.343 * The actual allocation happens when the interrupt gets activated.
344 */344 */
345void irq_matrix_reserve(struct irq_matrix *m)345void irq_matrix_reserve(struct irq_matrix *m)
346{346{
347 if (m->global_reserved <= m->global_available &&347 if (m->global_reserved == m->global_available)
348 m->global_reserved + 1 > m->global_available)
349 pr_warn("Interrupt reservation exceeds available resources\n");348 pr_warn("Interrupt reservation exceeds available resources\n");
350 349
351 m->global_reserved++;350 m->global_reserved++;

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t