Skip to contentSkip to conversation

phy: stm32: fix use of integer as pointer

PATCH In review Ben Dooks 2 participants 2 messages Oct 15, 2019

Subsystems (2)
lore
Share & tools
lore

Ben Dooks

author
#0 lore raw

PATCH 1/1 phy: stm32: fix use of integer as pointer

The calls devm_clk_get() and devm_reset_control_get() take pointers so change the 0 to NULl to fix the following sparse warnings:

drivers/phy/st/phy-stm32-usbphyc.c:330:42: warning: Using plain integer as NULL pointer drivers/phy/st/phy-stm32-usbphyc.c:343:52: warning: Using plain integer as NULL pointer

---
Cc: Kishon Vijay Abraham I <[email protected]>
Cc: Maxime Coquelin <[email protected]>
Cc: Alexandre Torgue <[email protected]>
Cc: [email protected]
Cc: [email protected]
Cc: [email protected]

---
 drivers/phy/st/phy-stm32-usbphyc.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/phy/st/phy-stm32-usbphyc.c +2 -2
index 56bdea4b0bd9..2b3639cba51a 100644
@@ -327,7 +327,7 @@ static int stm32_usbphyc_probe(struct platform_device *pdev)
 	if (IS_ERR(usbphyc->base))
 		return PTR_ERR(usbphyc->base);
 
-	usbphyc->clk = devm_clk_get(dev, 0);
+	usbphyc->clk = devm_clk_get(dev, NULL);
 	if (IS_ERR(usbphyc->clk)) {
 		ret = PTR_ERR(usbphyc->clk);
 		dev_err(dev, "clk get failed: %d\n", ret);
@@ -340,7 +340,7 @@ static int stm32_usbphyc_probe(struct platform_device *pdev)
 		return ret;
 	}
 
-	usbphyc->rst = devm_reset_control_get(dev, 0);
+	usbphyc->rst = devm_reset_control_get(dev, NULL);
 	if (!IS_ERR(usbphyc->rst)) {
 		reset_control_assert(usbphyc->rst);
 		udelay(2);
Signature · 1 line
2.23.0
Reviewed-by on v1 1/1
#1 lore raw
Quoted 8 lines · Ben Dooks

The calls devm_clk_get() and devm_reset_control_get() take pointers so change the 0 to NULl to fix the following sparse warnings:

drivers/phy/st/phy-stm32-usbphyc.c:330:42: warning: Using plain integer as NULL pointer drivers/phy/st/phy-stm32-usbphyc.c:343:52: warning: Using plain integer as NULL pointer

Quoted 26 lines

---
Cc: Kishon Vijay Abraham I <[email protected]>
Cc: Maxime Coquelin <[email protected]>
Cc: Alexandre Torgue <[email protected]>
Cc: [email protected]
Cc: [email protected]
Cc: [email protected]

---
  drivers/phy/st/phy-stm32-usbphyc.c | 4 ++--
  1 file changed, 2 insertions(+), 2 deletions(-)
drivers/phy/st/phy-stm32-usbphyc.c +1 -1
index 56bdea4b0bd9..2b3639cba51a 100644
@@ -327,7 +327,7 @@ static int stm32_usbphyc_probe(struct platform_device *pdev)
  	if (IS_ERR(usbphyc->base))
  		return PTR_ERR(usbphyc->base);
 
-	usbphyc->clk = devm_clk_get(dev, 0);
+	usbphyc->clk = devm_clk_get(dev, NULL);
  	if (IS_ERR(usbphyc->clk)) {
  		ret = PTR_ERR(usbphyc->clk);
  		dev_err(dev, "clk get failed: %d\n", ret);

drivers/phy/st/phy-stm32-usbphyc.c static int stm32_usbphyc_probe(struct platform_device *pdev) · line 346

Quoted 8 lines
drivers/phy/st/phy-stm32-usbphyc.c +1 -1
@@ -340,7 +340,7 @@ static int stm32_usbphyc_probe(struct platform_device *pdev)
  		return ret;
  	}
 
-	usbphyc->rst = devm_reset_control_get(dev, 0);
+	usbphyc->rst = devm_reset_control_get(dev, NULL);
  	if (!IS_ERR(usbphyc->rst)) {
  		reset_control_assert(usbphyc->rst);
  		udelay(2);

_______________________________________________
linux-arm-kernel mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel