From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from phobos.denx.de (phobos.denx.de [85.214.62.61]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id E8D87C7618A for ; Sun, 19 Mar 2023 17:12:59 +0000 (UTC) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 82DB185D15; Sun, 19 Mar 2023 18:10:37 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=pass (p=reject dis=none) header.from=mailbox.org Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Authentication-Results: phobos.denx.de; dkim=pass (2048-bit key; secure) header.d=mailbox.org header.i=@mailbox.org header.b="MEaH8Ne2"; dkim=pass (2048-bit key) header.d=mailbox.org header.i=@mailbox.org header.b="i3SR94DS"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 4DF9985C45; Sun, 19 Mar 2023 18:07:30 +0100 (CET) Received: from mout-p-101.mailbox.org (mout-p-101.mailbox.org [80.241.56.151]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) (No client certificate requested) by phobos.denx.de (Postfix) with ESMTPS id E32A085D0B for ; Sun, 19 Mar 2023 18:05:54 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=pass (p=reject dis=none) header.from=mailbox.org Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=marek.vasut+renesas@mailbox.org Received: from smtp2.mailbox.org (smtp2.mailbox.org [10.196.197.2]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (P-384) server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by mout-p-101.mailbox.org (Postfix) with ESMTPS id 4Pfklh2xzDz9scX; Sun, 19 Mar 2023 18:05:52 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=mailbox.org; s=mail20150812; t=1679245552; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=TO+62RtQhfcAj4sqHVhclxl8P7FZWAnOMGmeuuR3W9A=; b=MEaH8Ne2+xyWkKufjqxRwtcfcz3nHEfofSGuH4tpiNPF520k0aMpuA2Wh772XIU25TmMfw HYlXxMIZMwART6TIFfCH7R6mob+rQv5By7RkOHF+ToI5LVvTWUaXnItNJSpW3+/Im5gYes 8bRers1Xbr1WTygbQZN+30OMPt2z9xEmDDCdYacDM9qgxeNFKoG0B7aeOME7FufondyuXj 4iqEc1glB3qfHaCXLJ134EIrDP27tylZ9EMrQxNnXcIErrcpO3PX9iY2TqzQQnNe8csHCE 2/fjCRfR3uRcgr/VWg2B7KJijO4id4mNafkq2o/BWPrKqjDDJRDTD76yc5GpPg== From: Marek Vasut DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=mailbox.org; s=mail20150812; t=1679245550; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=TO+62RtQhfcAj4sqHVhclxl8P7FZWAnOMGmeuuR3W9A=; b=i3SR94DS9ybvQjSsj8Yevmss0Y+e2qRM+7LxBzhhgX59oLmKfDc5uwfdjZCgNEf8b837Gy QodUj8y3K4corjh8MDS8HrYJtLEXk7oepMfrCQZJHk04+k9e+MgRHoprQVws15p80wakUx 3uND0rWQXIKh+BJONzM6m85Mig7087kca/fF23yU0ixEvaGORRmuGASOFNXJ3qmBBU2q3a ku8EGvbmMrD2XR1MreRSGrNmmhYiKmzwun+QOFDSV2UhRfUFggv22thFAAYB+mbzuEQHk9 C4Z/IlTnWXYntsMdwyvIzl1YxJ2m4QLlvhmkH7z1Peawcq+Flhs1ojhe0WItLw== To: u-boot@lists.denx.de Cc: Marek Vasut , "Ariel D'Alessandro" , =?UTF-8?q?C=C3=A9dric=20Le=20Goater?= , =?UTF-8?q?Marek=20Beh=C3=BAn?= , Alex Nemirovsky , Haolin Li , Heinrich Schuchardt , Joe Hershberger , Joel Stanley , Josua Mayer , Michael Trimarchi , Michal Simek , Nate Drude , Neil Armstrong , Radu Pirea , Ramon Fried , Samuel Mendoza-Jonas , Stefan Roese , T Karthik Reddy , Tim Harvey , Vladimir Oltean , u-boot-amlogic@groups.io Subject: [PATCH 40/41] net: phy: Re-inline phy_drv_reloc() Date: Sun, 19 Mar 2023 18:03:16 +0100 Message-Id: <20230319170317.27711-40-marek.vasut+renesas@mailbox.org> In-Reply-To: <20230319170317.27711-1-marek.vasut+renesas@mailbox.org> References: <20230319170317.27711-1-marek.vasut+renesas@mailbox.org> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-MBO-RS-ID: b463828afc8e1d448b2 X-MBO-RS-META: fq7414aznuumphiuymt5dt5zd113ik51 X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.39 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" X-Virus-Scanned: clamav-milter 0.103.8 at phobos.denx.de X-Virus-Status: Clean Wrap phy_drv_reloc() back into phy_init() to reduce ifdeffery, since phy_drv_reloc() is now called only from one call site. No functional change. Signed-off-by: Marek Vasut --- Cc: "Ariel D'Alessandro" Cc: "Cédric Le Goater" Cc: "Marek Behún" Cc: Alex Nemirovsky Cc: Haolin Li Cc: Heinrich Schuchardt Cc: Joe Hershberger Cc: Joel Stanley Cc: Josua Mayer Cc: Marek Vasut Cc: Michael Trimarchi Cc: Michal Simek Cc: Nate Drude Cc: Neil Armstrong Cc: Radu Pirea Cc: Ramon Fried Cc: Samuel Mendoza-Jonas Cc: Stefan Roese Cc: T Karthik Reddy Cc: Tim Harvey Cc: Vladimir Oltean Cc: u-boot-amlogic@groups.io --- drivers/net/phy/phy.c | 42 ++++++++++++++++++------------------------ 1 file changed, 18 insertions(+), 24 deletions(-) diff --git a/drivers/net/phy/phy.c b/drivers/net/phy/phy.c index 15da9a80de2..61603f28179 100644 --- a/drivers/net/phy/phy.c +++ b/drivers/net/phy/phy.c @@ -463,28 +463,6 @@ U_BOOT_PHY_DRIVER(genphy) = { .shutdown = genphy_shutdown, }; -#ifdef CONFIG_NEEDS_MANUAL_RELOC -static void phy_drv_reloc(struct phy_driver *drv) -{ - if (drv->probe) - drv->probe += gd->reloc_off; - if (drv->config) - drv->config += gd->reloc_off; - if (drv->startup) - drv->startup += gd->reloc_off; - if (drv->shutdown) - drv->shutdown += gd->reloc_off; - if (drv->readext) - drv->readext += gd->reloc_off; - if (drv->writeext) - drv->writeext += gd->reloc_off; - if (drv->read_mmd) - drv->read_mmd += gd->reloc_off; - if (drv->write_mmd) - drv->write_mmd += gd->reloc_off; -} -#endif - int phy_init(void) { #ifdef CONFIG_NEEDS_MANUAL_RELOC @@ -493,8 +471,24 @@ int phy_init(void) /* Perform manual relocation on linker list based PHY drivers */ ll_entry = ll_entry_start(struct phy_driver, phy_driver); - for (drv = ll_entry; drv != ll_entry + ll_n_ents; drv++) - phy_drv_reloc(drv); + for (drv = ll_entry; drv != ll_entry + ll_n_ents; drv++) { + if (drv->probe) + drv->probe += gd->reloc_off; + if (drv->config) + drv->config += gd->reloc_off; + if (drv->startup) + drv->startup += gd->reloc_off; + if (drv->shutdown) + drv->shutdown += gd->reloc_off; + if (drv->readext) + drv->readext += gd->reloc_off; + if (drv->writeext) + drv->writeext += gd->reloc_off; + if (drv->read_mmd) + drv->read_mmd += gd->reloc_off; + if (drv->write_mmd) + drv->write_mmd += gd->reloc_off; + } #endif return 0; -- 2.39.2