The Linux Kernel Mailing List
 help / color / mirror / Atom feed
From: Peter Zijlstra <peterz@infradead.org>
To: Vladimir Zapolskiy <vz@kernel.org>
Cc: Ingo Molnar <mingo@redhat.com>,
	Juri Lelli <juri.lelli@redhat.com>,
	Vincent Guittot <vincent.guittot@linaro.org>,
	Dietmar Eggemann <dietmar.eggemann@arm.com>,
	Steven Rostedt <rostedt@goodmis.org>,
	Ben Segall <bsegall@google.com>, Mel Gorman <mgorman@suse.de>,
	Valentin Schneider <vschneid@redhat.com>,
	K Prateek Nayak <kprateek.nayak@amd.com>,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH] sched: Remove unneeded function type cast in do_balance_callbacks()
Date: Wed, 19 Aug 2026 10:07:44 +0200	[thread overview]
Message-ID: <20260819080744.GF1247881@noisy.programming.kicks-ass.net> (raw)
In-Reply-To: <20260819080159.105433-1-vz@kernel.org>

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
> 

      reply	other threads:[~2026-08-19  8:07 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
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 [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20260819080744.GF1247881@noisy.programming.kicks-ass.net \
    --to=peterz@infradead.org \
    --cc=bsegall@google.com \
    --cc=dietmar.eggemann@arm.com \
    --cc=juri.lelli@redhat.com \
    --cc=kprateek.nayak@amd.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mgorman@suse.de \
    --cc=mingo@redhat.com \
    --cc=rostedt@goodmis.org \
    --cc=vincent.guittot@linaro.org \
    --cc=vschneid@redhat.com \
    --cc=vz@kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox