linux-gpio.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 0/4] gpiolib: cdev: guard tidying
@ 2023-12-20  1:51 Kent Gibson
  2023-12-20  1:51 ` [PATCH 1/4] gpiolib: cdev: include overflow.h Kent Gibson
                   ` (3 more replies)
  0 siblings, 4 replies; 19+ messages in thread
From: Kent Gibson @ 2023-12-20  1:51 UTC (permalink / raw)
  To: linux-kernel, linux-gpio, brgl, linus.walleij, andy; +Cc: Kent Gibson

This series contains some tidying up of gpiolib-cdev following the
recent adoption of guard().

The first couple of patches are minor fixes inspired by recent
submissions and reviews for gpiolib.c.

Patch 1 adds a missing include.

Patch 2 switches allocation of struct linereq from kzalloc() to
kvzalloc() as it can be larger than one page - even more so after the
recent relocation of debounce_period_us.

Patch 3 tidies up the functions that use a guard on the linereq
config_mutex.

Patch 4 tidies up the functions that use a guard on the gpio_device.
The new guard macro definitions probably should be relocated into
gpiolib.h, and I'll do that for v2 if there is a general consensus.

I also note that gpio_ioctl() is NOT covered by a guard to inhibit
removal of the gpio_device.  This looks like a bug to me, unless there
is some higher level locking at play that I am unaware of?

Cheers,
Kent.

Kent Gibson (4):
  gpiolib: cdev: include overflow.h
  gpiolib: cdev: allocate linereq using kvzalloc()
  gpiolib: cdev: replace locking wrappers for config_mutex with guards
  gpiolib: cdev: replace locking wrappers for gpio_device with guards

 drivers/gpio/gpiolib-cdev.c | 263 +++++++++++-------------------------
 1 file changed, 79 insertions(+), 184 deletions(-)

--
2.39.2


^ permalink raw reply	[flat|nested] 19+ messages in thread

end of thread, other threads:[~2023-12-20 15:02 UTC | newest]

Thread overview: 19+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-12-20  1:51 [PATCH 0/4] gpiolib: cdev: guard tidying Kent Gibson
2023-12-20  1:51 ` [PATCH 1/4] gpiolib: cdev: include overflow.h Kent Gibson
2023-12-20  1:51 ` [PATCH 2/4] gpiolib: cdev: allocate linereq using kvzalloc() Kent Gibson
2023-12-20 14:30   ` Andy Shevchenko
2023-12-20 14:53     ` Kent Gibson
2023-12-20 14:58       ` Andy Shevchenko
2023-12-20  1:51 ` [PATCH 3/4] gpiolib: cdev: replace locking wrappers for config_mutex with guards Kent Gibson
2023-12-20  1:51 ` [PATCH 4/4] gpiolib: cdev: replace locking wrappers for gpio_device " Kent Gibson
2023-12-20 11:55   ` Linus Walleij
2023-12-20 12:05     ` Bartosz Golaszewski
2023-12-20 12:13       ` Kent Gibson
2023-12-20 12:16         ` Bartosz Golaszewski
2023-12-20 12:23           ` Kent Gibson
2023-12-20 12:30             ` Bartosz Golaszewski
2023-12-20 12:53               ` Kent Gibson
2023-12-20 13:19                 ` Bartosz Golaszewski
2023-12-20 13:28                   ` Kent Gibson
2023-12-20 13:47                     ` Bartosz Golaszewski
2023-12-20 13:53                       ` Kent Gibson

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).