Skip to contentSkip to conversation

pinctrl: qcom: lpass-lpi: remove unused lpi_gpio_write function

PATCH In review Arnd Bergmann 2 participants 2 messages Jun 11

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

PATCH 1/1 pinctrl: qcom: lpass-lpi: remove unused lpi_gpio_write function

From: Arnd Bergmann <[email protected]>

All callers of this function were converted to calling __lpi_gpio_write instead, so it now causes a warning:

drivers/pinctrl/qcom/pinctrl-lpass-lpi.c:82:12: error: unused function 'lpi_gpio_write' [-Werror,-Wunused-function]
82 | static int lpi_gpio_write(struct lpi_pinctrl *state, unsigned int pin,

Remove the unused function.

Fixes b719ede389d8 ("pinctrl: qcom: lpass-lpi: Switch to PM clock framework for runtime PM")
---
 drivers/pinctrl/qcom/pinctrl-lpass-lpi.c | 14 --------------
 1 file changed, 14 deletions(-)
drivers/pinctrl/qcom/pinctrl-lpass-lpi.c +0 -14
index 4d758fd117c4..fe7ec0176081 100644
@@ -79,20 +79,6 @@ static int lpi_gpio_read(struct lpi_pinctrl *state, unsigned int pin,
 	return pm_runtime_put_autosuspend(state->dev);
 }
 
-static int lpi_gpio_write(struct lpi_pinctrl *state, unsigned int pin,
-			  unsigned int addr, unsigned int val)
-{
-	int ret;
-
-	ret = pm_runtime_resume_and_get(state->dev);
-	if (ret < 0)
-		return ret;
-
-	__lpi_gpio_write(state, pin, addr, val);
-
-	return pm_runtime_put_autosuspend(state->dev);
-}
-
 static const struct pinctrl_ops lpi_gpio_pinctrl_ops = {
 	.get_groups_count	= pinctrl_generic_get_group_count,
 	.get_group_name		= pinctrl_generic_get_group_name,
Signature · 1 line
2.39.5
#1 lore raw
Quoted 31 lines · Arnd Bergmann

From: Arnd Bergmann <[email protected]>

All callers of this function were converted to calling __lpi_gpio_write instead, so it now causes a warning:

drivers/pinctrl/qcom/pinctrl-lpass-lpi.c:82:12: error: unused function 'lpi_gpio_write' [-Werror,-Wunused-function]
82 | static int lpi_gpio_write(struct lpi_pinctrl *state, unsigned int pin,

Remove the unused function.

Fixes b719ede389d8 ("pinctrl: qcom: lpass-lpi: Switch to PM clock framework for runtime PM")
---
  drivers/pinctrl/qcom/pinctrl-lpass-lpi.c | 14 --------------
  1 file changed, 14 deletions(-)
drivers/pinctrl/qcom/pinctrl-lpass-lpi.c +0 -7
index 4d758fd117c4..fe7ec0176081 100644
@@ -79,20 +79,6 @@ static int lpi_gpio_read(struct lpi_pinctrl *state, unsigned int pin,
  	return pm_runtime_put_autosuspend(state->dev);
  }
 
-static int lpi_gpio_write(struct lpi_pinctrl *state, unsigned int pin,
-			  unsigned int addr, unsigned int val)
-{
-	int ret;
-
-	ret = pm_runtime_resume_and_get(state->dev);
-	if (ret < 0)

drivers/pinctrl/qcom/pinctrl-lpass-lpi.c static int lpi_gpio_read(struct lpi_pinctrl *state, unsigned int pin, · line 84

Quoted 10 lines
drivers/pinctrl/qcom/pinctrl-lpass-lpi.c +0 -7
-		return ret;
-
-	__lpi_gpio_write(state, pin, addr, val);
-
-	return pm_runtime_put_autosuspend(state->dev);
-}
-
  static const struct pinctrl_ops lpi_gpio_pinctrl_ops = {
  	.get_groups_count	= pinctrl_generic_get_group_count,
  	.get_group_name		= pinctrl_generic_get_group_name,

Hi Arnd,

Thanks for the patch.

This issue has already been addressed and the fix has been applied:
https://lore.kernel.org/all/[email protected]/

Thanks,
Ajay