From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from casper.infradead.org (casper.infradead.org [90.155.50.34]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 866703E1713 for ; Wed, 19 Aug 2026 08:07:55 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=90.155.50.34 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1787126879; cv=none; b=qRs+5FQGx140AueUWg0680ceItwFaOOctE4Npl3D3j/KG194CEewPF2nOxrEvl1LZjparVGeZi6H8KxWGSZQ4eswyLBtXXtuIULwEowaYOyAe6gLkqQ6lOlW3vY+wD3xknPoJdTLcZN90qLlk7EdmEsOTAdYtjtmyyd0f70HimE= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1787126879; c=relaxed/simple; bh=Qbf+vDvgOhq60OywjbnJ8g871CgWPw2lv4XJ+i9xcmo=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=h0bMSrBUOASKZS6en3Lzf63SIfBfl9RH8jkRUrMGgGurQmccwxDUDtr2756XA0jGXYLlB3d5iGEXsk1vwz/0zws3j6Sn3wrLlUSE2+SigJamAb8WS+5gF2mJ+KHBulypHOwf4uuxjO2ZPkEo+aCJj+9KW505BTbrL8DAGr/lAKY= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=infradead.org; spf=pass smtp.mailfrom=infradead.org; dkim=pass (2048-bit key) header.d=infradead.org header.i=@infradead.org header.b=Ec8aSGzj; arc=none smtp.client-ip=90.155.50.34 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=infradead.org Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=infradead.org Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=infradead.org header.i=@infradead.org header.b="Ec8aSGzj" DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=casper.20170209; h=In-Reply-To:Content-Type:MIME-Version: References:Message-ID:Subject:Cc:To:From:Date:Sender:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description; bh=Ped+D99JhoZ/i/rxXRBAqyHjZyC6V9ZLpNkhRSTkHVU=; b=Ec8aSGzj+qyrgZ6cGxUNZR6PFI RR86YYATrHSdUNSWuOeJOTzWI4kr5P38fpkCLjB9rwD1mHqYsKODHVlRWw6Y/WOMhtYeJpTRP81fD WFxVfFQGrL9sNLFcUwYX/0cT6T6pis621n4vaLfjxzlPpMUPITnALQXwk6AMUc2KKKOJvZ2HOn9Fo KXw5kGP6q2BeNCtYkpuoBR6xAkExYkBS3zm3cYsxu41fxxu/kwztWbkBNsPl94/+GfFC1G4poOKZY y+iFjReA/gllu5LtfJLn12UwVhKXPtwSgEhe35FSsGmhWtcX5uO6e0nSVBjPVkF5KVKHc7Tuj/o5c 3AxZb4Tg==; Received: from 77-249-17-252.cable.dynamic.v4.ziggo.nl ([77.249.17.252] helo=noisy.programming.kicks-ass.net) by casper.infradead.org with esmtpsa (Exim 4.99.1 #2 (Red Hat Linux)) id 1wwbKr-0000000DKyM-0UFj; Wed, 19 Aug 2026 08:07:45 +0000 Received: by noisy.programming.kicks-ass.net (Postfix, from userid 1000) id 3187F30030F; Wed, 19 Aug 2026 10:07:44 +0200 (CEST) Date: Wed, 19 Aug 2026 10:07:44 +0200 From: Peter Zijlstra 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@vger.kernel.org Subject: Re: [PATCH] sched: Remove unneeded function type cast in do_balance_callbacks() Message-ID: <20260819080744.GF1247881@noisy.programming.kicks-ass.net> References: <20260819080159.105433-1-vz@kernel.org> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline 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 > --- > 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 >