Patch "phy: marvell: a3700-comphy: Fix hardcoded array size" has been added to the 6.1-stable tree

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



This is a note to let you know that I've just added the patch titled

    phy: marvell: a3700-comphy: Fix hardcoded array size

to the 6.1-stable tree which can be found at:
    http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary

The filename of the patch is:
     phy-marvell-a3700-comphy-fix-hardcoded-array-size.patch
and it can be found in the queue-6.1 subdirectory.

If you, or anyone else, feels it should not be added to the stable tree,
please let <stable@xxxxxxxxxxxxxxx> know about it.



commit e3bb191047e4142a59161e54f8c7b5c7b33b9a69
Author: Mikhail Kobuk <m.kobuk@xxxxxxxxx>
Date:   Thu Mar 21 19:47:31 2024 +0300

    phy: marvell: a3700-comphy: Fix hardcoded array size
    
    [ Upstream commit 627207703b73615653eea5ab7a841d5b478d961e ]
    
    Replace hardcoded 'gbe_phy_init' array size by explicit one.
    
    Fixes: 934337080c6c ("phy: marvell: phy-mvebu-a3700-comphy: Add native kernel implementation")
    Signed-off-by: Mikhail Kobuk <m.kobuk@xxxxxxxxx>
    Link: https://lore.kernel.org/r/20240321164734.49273-2-m.kobuk@xxxxxxxxx
    Signed-off-by: Vinod Koul <vkoul@xxxxxxxxxx>
    Signed-off-by: Sasha Levin <sashal@xxxxxxxxxx>

diff --git a/drivers/phy/marvell/phy-mvebu-a3700-comphy.c b/drivers/phy/marvell/phy-mvebu-a3700-comphy.c
index 392a8ae1bc667..251e1aedd4a6e 100644
--- a/drivers/phy/marvell/phy-mvebu-a3700-comphy.c
+++ b/drivers/phy/marvell/phy-mvebu-a3700-comphy.c
@@ -602,7 +602,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




[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux