* [PATCH net-next 1/2] net: phy: use const char * const for phylink_an_mode_str
@ 2026-11-12 13:13 Christian Marangi
2026-11-12 13:13 ` [PATCH net-next 2/2] net: phy: fix trivial whitespace/format issue Christian Marangi
0 siblings, 1 reply; 2+ messages in thread
From: Christian Marangi @ 2026-11-12 13:13 UTC (permalink / raw)
To: Russell King, Andrew Lunn, Heiner Kallweit, David S. Miller,
Eric Dumazet, Jakub Kicinski, Paolo Abeni, netdev, linux-kernel
Cc: Christian Marangi
The local string array should use const char * const as reported by
checkpatch.pl. Use the correct type as to mute checkpatch warning.
Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
---
drivers/net/phy/phylink.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/net/phy/phylink.c b/drivers/net/phy/phylink.c
index e885da1c2831..bf1962e572f8 100644
--- a/drivers/net/phy/phylink.c
+++ b/drivers/net/phy/phylink.c
@@ -184,7 +184,7 @@ static int phylink_is_empty_linkmode(const unsigned long *linkmode)
static const char *phylink_an_mode_str(unsigned int mode)
{
- static const char *modestr[] = {
+ static const char * const modestr[] = {
[MLO_AN_PHY] = "phy",
[MLO_AN_FIXED] = "fixed",
[MLO_AN_INBAND] = "inband",
--
2.55.0
^ permalink raw reply [flat|nested] 2+ messages in thread
* [PATCH net-next 2/2] net: phy: fix trivial whitespace/format issue
2026-11-12 13:13 [PATCH net-next 1/2] net: phy: use const char * const for phylink_an_mode_str Christian Marangi
@ 2026-11-12 13:13 ` Christian Marangi
0 siblings, 0 replies; 2+ messages in thread
From: Christian Marangi @ 2026-11-12 13:13 UTC (permalink / raw)
To: Russell King, Andrew Lunn, Heiner Kallweit, David S. Miller,
Eric Dumazet, Jakub Kicinski, Paolo Abeni, netdev, linux-kernel
Cc: Christian Marangi
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
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2026-11-12 13:14 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-11-12 13:13 [PATCH net-next 1/2] net: phy: use const char * const for phylink_an_mode_str Christian Marangi
2026-11-12 13:13 ` [PATCH net-next 2/2] net: phy: fix trivial whitespace/format issue Christian Marangi
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®