🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Thread View: linux.kernel.netdev
2 messages
2 total messages Started by Christian Marangi Thu, 12 Nov 2026 13:13
[PATCH net-next 2/2] net: phy: fix trivial whitespace/format issue
#15179
Author: Christian Marangi
Date: Thu, 12 Nov 2026 13:13
63 lines
12939 bytes
Running checkpatch on phylink code, points out some trivial issue with
whitespace instead of tab, if-else condition with a return in the if
condition and manually printing the function name instead of using
__func__.

Fix all of these trivial issue to mute checkpatch warning.

Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
---
 drivers/net/phy/phylink.c | 14 ++++++++------
 1 file changed, 8 insertions(+), 6 deletions(-)

diff --git a/drivers/net/phy/phylink.c b/drivers/net/phy/phylink.c
index bf1962e572f8..e7734e45376c 100644
--- a/drivers/net/phy/phylink.c
+++ b/drivers/net/phy/phylink.c
@@ -3151,7 +3151,7 @@ int phylink_ethtool_ksettings_get(struct phylink *pl,
 EXPORT_SYMBOL_GPL(phylink_ethtool_ksettings_get);
 
 static bool phylink_validate_pcs_inband_autoneg(struct phylink *pl,
-					        phy_interface_t interface,
+						phy_interface_t interface,
 						unsigned long *adv)
 {
 	unsigned int inband = phylink_inband_caps(pl, interface);
@@ -4080,12 +4080,12 @@ static int phylink_sfp_module_start(void *upstream)
 	if (pl->phydev) {
 		phy_start(pl->phydev);
 		return 0;
-	} else {
-		ret = phylink_add_sfp_mod_port(pl);
-		if (ret)
-			return ret;
 	}
 
+	ret = phylink_add_sfp_mod_port(pl);
+	if (ret)
+		return ret;
+
 	/* If the module may have a PHY but we didn't detect one we
 	 * need to configure the MAC here.
 	 */
@@ -4207,6 +4207,7 @@ void phylink_resolve_c73(struct phylink_link_state *state)
 
 	for (i = 0; i < ARRAY_SIZE(phylink_c73_priority_resolution); i++) {
 		int bit = phylink_c73_priority_resolution[i].bit;
+
 		if (linkmode_test_bit(bit, state->advertising) &&
 		    linkmode_test_bit(bit, state->lp_advertising))
 			break;
@@ -4635,7 +4636,8 @@ void phylink_replay_link_end(struct phylink *pl)
 
 	if (WARN(!test_bit(PHYLINK_DISABLE_REPLAY,
 			   &pl->phylink_disable_state),
-		 "phylink_replay_link_end() called without a prior phylink_replay_link_begin()\n"))
+		 "%s called without a prior phylink_replay_link_begin()\n",
+		 __func__))
 		return;
 
 	pl->force_major_config = true;
-- 
2.55.0
Re: [PATCH net-next 2/2] net: phy: fix trivial whitespace/format issue
#15773
Author: Andrew Lunn
Date: Fri, 13 Nov 2026 13:57
14 lines
8721 bytes
On Thu, Nov 12, 2026 at 02:13:57PM +0100, Christian Marangi wrote:
> Running checkpatch on phylink code, points out some trivial issue with
> whitespace instead of tab, if-else condition with a return in the if
> condition and manually printing the function name instead of using
> __func__.
> 
> Fix all of these trivial issue to mute checkpatch warning.
> 
> Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>

Reviewed-by: Andrew Lunn <andrew@lunn.ch>

    Andrew
Thread Navigation

This is a paginated view of messages in the thread with full content displayed inline.

Messages are displayed in chronological order, with the original post highlighted in green.

Use pagination controls to navigate through all messages in large threads.

Back to All Threads