Skip to contentSkip to conversation

gpio: wcove: Use -ENOTSUPP consistently

PATCH In review Andy Shevchenko 2 participants 3 messages Apr 5, 2024

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

PATCH 1/1 gpio: wcove: Use -ENOTSUPP consistently

The GPIO library expects the drivers to return -ENOTSUPP in some cases and not using analogue POSIX code. Make the driver to follow this.

---
 drivers/gpio/gpio-wcove.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/gpio/gpio-wcove.c +1 -1
index c18b6b47384f..94ca9d03c094 100644
@@ -104,7 +104,7 @@ static inline int to_reg(int gpio, enum ctrl_register type)
 	unsigned int reg = type == CTRL_IN ? GPIO_IN_CTRL_BASE : GPIO_OUT_CTRL_BASE;
 
 	if (gpio >= WCOVE_GPIO_NUM)
-		return -EOPNOTSUPP;
+		return -ENOTSUPP;
 
 	return reg + gpio;
 }
Signature · 1 line
2.43.0.rc1.1.gbec44491f096
maintainer Reviewed-by on v1 1/1
#1 lore raw
Quoted 6 lines · Andy Shevchenko

The GPIO library expects the drivers to return -ENOTSUPP in some cases and not using analogue POSIX code. Make the driver to follow this.

---

Looks good to me.

Quoted 16 lines
 drivers/gpio/gpio-wcove.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/gpio/gpio-wcove.c +1 -1
index c18b6b47384f..94ca9d03c094 100644
@@ -104,7 +104,7 @@ static inline int to_reg(int gpio, enum ctrl_register type)
 	unsigned int reg = type == CTRL_IN ? GPIO_IN_CTRL_BASE : GPIO_OUT_CTRL_BASE;
 
 	if (gpio >= WCOVE_GPIO_NUM)
-		return -EOPNOTSUPP;
+		return -ENOTSUPP;
 
 	return reg + gpio;
 }
Signature · 2 lines
Sathyanarayanan Kuppuswamy
Linux Kernel Developer
#2 lore raw
Quoted 6 lines · Kuppuswamy Sathyanarayanan
Quoted 4 lines · Andy Shevchenko

The GPIO library expects the drivers to return -ENOTSUPP in some cases and not using analogue POSIX code. Make the driver to follow this.

Quoted 6 lines
Quoted 2 lines

---

Looks good to me.

Pushed to my review and testing queue, thanks!

Signature · 2 lines
With Best Regards,
Andy Shevchenko