Skip to content

Commit c02cf5f

Browse files
anish198519851985ingomolnar
authored andcommitted
irq_work: Remove return value from the irq_work_queue() function
As no one is using the return value of irq_work_queue(), so it is better to just make it void. Signed-off-by: anish kumar <anish198519851985@gmail.com> Acked-by: Steven Rostedt <rostedt@goodmis.org> [ Fix stale comments, remove now unnecessary __irq_work_queue() intermediate function ] Signed-off-by: Frederic Weisbecker <fweisbec@gmail.com> Link: http://lkml.kernel.org/r/1359925703-24304-1-git-send-email-fweisbec@gmail.com Signed-off-by: Ingo Molnar <mingo@kernel.org>
1 parent 786133f commit c02cf5f

2 files changed

Lines changed: 11 additions & 22 deletions

File tree

‎include/linux/irq_work.h‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ void init_irq_work(struct irq_work *work, void (*func)(struct irq_work *))
1616
work->func = func;
1717
}
1818

19-
bool irq_work_queue(struct irq_work *work);
19+
void irq_work_queue(struct irq_work *work);
2020
void irq_work_run(void);
2121
void irq_work_sync(struct irq_work *work);
2222

‎kernel/irq_work.c‎

Lines changed: 10 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -63,12 +63,20 @@ void __weak arch_irq_work_raise(void)
6363
}
6464

6565
/*
66-
* Queue the entry and raise the IPI if needed.
66+
* Enqueue the irq_work @entry unless it's already pending
67+
* somewhere.
68+
*
69+
* Can be re-enqueued while the callback is still in progress.
6770
*/
68-
static void __irq_work_queue(struct irq_work *work)
71+
void irq_work_queue(struct irq_work *work)
6972
{
7073
bool empty;
7174

75+
/* Only queue if not already pending */
76+
if (!irq_work_claim(work))
77+
return;
78+
79+
/* Queue the entry and raise the IPI if needed. */
7280
preempt_disable();
7381

7482
empty = llist_add(&work->llnode, &__get_cpu_var(irq_work_list));
@@ -78,25 +86,6 @@ static void __irq_work_queue(struct irq_work *work)
7886

7987
preempt_enable();
8088
}
81-
82-
/*
83-
* Enqueue the irq_work @entry, returns true on success, failure when the
84-
* @entry was already enqueued by someone else.
85-
*
86-
* Can be re-enqueued while the callback is still in progress.
87-
*/
88-
bool irq_work_queue(struct irq_work *work)
89-
{
90-
if (!irq_work_claim(work)) {
91-
/*
92-
* Already enqueued, can't do!
93-
*/
94-
return false;
95-
}
96-
97-
__irq_work_queue(work);
98-
return true;
99-
}
10089
EXPORT_SYMBOL_GPL(irq_work_queue);
10190

10291
/*

0 commit comments

Comments
 (0)