Skip to contentSkip to conversation

pinctrl: abx500: Fix type of 'argument' variable

PATCH In review Yu-Chun Lin 2 participants 2 messages Mar 20 – Mar 23

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

PATCH v2 1/1 pinctrl: abx500: Fix type of 'argument' variable

The argument variable is assigned the return value of pinconf_to_config_argument(), which returns a u32. Change its type from enum pin_config_param to unsigned int to correctly store the configuration argument.

Fixes 03b054e9696c ("pinctrl: Pass all configs to driver on pin_config_set()")

---
Changes in v2:
- Rebased on the latest mainline to fix the recipient list.
- Updated the variable type to match the commit message.

---
 drivers/pinctrl/nomadik/pinctrl-abx500.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/pinctrl/nomadik/pinctrl-abx500.c +1 -1
index fc7ebeda8440..858fbaebcf8e 100644
@@ -852,7 +852,7 @@ static int abx500_pin_config_set(struct pinctrl_dev *pctldev,
 	int ret = -EINVAL;
 	int i;
 	enum pin_config_param param;
-	enum pin_config_param argument;
+	unsigned int argument;
 
 	for (i = 0; i < num_configs; i++) {
 		param = pinconf_to_config_param(configs[i]);
Signature · 1 line
2.34.1
maintainer
#1 lore raw
Quoted 7 lines · Yu-Chun Lin

The argument variable is assigned the return value of pinconf_to_config_argument(), which returns a u32. Change its type from enum pin_config_param to unsigned int to correctly store the configuration argument.

Fixes 03b054e9696c ("pinctrl: Pass all configs to driver on pin_config_set()")

Patch applied as nonurgent fix, thanks!

Yours,
Linus Walleij