From nobody Sun Feb 8 09:22:56 2026 Received: from pidgin.makrotopia.org (pidgin.makrotopia.org [185.142.180.65]) (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 4E6AC2D8DD9; Mon, 5 Jan 2026 16:39:33 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=185.142.180.65 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1767631178; cv=none; b=IzMAo04ZRjFWg3Thwmx/DWPy9dMx5vEhjx6B+AmXRzb2T/R5KfTJS+Lr0+RzWcCz6VoxyUGN542Y6gIOAyj1kZxN9qRDiljs0tW1Ubo0NQD/4b3WW9DAJu4XqjWNLBbIs0ea1aQDlZD2D0AQTEbt25yQS81uqTz3FPVQOAJIVE8= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1767631178; c=relaxed/simple; bh=iyNTJho95yZntWYL1oKISWYbwiehceitYDeeeo3NiOQ=; h=Date:From:To:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=i4szUYImhgZalxX4LeE8s7Cz07o2jqDGek6hO7ejSbqqLDlz70zLyi/msjSkULMWGoHxmRFdsq7uiQZLnqXIbI4zLi/E5NgYoemQAs7Dy+aNywKK4k8/V35qXf4VaonXBjJsjoWqpsFhylP8Y1xxRfz45QsyLfOvQ2lc/LsmlDY= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=makrotopia.org; spf=pass smtp.mailfrom=makrotopia.org; arc=none smtp.client-ip=185.142.180.65 Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=makrotopia.org Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=makrotopia.org Received: from local by pidgin.makrotopia.org with esmtpsa (TLS1.3:TLS_AES_256_GCM_SHA384:256) (Exim 4.99) (envelope-from ) id 1vcnc8-000000000zu-3lqw; Mon, 05 Jan 2026 16:39:28 +0000 Date: Mon, 5 Jan 2026 16:39:26 +0000 From: Daniel Golle To: Andrew Lunn , Heiner Kallweit , Russell King , "David S. Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , Vladimir Oltean , Michael Klein , Daniel Golle , Aleksander Jan Bajkowski , Bevan Weiss , netdev@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH net-next v2 5/5] net: phy: realtek: get rid of magic number in rtlgen_read_status() Message-ID: References: Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" Use newly introduced helper macros RTL822X_VND2_TO_PAGE and RTL822X_VND2_TO_PAGE_REG to access RTL_VEND2_PHYSR register over Clause-22 paged access instead of using magic numbers. Signed-off-by: Daniel Golle Reviewed-by: Maxime Chevallier --- v2: no changes drivers/net/phy/realtek/realtek_main.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/net/phy/realtek/realtek_main.c b/drivers/net/phy/realt= ek/realtek_main.c index d1c7935a13acc..eb5b540ada0e5 100644 --- a/drivers/net/phy/realtek/realtek_main.c +++ b/drivers/net/phy/realtek/realtek_main.c @@ -1154,7 +1154,8 @@ static int rtlgen_read_status(struct phy_device *phyd= ev) if (!phydev->link) return 0; =20 - val =3D phy_read_paged(phydev, 0xa43, 0x12); + val =3D phy_read_paged(phydev, RTL822X_VND2_TO_PAGE(RTL_VND2_PHYSR), + RTL822X_VND2_TO_PAGE_REG(RTL_VND2_PHYSR)); if (val < 0) return val; =20 --=20 2.52.0