|
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [xen staging] wait: drop wake_up_{all,one}()
commit 88009f9edded12b65d0ff68e21fa4e96d08ca546
Author: Jan Beulich <jbeulich@xxxxxxxx>
AuthorDate: Tue Feb 24 09:19:44 2026 +0100
Commit: Jan Beulich <jbeulich@xxxxxxxx>
CommitDate: Tue Feb 24 10:30:10 2026 +0100
wait: drop wake_up_{all,one}()
wake_up_one() isn't used at all, so violates Misra rule 2.1 (unreachable
code). wake_up_all() is only used locally, yet rather than making it
static its sole user can invoke wake_up_nr() in the intended way directly.
Signed-off-by: Jan Beulich <jbeulich@xxxxxxxx>
Reviewed-by: Andrew Cooper <andrew.cooper3@xxxxxxxxxx>
---
xen/common/wait.c | 12 +-----------
xen/include/xen/wait.h | 2 --
2 files changed, 1 insertion(+), 13 deletions(-)
diff --git a/xen/common/wait.c b/xen/common/wait.c
index 9a11dccb5d..2a12055f78 100644
--- a/xen/common/wait.c
+++ b/xen/common/wait.c
@@ -87,7 +87,7 @@ void init_waitqueue_head(struct waitqueue_head *wq)
void destroy_waitqueue_head(struct waitqueue_head *wq)
{
- wake_up_all(wq);
+ wake_up_nr(wq, UINT_MAX);
}
void wake_up_nr(struct waitqueue_head *wq, unsigned int nr)
@@ -107,16 +107,6 @@ void wake_up_nr(struct waitqueue_head *wq, unsigned int nr)
spin_unlock(&wq->lock);
}
-void wake_up_one(struct waitqueue_head *wq)
-{
- wake_up_nr(wq, 1);
-}
-
-void wake_up_all(struct waitqueue_head *wq)
-{
- wake_up_nr(wq, UINT_MAX);
-}
-
#ifdef CONFIG_X86
static void __prepare_to_wait(struct waitqueue_vcpu *wqv)
diff --git a/xen/include/xen/wait.h b/xen/include/xen/wait.h
index e3510431ac..f2cac62963 100644
--- a/xen/include/xen/wait.h
+++ b/xen/include/xen/wait.h
@@ -31,8 +31,6 @@ void destroy_waitqueue_head(struct waitqueue_head *wq);
/* Wake VCPU(s) waiting on specified waitqueue. */
void wake_up_nr(struct waitqueue_head *wq, unsigned int nr);
-void wake_up_one(struct waitqueue_head *wq);
-void wake_up_all(struct waitqueue_head *wq);
/* Wait on specified waitqueue until @condition is true. */
#define wait_event(wq, condition) \
--
generated by git-patchbot for /home/xen/git/xen.git#staging
|
![]() |
Lists.xenproject.org is hosted with RackSpace, monitoring our |