From: Kent Gibson <warthog618@gmail.com>
To: brgl@kernel.org, linusw@kernel.org
Cc: linux-gpio@vger.kernel.org, linux-kernel@vger.kernel.org,
Kent Gibson <warthog618@gmail.com>
Subject: [PATCH] gpio: cdev: remove redundant direction check in linehandle set values
Date: Tue, 20 Oct 2026 16:06:46 +0800 [thread overview]
Message-ID: <20261020080646.45985-1-warthog618@gmail.com> (raw)
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
next reply other threads:[~2026-10-20 8:07 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-10-20 8:06 Kent Gibson [this message]
2026-10-20 12:49 ` [PATCH] gpio: cdev: remove redundant direction check in linehandle set values Bartosz Golaszewski
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20261020080646.45985-1-warthog618@gmail.com \
--to=warthog618@gmail.com \
--cc=brgl@kernel.org \
--cc=linusw@kernel.org \
--cc=linux-gpio@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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.