Skip to content

Commit 6272077

Browse files
Mikhail Kobukvinodkoul
authored andcommitted
phy: marvell: a3700-comphy: Fix hardcoded array size
Replace hardcoded 'gbe_phy_init' array size by explicit one. Fixes: 9343370 ("phy: marvell: phy-mvebu-a3700-comphy: Add native kernel implementation") Signed-off-by: Mikhail Kobuk <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Vinod Koul <[email protected]>
1 parent e4308bc commit 6272077

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

drivers/phy/marvell/phy-mvebu-a3700-comphy.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -603,7 +603,7 @@ static void comphy_gbe_phy_init(struct mvebu_a3700_comphy_lane *lane,
603603
u16 val;
604604

605605
fix_idx = 0;
606-
for (addr = 0; addr < 512; addr++) {
606+
for (addr = 0; addr < ARRAY_SIZE(gbe_phy_init); addr++) {
607607
/*
608608
* All PHY register values are defined in full for 3.125Gbps
609609
* SERDES speed. The values required for 1.25 Gbps are almost

0 commit comments

Comments
 (0)