Skip to contentSkip to conversation

net: phy: at803x: make array offsets static

PATCH Applied Colin Ian King 3 participants 3 messages Jan 9, 2022 – Jan 12, 2022

Subsystems (4)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 net: phy: at803x: make array offsets static

Don't populate the read-only const array offsets on the stack but instead make it static. Also makes the object code a little smaller.

---
 drivers/net/phy/at803x.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/net/phy/at803x.c +1 -1
index dae95d9a07e8..5b6c0d120e09 100644
@@ -421,7 +421,7 @@ static int at803x_set_wol(struct phy_device *phydev,
 	const u8 *mac;
 	int ret, irq_enabled;
 	unsigned int i;
-	const unsigned int offsets[] = {
+	static const unsigned int offsets[] = {
 		AT803X_LOC_MAC_ADDR_32_47_OFFSET,
 		AT803X_LOC_MAC_ADDR_16_31_OFFSET,
 		AT803X_LOC_MAC_ADDR_0_15_OFFSET,
Signature · 1 line
2.32.0
#2 lore raw
In reply to Colin Ian King
This patch was applied to netdev/net.git (master) by Jakub Kicinski <[email protected]>:

Hello:

This patch was applied to netdev/net.git (master)
by Jakub Kicinski <[email protected]>:

Quoted 7 lines · On Sun, 9 Jan 2022 23:17:16 +0000 you wrote:

Don't populate the read-only const array offsets on the stack but instead make it static. Also makes the object code a little smaller.

---
 drivers/net/phy/at803x.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Here is the summary with links:
- net: phy: at803x: make array offsets static

    https://git.kernel.org/netdev/net/c/edcb501e543c

You are awesome, thank you!

Signature · 2 lines
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html