Skip to content

Commit

Permalink
phy: marvell: a3700-comphy: Fix hardcoded array size
Browse files Browse the repository at this point in the history
[ Upstream commit 6272077 ]

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 <m.kobuk@ispras.ru>
Link: https://lore.kernel.org/r/20240321164734.49273-2-m.kobuk@ispras.ru
Signed-off-by: Vinod Koul <vkoul@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
  • Loading branch information
Mikhail Kobuk authored and gregkh committed May 2, 2024
1 parent 610f175 commit 73e4d4f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/phy/marvell/phy-mvebu-a3700-comphy.c
Original file line number Diff line number Diff line change
Expand Up @@ -603,7 +603,7 @@ static void comphy_gbe_phy_init(struct mvebu_a3700_comphy_lane *lane,
u16 val;

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

0 comments on commit 73e4d4f

Please sign in to comment.