aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJohan Hovold <johan+linaro@kernel.org>2025-05-23 10:48:38 +0200
committerVinod Koul <vkoul@kernel.org>2025-06-15 22:02:41 +0530
commitd2d0ae723ba3fca2c54dfbc758b368d3009e79a7 (patch)
tree40f791c4487394ea78f06eeaa14da2a8e422d19b
parentphy: phy-snps-eusb2: fix optional phy lookup parameter (diff)
downloadlinux-d2d0ae723ba3fca2c54dfbc758b368d3009e79a7.tar.gz
linux-d2d0ae723ba3fca2c54dfbc758b368d3009e79a7.zip
phy: phy-snps-eusb2: drop unnecessary loop index declarations
There is already a loop index variable declared at function scope so drop the unnecessary overloaded loop declarations. Signed-off-by: Johan Hovold <johan+linaro@kernel.org> Reviewed-by: Neil Armstrong <neil.armstrong@linaro.org> Reviewed-by: Abel Vesa <abel.vesa@linaro.org> Link: https://lore.kernel.org/r/20250523084839.11015-7-johan+linaro@kernel.org Signed-off-by: Vinod Koul <vkoul@kernel.org>
-rw-r--r--drivers/phy/phy-snps-eusb2.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/phy/phy-snps-eusb2.c b/drivers/phy/phy-snps-eusb2.c
index 328e67ebfe03..c67712bd8bba 100644
--- a/drivers/phy/phy-snps-eusb2.c
+++ b/drivers/phy/phy-snps-eusb2.c
@@ -552,7 +552,7 @@ static int snps_eusb2_hsphy_probe(struct platform_device *pdev)
if (!phy->clks)
return -ENOMEM;
- for (int i = 0; i < phy->data->num_clks; ++i)
+ for (i = 0; i < phy->data->num_clks; ++i)
phy->clks[i].id = phy->data->clk_names[i];
ret = devm_clk_bulk_get(dev, phy->data->num_clks, phy->clks);
@@ -561,7 +561,7 @@ static int snps_eusb2_hsphy_probe(struct platform_device *pdev)
"failed to get phy clock(s)\n");
phy->ref_clk = NULL;
- for (int i = 0; i < phy->data->num_clks; ++i) {
+ for (i = 0; i < phy->data->num_clks; ++i) {
if (!strcmp(phy->clks[i].id, "ref")) {
phy->ref_clk = phy->clks[i].clk;
break;