mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH] sched: Remove unneeded function type cast in do_balance_callbacks()
@ 2026-08-19  8:01 Vladimir Zapolskiy
  2026-08-19  8:07 ` Peter Zijlstra
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: Vladimir Zapolskiy @ 2026-08-19  8:01 UTC (permalink / raw)
  To: Ingo Molnar, Peter Zijlstra, Juri Lelli, Vincent Guittot
  Cc: Dietmar Eggemann, Steven Rostedt, Ben Segall, Mel Gorman,
	Valentin Schneider, K Prateek Nayak, linux-kernel

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.

Signed-off-by: Vladimir Zapolskiy <vz@kernel.org>
---
 kernel/sched/core.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/kernel/sched/core.c b/kernel/sched/core.c
index f5f7ff8c680a..63956d8c3db6 100644
--- a/kernel/sched/core.c
+++ b/kernel/sched/core.c
@@ -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;
-- 
2.51.0


^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH] sched: Remove unneeded function type cast in do_balance_callbacks()
  2026-08-19  8:01 [PATCH] sched: Remove unneeded function type cast in do_balance_callbacks() Vladimir Zapolskiy
@ 2026-08-19  8:07 ` Peter Zijlstra
  2026-09-02  7:54 ` [tip: sched/core] " tip-bot2 for Vladimir Zapolskiy
  2026-09-02  8:32 ` tip-bot2 for Vladimir Zapolskiy
  2 siblings, 0 replies; 4+ messages in thread
From: Peter Zijlstra @ 2026-08-19  8:07 UTC (permalink / raw)
  To: Vladimir Zapolskiy
  Cc: Ingo Molnar, Juri Lelli, Vincent Guittot, Dietmar Eggemann,
	Steven Rostedt, Ben Segall, Mel Gorman, Valentin Schneider,
	K Prateek Nayak, linux-kernel

On Wed, Aug 19, 2026 at 11:01:58AM +0300, Vladimir Zapolskiy wrote:
> 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.

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").


> Signed-off-by: Vladimir Zapolskiy <vz@kernel.org>
> ---
>  kernel/sched/core.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/kernel/sched/core.c b/kernel/sched/core.c
> index f5f7ff8c680a..63956d8c3db6 100644
> --- a/kernel/sched/core.c
> +++ b/kernel/sched/core.c
> @@ -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;
> -- 
> 2.51.0
> 

^ permalink raw reply	[flat|nested] 4+ messages in thread

* [tip: sched/core] sched: Remove unneeded function type cast in do_balance_callbacks()
  2026-08-19  8:01 [PATCH] sched: Remove unneeded function type cast in do_balance_callbacks() Vladimir Zapolskiy
  2026-08-19  8:07 ` Peter Zijlstra
@ 2026-09-02  7:54 ` tip-bot2 for Vladimir Zapolskiy
  2026-09-02  8:32 ` tip-bot2 for Vladimir Zapolskiy
  2 siblings, 0 replies; 4+ messages in thread
From: tip-bot2 for Vladimir Zapolskiy @ 2026-09-02  7:54 UTC (permalink / raw)
  To: linux-tip-commits
  Cc: Vladimir Zapolskiy, Peter Zijlstra (Intel), x86, linux-kernel

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 <vz@kernel.org>
AuthorDate:    Wed, 19 Aug 2026 11:01:58 +03:00
Committer:     Peter Zijlstra <peterz@infradead.org>
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.

Signed-off-by: Vladimir Zapolskiy <vz@kernel.org>
Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org>
Link: https://patch.msgid.link/20260819080159.105433-1-vz@kernel.org
---
 kernel/sched/core.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/kernel/sched/core.c b/kernel/sched/core.c
index 4e97766..545f494 100644
--- a/kernel/sched/core.c
+++ b/kernel/sched/core.c
@@ -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;

^ permalink raw reply	[flat|nested] 4+ messages in thread

* [tip: sched/core] sched: Remove unneeded function type cast in do_balance_callbacks()
  2026-08-19  8:01 [PATCH] sched: Remove unneeded function type cast in do_balance_callbacks() Vladimir Zapolskiy
  2026-08-19  8:07 ` Peter Zijlstra
  2026-09-02  7:54 ` [tip: sched/core] " tip-bot2 for Vladimir Zapolskiy
@ 2026-09-02  8:32 ` tip-bot2 for Vladimir Zapolskiy
  2 siblings, 0 replies; 4+ messages in thread
From: tip-bot2 for Vladimir Zapolskiy @ 2026-09-02  8:32 UTC (permalink / raw)
  To: linux-tip-commits
  Cc: Vladimir Zapolskiy, Peter Zijlstra (Intel), x86, linux-kernel

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 <vz@kernel.org>
AuthorDate:    Wed, 19 Aug 2026 11:01:58 +03:00
Committer:     Peter Zijlstra <peterz@infradead.org>
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.

Signed-off-by: Vladimir Zapolskiy <vz@kernel.org>
Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org>
Link: https://patch.msgid.link/20260819080159.105433-1-vz@kernel.org
---
 kernel/sched/core.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/kernel/sched/core.c b/kernel/sched/core.c
index 4e97766..545f494 100644
--- a/kernel/sched/core.c
+++ b/kernel/sched/core.c
@@ -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;

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2026-09-02  8:33 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-08-19  8:01 [PATCH] sched: Remove unneeded function type cast in do_balance_callbacks() Vladimir Zapolskiy
2026-08-19  8:07 ` Peter Zijlstra
2026-09-02  7:54 ` [tip: sched/core] " tip-bot2 for Vladimir Zapolskiy
2026-09-02  8:32 ` tip-bot2 for Vladimir Zapolskiy

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®