]> git.ipfire.org Git - thirdparty/linux.git/commitdiff
net: dsa: mv88e6xxx: make const read-only array lanes static
authorColin Ian King <colin.i.king@gmail.com>
Tue, 19 Sep 2023 09:40:21 +0000 (10:40 +0100)
committerDavid S. Miller <davem@davemloft.net>
Wed, 20 Sep 2023 10:51:14 +0000 (11:51 +0100)
Don't populate the const read-only array lanes on the stack, instead make
it static.

Signed-off-by: Colin Ian King <colin.i.king@gmail.com>
Reviewed-by: Andrew Lunn <andrew@lunn.ch>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/dsa/mv88e6xxx/pcs-639x.c

index ba373656bfe147345e9d3a0620cc4f93d0a9fa14..9a8429f5d09cbf90bd4341614a273072068414ec 100644 (file)
@@ -208,7 +208,7 @@ static void mv88e639x_sgmii_pcs_pre_config(struct phylink_pcs *pcs,
 
 static int mv88e6390_erratum_3_14(struct mv88e639x_pcs *mpcs)
 {
-       const int lanes[] = { MV88E6390_PORT9_LANE0, MV88E6390_PORT9_LANE1,
+       static const int lanes[] = { MV88E6390_PORT9_LANE0, MV88E6390_PORT9_LANE1,
                MV88E6390_PORT9_LANE2, MV88E6390_PORT9_LANE3,
                MV88E6390_PORT10_LANE0, MV88E6390_PORT10_LANE1,
                MV88E6390_PORT10_LANE2, MV88E6390_PORT10_LANE3 };