Re: [PATCH 1/4] gpiolib: cdev: Flag invalid GPIOs as used

2020-12-09 Thread Linus Walleij
On Fri, Dec 4, 2020 at 5:47 PM Marc Zyngier wrote: > When reporting the state of a GPIO to userspace, we never check > for the actual validity of the line, meaning we report invalid > lines as being usable. A subsequent request will fail though, > which is an inconsistent behaviour from a userspa

Re: [PATCH 1/4] gpiolib: cdev: Flag invalid GPIOs as used

2020-12-07 Thread Marc Zyngier
On 2020-12-07 14:16, Johan Hovold wrote: On Fri, Dec 04, 2020 at 04:47:36PM +, Marc Zyngier wrote: When reporting the state of a GPIO to userspace, we never check for the actual validity of the line, meaning we report invalid lines as being usable. A subsequent request will fail though, whic

Re: [PATCH 1/4] gpiolib: cdev: Flag invalid GPIOs as used

2020-12-07 Thread Johan Hovold
On Fri, Dec 04, 2020 at 04:47:36PM +, Marc Zyngier wrote: > When reporting the state of a GPIO to userspace, we never check > for the actual validity of the line, meaning we report invalid > lines as being usable. A subsequent request will fail though, > which is an inconsistent behaviour from

[PATCH 1/4] gpiolib: cdev: Flag invalid GPIOs as used

2020-12-04 Thread Marc Zyngier
When reporting the state of a GPIO to userspace, we never check for the actual validity of the line, meaning we report invalid lines as being usable. A subsequent request will fail though, which is an inconsistent behaviour from a userspace perspective. Instead, let's check for the validity of the