Skip to contentSkip to conversation

i2c: qcom-cci: Remove the unused variable cci_clk_rate

PATCH In review Jiapeng Chong 3 participants 3 messages Oct 31, 2024

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

PATCH v3 1/1 i2c: qcom-cci: Remove the unused variable cci_clk_rate

Variable cci_clk_rate is not effectively used, so delete it.

drivers/i2c/busses/i2c-qcom-cci.c:526:16: warning: variable ‘cci_clk_rate’ set but not used.

Fixes 823dfb7bdb21 ("i2c: qcom-cci: Stop complaining about DT set clock rate")

---
Changes in v3:
-Modify the commit message.

 drivers/i2c/busses/i2c-qcom-cci.c | 9 ---------
 1 file changed, 9 deletions(-)
drivers/i2c/busses/i2c-qcom-cci.c +0 -9
index 5cc791b3b57d..a0ef43e99751 100644
@@ -523,7 +523,6 @@ static const struct dev_pm_ops qcom_cci_pm = {
 static int cci_probe(struct platform_device *pdev)
 {
 	struct device *dev = &pdev->dev;
-	unsigned long cci_clk_rate = 0;
 	struct device_node *child;
 	struct resource *r;
 	struct cci *cci;
@@ -594,14 +593,6 @@ static int cci_probe(struct platform_device *pdev)
 		return dev_err_probe(dev, -EINVAL, "not enough clocks in DT\n");
 	cci->nclocks = ret;
 
-	/* Retrieve CCI clock rate */
-	for (i = 0; i < cci->nclocks; i++) {
-		if (!strcmp(cci->clocks[i].id, "cci")) {
-			cci_clk_rate = clk_get_rate(cci->clocks[i].clk);
-			break;
-		}
-	}
-
 	ret = cci_enable_clocks(cci);
 	if (ret < 0)
 		return ret;
Signature · 1 line
2.32.0.3.g01195cf9f
#1 lore raw
Quoted 11 lines · Jiapeng Chong

Variable cci_clk_rate is not effectively used, so delete it.

drivers/i2c/busses/i2c-qcom-cci.c:526:16: warning: variable ‘cci_clk_rate’ set but not used.

Fixes 823dfb7bdb21 ("i2c: qcom-cci: Stop complaining about DT set clock rate")

---
Changes in v3:
-Modify the commit message.

Modify how?
What was the reason for ignoring the R-B tag?

Quoted 34 lines
 drivers/i2c/busses/i2c-qcom-cci.c | 9 ---------
 1 file changed, 9 deletions(-)
drivers/i2c/busses/i2c-qcom-cci.c +0 -9
index 5cc791b3b57d..a0ef43e99751 100644
@@ -523,7 +523,6 @@ static const struct dev_pm_ops qcom_cci_pm = {
 static int cci_probe(struct platform_device *pdev)
 {
 	struct device *dev = &pdev->dev;
-	unsigned long cci_clk_rate = 0;
 	struct device_node *child;
 	struct resource *r;
 	struct cci *cci;
@@ -594,14 +593,6 @@ static int cci_probe(struct platform_device *pdev)
 		return dev_err_probe(dev, -EINVAL, "not enough clocks in DT\n");
 	cci->nclocks = ret;
 
-	/* Retrieve CCI clock rate */
-	for (i = 0; i < cci->nclocks; i++) {
-		if (!strcmp(cci->clocks[i].id, "cci")) {
-			cci_clk_rate = clk_get_rate(cci->clocks[i].clk);
-			break;
-		}
-	}
-
 	ret = cci_enable_clocks(cci);
 	if (ret < 0)
 		return ret;
Signature · 1 line
2.32.0.3.g01195cf9f
Signature · 2 lines
With best wishes
Dmitry
maintainer
#2 lore raw

Hi Dmitry,

Quoted 13 lines · Dmitry Baryshkov
Quoted 11 lines · Jiapeng Chong

Variable cci_clk_rate is not effectively used, so delete it.

drivers/i2c/busses/i2c-qcom-cci.c:526:16: warning: variable ‘cci_clk_rate’ set but not used.

Fixes 823dfb7bdb21 ("i2c: qcom-cci: Stop complaining about DT set clock rate")

---
Changes in v3:
-Modify the commit message.

Quoted 2 lines

Modify how?
What was the reason for ignoring the R-B tag?

This patch has already been taken and I have added the R-B's as they were given.

However, Jiapeng, please, next time try to be a bit more specific with the changelog, consider that people really read it.

Andi