* [PATCH v1 1/1] gpiolib-acpi: Drop unneeded ERR_CAST() in __acpi_find_gpio()
@ 2025-03-04 14:31 Andy Shevchenko
2025-03-04 14:36 ` Mika Westerberg
0 siblings, 1 reply; 3+ messages in thread
From: Andy Shevchenko @ 2025-03-04 14:31 UTC (permalink / raw)
To: Andy Shevchenko, linux-gpio, linux-acpi, linux-kernel
Cc: Mika Westerberg, Linus Walleij, Bartosz Golaszewski
The checked type by PTR_ERR() is the same as returned by __acpi_find_gpio().
Hence there is no need to cast, drop it.
Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
---
drivers/gpio/gpiolib-acpi.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/gpio/gpiolib-acpi.c b/drivers/gpio/gpiolib-acpi.c
index 2aa88ace5868..90db393377fc 100644
--- a/drivers/gpio/gpiolib-acpi.c
+++ b/drivers/gpio/gpiolib-acpi.c
@@ -993,7 +993,7 @@ __acpi_find_gpio(struct fwnode_handle *fwnode, const char *con_id, unsigned int
desc = acpi_get_gpiod_from_data(fwnode,
propname, idx, info);
if (PTR_ERR(desc) == -EPROBE_DEFER)
- return ERR_CAST(desc);
+ return (desc);
if (!IS_ERR(desc))
return desc;
--
2.47.2
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH v1 1/1] gpiolib-acpi: Drop unneeded ERR_CAST() in __acpi_find_gpio()
2025-03-04 14:31 [PATCH v1 1/1] gpiolib-acpi: Drop unneeded ERR_CAST() in __acpi_find_gpio() Andy Shevchenko
@ 2025-03-04 14:36 ` Mika Westerberg
2025-03-04 14:48 ` Andy Shevchenko
0 siblings, 1 reply; 3+ messages in thread
From: Mika Westerberg @ 2025-03-04 14:36 UTC (permalink / raw)
To: Andy Shevchenko
Cc: linux-gpio, linux-acpi, linux-kernel, Mika Westerberg,
Linus Walleij, Bartosz Golaszewski
On Tue, Mar 04, 2025 at 04:31:19PM +0200, Andy Shevchenko wrote:
> The checked type by PTR_ERR() is the same as returned by __acpi_find_gpio().
> Hence there is no need to cast, drop it.
>
> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Acked-by: Mika Westerberg <westeri@kernel.org>
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH v1 1/1] gpiolib-acpi: Drop unneeded ERR_CAST() in __acpi_find_gpio()
2025-03-04 14:36 ` Mika Westerberg
@ 2025-03-04 14:48 ` Andy Shevchenko
0 siblings, 0 replies; 3+ messages in thread
From: Andy Shevchenko @ 2025-03-04 14:48 UTC (permalink / raw)
To: Mika Westerberg
Cc: linux-gpio, linux-acpi, linux-kernel, Mika Westerberg,
Linus Walleij, Bartosz Golaszewski
On Tue, Mar 04, 2025 at 04:36:48PM +0200, Mika Westerberg wrote:
> On Tue, Mar 04, 2025 at 04:31:19PM +0200, Andy Shevchenko wrote:
> > The checked type by PTR_ERR() is the same as returned by __acpi_find_gpio().
> > Hence there is no need to cast, drop it.
> >
> > Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
>
> Acked-by: Mika Westerberg <westeri@kernel.org>
Pushed to my review and testing queue, thanks!
--
With Best Regards,
Andy Shevchenko
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2025-03-04 14:48 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-03-04 14:31 [PATCH v1 1/1] gpiolib-acpi: Drop unneeded ERR_CAST() in __acpi_find_gpio() Andy Shevchenko
2025-03-04 14:36 ` Mika Westerberg
2025-03-04 14:48 ` Andy Shevchenko
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox