sched: Remove unneeded function type cast in do_balance_callbacks()
PATCH 1/1 sched: Remove unneeded function type cast in do_balance_callbacks()
It's a trivial and non-functional change, the removed explicit function type cast does not convert the function type of struct balance_callback member (*func), and the cast can be removed.
--- kernel/sched/core.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
kernel/sched/core.c +1 -1
@@ -5126,7 +5126,7 @@ static void do_balance_callbacks(struct rq *rq, struct balance_callback *head)lockdep_assert_rq_held (rq);while (head) { - func = (void (*)(struct rq *))head->func; + func = head->func; next = head->next; head->next =NULL ; head = next;
Signature · 1 line
2.51.0
Peter Zijlstra
maintainerQuoted 3 lines · Vladimir Zapolskiy
It's a trivial and non-functional change, the removed explicit function type cast does not convert the function type of struct
balance_callbackmember (*func), and the cast can be removed.
Right you are; I suspect this was once a struct callback_head. Ah yes, see commit: 8e5bad7dccec ("sched: Introduce struct balance_callback to avoid CFI mismatches").
Quoted 21 lines
Signed-off-by Vladimir Zapolskiy <[email protected]>--- kernel/sched/core.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)kernel/sched/core.c +1
-1@@ -5126,7 +5126,7 @@ static void do_balance_callbacks(struct rq *rq, struct balance_callback *head)lockdep_assert_rq_held (rq);while (head) { - func = (void (*)(struct rq *))head->func; + func = head->func; next = head->next; head->next =NULL ; head = next;Signature · 1 line
2.51.0
The following commit has been merged into the sched/core branch of tip:
The following commit has been merged into the sched/core branch of tip:
Commit-ID: 4248f68fe26da7b741d3b9c6a88a3c5b685377f9 Gitweb: https://git.kernel.org/tip/4248f68fe26da7b741d3b9c6a88a3c5b685377f9 Author: Vladimir Zapolskiy <[email protected]> AuthorDate: Wed, 19 Aug 2026 11:01:58 +03:00 Committer: Peter Zijlstra <[email protected]> CommitterDate: Wed, 02 Sep 2026 09:37:25 +02:00
sched: Remove unneeded function type cast in do_balance_callbacks()
It's a trivial and non-functional change, the removed explicit function type cast does not convert the function type of struct balance_callback member (*func), and the cast can be removed.
--- kernel/sched/core.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
kernel/sched/core.c +1 -1
@@ -5143,7 +5143,7 @@ static void do_balance_callbacks(struct rq *rq, struct balance_callback *head)lockdep_assert_rq_held (rq);while (head) { - func = (void (*)(struct rq *))head->func; + func = head->func; next = head->next; head->next =NULL ; head = next;
The following commit has been merged into the sched/core branch of tip:
The following commit has been merged into the sched/core branch of tip:
Commit-ID: 879eaa76e6086ab4aff77a669bfb50b7db03e0b4 Gitweb: https://git.kernel.org/tip/879eaa76e6086ab4aff77a669bfb50b7db03e0b4 Author: Vladimir Zapolskiy <[email protected]> AuthorDate: Wed, 19 Aug 2026 11:01:58 +03:00 Committer: Peter Zijlstra <[email protected]> CommitterDate: Wed, 02 Sep 2026 10:28:25 +02:00
sched: Remove unneeded function type cast in do_balance_callbacks()
It's a trivial and non-functional change, the removed explicit function type cast does not convert the function type of struct balance_callback member (*func), and the cast can be removed.
--- kernel/sched/core.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
kernel/sched/core.c +1 -1
@@ -5143,7 +5143,7 @@ static void do_balance_callbacks(struct rq *rq, struct balance_callback *head)lockdep_assert_rq_held (rq);while (head) { - func = (void (*)(struct rq *))head->func; + func = head->func; next = head->next; head->next =NULL ; head = next;