From nobody Fri Dec 19 20:32:52 2025 Received: from smtpout-03.galae.net (smtpout-03.galae.net [185.246.85.4]) (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 A9183301004 for ; Tue, 14 Oct 2025 15:25:49 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=185.246.85.4 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1760455551; cv=none; b=bHo1kZ7G7Ywn1r9xmH9mVu65J0EdwWmp0sn0JYszzKgZEpvHILp0J5dzlYidrDEdTL/Q0PpII1hbjV0NIyRg72S9KiwmH15LByXJPJK+Wp9oc/Z2yW+kY/xuFjL2D1MPFVdx6mIgNqVi+/65y2+ia9+BxpX+A7s0rXhtWg1NJGg= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1760455551; c=relaxed/simple; bh=rUUnrH/sSuEDfrtW6ug/Kmv3e2YKbWh1q7RDvw2MkE0=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=ZC8vVVMtlOTBOCCJHhfQXXR9K2RCqHDBcDXXrAjw2/KImJGbRJwOU1l/o20s3RdlT3dqtRHM6mAFu0uQui5g9+uPrQ1TaDOxYrLYcsAFvz0QCHFna9Qq8HJcO1Nt3Db3nXtcaPMDjbft0uSaOizV1Hca4YbPzTsXfZAqeaaDvJc= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=bootlin.com; spf=pass smtp.mailfrom=bootlin.com; dkim=pass (2048-bit key) header.d=bootlin.com header.i=@bootlin.com header.b=eOXbD9sD; arc=none smtp.client-ip=185.246.85.4 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=bootlin.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=bootlin.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=bootlin.com header.i=@bootlin.com header.b="eOXbD9sD" Received: from smtpout-01.galae.net (smtpout-01.galae.net [212.83.139.233]) by smtpout-03.galae.net (Postfix) with ESMTPS id 4E63C4E410B5; Tue, 14 Oct 2025 15:25:48 +0000 (UTC) Received: from mail.galae.net (mail.galae.net [212.83.136.155]) by smtpout-01.galae.net (Postfix) with ESMTPS id 234B3606EC; Tue, 14 Oct 2025 15:25:48 +0000 (UTC) Received: from [127.0.0.1] (localhost [127.0.0.1]) by localhost (Mailerdaemon) with ESMTPSA id 5E210102F22A4; Tue, 14 Oct 2025 17:25:45 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bootlin.com; s=dkim; t=1760455547; h=from:subject:date:message-id:to:cc:mime-version:content-type: content-transfer-encoding:in-reply-to:references; bh=pc+arER1ZhOJQit1tkbjRVmQdT2HfO4hl2eG12FrhwE=; b=eOXbD9sDXQw31kaUI+I0rWwhN+0FcVJLuwMC7b2ke4y78MDx/bWgBaKMgz7RH6rbaZJWZ7 FQc+qnq72IEAixUtJAf1Ciz1TxmYMimDhTTzeY1bZPNb8W44WQxILhrai91QwJSpEulyjg oC2pWRaj5onOLWOz0lh0hBIWTkOg2IbXStDRZ++xQnB9T5IvKK6Kat7QZe0D3j4FOeNPIw bdTd50yDNQVWJ8/6I6bjYXbnS5IeUCp2rgd0l0CRlMtQaKzagvrX7b7tl+cI6FhgVmc7bQ Ex469KkNPI0A2xSQT8f3i4hRYf4p08s3mhOIcnOiIOSUboh7NZsbzFN8zerwZw== From: =?utf-8?q?Th=C3=A9o_Lebrun?= Date: Tue, 14 Oct 2025 17:25:05 +0200 Subject: [PATCH net-next 04/15] net: macb: Remove local variables clk_init and init in macb_probe() 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="utf-8" Content-Transfer-Encoding: quoted-printable Message-Id: <20251014-macb-cleanup-v1-4-31cd266e22cd@bootlin.com> References: <20251014-macb-cleanup-v1-0-31cd266e22cd@bootlin.com> In-Reply-To: <20251014-macb-cleanup-v1-0-31cd266e22cd@bootlin.com> To: Andrew Lunn , "David S. Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Nicolas Ferre , Claudiu Beznea , Richard Cochran , Russell King Cc: netdev@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, Vladimir Kondratiev , Tawfik Bayouk , Thomas Petazzoni , =?utf-8?q?Gr=C3=A9gory_Clement?= , =?utf-8?q?Beno=C3=AEt_Monin?= , Maxime Chevallier , =?utf-8?q?Th=C3=A9o_Lebrun?= , Sean Anderson X-Mailer: b4 0.14.2 X-Last-TLS-Session-Version: TLSv1.3 Remove local variables clk_init and init. Those function pointers are always equivalent to macb_config->clk_init and macb_config->init. Reviewed-by: Sean Anderson Signed-off-by: Th=C3=A9o Lebrun --- drivers/net/ethernet/cadence/macb_main.c | 13 +++---------- 1 file changed, 3 insertions(+), 10 deletions(-) diff --git a/drivers/net/ethernet/cadence/macb_main.c b/drivers/net/etherne= t/cadence/macb_main.c index ca2386b8347371810845290f6a7177a326fda4e7..dad1188ef9d87fc384659003299= 5223174177e89 100644 --- a/drivers/net/ethernet/cadence/macb_main.c +++ b/drivers/net/ethernet/cadence/macb_main.c @@ -5424,10 +5424,6 @@ static const struct macb_config default_gem_config = =3D { static int macb_probe(struct platform_device *pdev) { const struct macb_config *macb_config =3D &default_gem_config; - int (*clk_init)(struct platform_device *, struct clk **, - struct clk **, struct clk **, struct clk **, - struct clk **) =3D macb_config->clk_init; - int (*init)(struct platform_device *) =3D macb_config->init; struct device_node *np =3D pdev->dev.of_node; struct clk *pclk, *hclk =3D NULL, *tx_clk =3D NULL, *rx_clk =3D NULL; struct clk *tsu_clk =3D NULL; @@ -5449,14 +5445,11 @@ static int macb_probe(struct platform_device *pdev) const struct of_device_id *match; =20 match =3D of_match_node(macb_dt_ids, np); - if (match && match->data) { + if (match && match->data) macb_config =3D match->data; - clk_init =3D macb_config->clk_init; - init =3D macb_config->init; - } } =20 - err =3D clk_init(pdev, &pclk, &hclk, &tx_clk, &rx_clk, &tsu_clk); + err =3D macb_config->clk_init(pdev, &pclk, &hclk, &tx_clk, &rx_clk, &tsu_= clk); if (err) return err; =20 @@ -5594,7 +5587,7 @@ static int macb_probe(struct platform_device *pdev) bp->phy_interface =3D interface; =20 /* IP specific init */ - err =3D init(pdev); + err =3D macb_config->init(pdev); if (err) goto err_out_free_netdev; =20 --=20 2.51.0