On 18/08/2025 11:22, Jerome Forissier wrote:
On 8/6/25 17:24, Andrew Goodbody wrote:
In cdns_sierra_pll_bind_of_clocks the variable 'i' is declared but never
assigned to before its value is used in a dev_err. There is nothing
obvious to assign to 'i' so remove its use and just put a default of 0
in the dev_err call in its place.
This issue was found by Smatch.
Signed-off-by: Andrew Goodbody <andrew.goodb...@linaro.org>
---
drivers/phy/cadence/phy-cadence-sierra.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/phy/cadence/phy-cadence-sierra.c
b/drivers/phy/cadence/phy-cadence-sierra.c
index 2c9d5a12127..46a728405cc 100644
--- a/drivers/phy/cadence/phy-cadence-sierra.c
+++ b/drivers/phy/cadence/phy-cadence-sierra.c
@@ -602,7 +602,7 @@ static int cdns_sierra_pll_bind_of_clocks(struct
cdns_sierra_phy *sp)
struct udevice *dev = sp->dev;
struct driver *cdns_sierra_clk_drv;
struct cdns_sierra_pll_mux_sel *data = pll_clk_mux_sel;
- int i, rc;
+ int rc;
cdns_sierra_clk_drv = lists_driver_lookup_name("cdns_sierra_mux_clk");
if (!cdns_sierra_clk_drv) {
@@ -614,7 +614,7 @@ static int cdns_sierra_pll_bind_of_clocks(struct
cdns_sierra_phy *sp)
data, dev_ofnode(dev), NULL);
if (rc) {
dev_err(dev, "cannot bind driver for clock %s\n",
- clk_names[i]);
+ clk_names[0]);
Wouldn't it make more sense to use "pll_mux_clk" as the clock name? Or perhaps
just "cannot bind driver". And get rid of the unused clk_names[].
}
return 0;
Thanks,
Thanks, yes. V2 coming.
Andrew