From 66aa707a2a8cc04894bd605e50dde782dd9dba9e Mon Sep 17 00:00:00 2001 From: Hariharan K Date: Tue, 27 Jun 2023 14:46:41 +0530 Subject: [PATCH] drivers: net: ipq: Use 16bit for phy_chip_id1 and phy_chip_id2 Changing the data type of phy_chip_id1 and phy_chip_id2 from 32-bit to 16-bit and initializing them to 0 to avoid any junk value while shifting and concatenating them to form the final phy_chip_id. Change-Id: If96b01db9ec2b3c0a259ea3c98516d1f18a898ce Signed-off-by: Hariharan K --- drivers/net/ipq5332/ipq5332_edma.c | 3 ++- drivers/net/ipq9574/ipq9574_edma.c | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/drivers/net/ipq5332/ipq5332_edma.c b/drivers/net/ipq5332/ipq5332_edma.c index 69ba087e22..30e8539f89 100644 --- a/drivers/net/ipq5332/ipq5332_edma.c +++ b/drivers/net/ipq5332/ipq5332_edma.c @@ -1834,7 +1834,8 @@ int ipq5332_edma_init(void *edma_board_cfg) ipq5332_edma_board_cfg_t ledma_cfg, *edma_cfg; phy_info_t *phy_info; int phy_id; - uint32_t phy_chip_id, phy_chip_id1, phy_chip_id2; + uint16_t phy_chip_id1 = 0, phy_chip_id2 = 0; + uint32_t phy_chip_id = 0; int clk[4] = {0}; int qca8084_swt_enb = 0; int qca8084_chip_detect = 0; diff --git a/drivers/net/ipq9574/ipq9574_edma.c b/drivers/net/ipq9574/ipq9574_edma.c index 57ddc87ca4..22085d3d35 100644 --- a/drivers/net/ipq9574/ipq9574_edma.c +++ b/drivers/net/ipq9574/ipq9574_edma.c @@ -1950,7 +1950,8 @@ int ipq9574_edma_init(void *edma_board_cfg) int ret = -1; ipq9574_edma_board_cfg_t ledma_cfg, *edma_cfg; int phy_id; - uint32_t phy_chip_id, phy_chip_id1, phy_chip_id2; + uint16_t phy_chip_id1 = 0, phy_chip_id2 = 0; + uint32_t phy_chip_id = 0; #ifdef CONFIG_IPQ9574_QCA8075_PHY static int sw_init_done = 0; #endif