* [PATCH] gpio: cdev: remove redundant direction check in linehandle set values
@ 2026-10-20 8:06 Kent Gibson
2026-10-20 12:49 ` Bartosz Golaszewski
0 siblings, 1 reply; 2+ messages in thread
From: Kent Gibson @ 2026-10-20 8:06 UTC (permalink / raw)
To: brgl, linusw; +Cc: linux-gpio, linux-kernel, Kent Gibson
Since commit 92ac7de3175e ("gpiolib: don't allow setting values on input
lines"), direction checking is performed by gpiolib core code.
As part of that patch, the now redundant check was removed from uAPI v2
linereq_set_values(), but the corresponding check in uAPI v1 linehandle
set values was left. Remove it.
Signed-off-by: Kent Gibson <warthog618@gmail.com>
---
drivers/gpio/gpiolib-cdev.c | 7 -------
1 file changed, 7 deletions(-)
diff --git a/drivers/gpio/gpiolib-cdev.c b/drivers/gpio/gpiolib-cdev.c
index 6dc01f7ea838..bc1b45f50892 100644
--- a/drivers/gpio/gpiolib-cdev.c
+++ b/drivers/gpio/gpiolib-cdev.c
@@ -234,13 +234,6 @@ static long linehandle_ioctl(struct file *file, unsigned int cmd,
return 0;
case GPIOHANDLE_SET_LINE_VALUES_IOCTL:
- /*
- * All line descriptors were created at once with the same
- * flags so just check if the first one is really output.
- */
- if (!test_bit(GPIOD_FLAG_IS_OUT, &lh->descs[0]->flags))
- return -EPERM;
-
if (copy_from_user(&ghd, ip, sizeof(ghd)))
return -EFAULT;
base-commit: 47f16cf7a6017212230985f6bc7f1b55b6d234d9
--
2.56.0
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] gpio: cdev: remove redundant direction check in linehandle set values
2026-10-20 8:06 [PATCH] gpio: cdev: remove redundant direction check in linehandle set values Kent Gibson
@ 2026-10-20 12:49 ` Bartosz Golaszewski
0 siblings, 0 replies; 2+ messages in thread
From: Bartosz Golaszewski @ 2026-10-20 12:49 UTC (permalink / raw)
To: brgl, linusw, Kent Gibson; +Cc: Bartosz Golaszewski, linux-gpio, linux-kernel
On Tue, 20 Oct 2026 16:06:46 +0800, Kent Gibson wrote:
> Since commit 92ac7de3175e ("gpiolib: don't allow setting values on input
> lines"), direction checking is performed by gpiolib core code.
> As part of that patch, the now redundant check was removed from uAPI v2
> linereq_set_values(), but the corresponding check in uAPI v1 linehandle
> set values was left. Remove it.
>
>
> [...]
Applied, thanks!
[1/1] gpio: cdev: remove redundant direction check in linehandle set values
https://git.kernel.org/brgl/c/c890f6755369247ecf3c27199ca3c3f4b007fc1d
Best regards,
--
Bartosz Golaszewski <bartosz.golaszewski@oss.qualcomm.com>
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2026-10-20 12:49 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-10-20 8:06 [PATCH] gpio: cdev: remove redundant direction check in linehandle set values Kent Gibson
2026-10-20 12:49 ` Bartosz Golaszewski
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.