linux-gpio.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 0/6] gpiolib: cdev: code cleanup following hte integration
@ 2022-07-13  1:37 Kent Gibson
  2022-07-13  1:37 ` [PATCH 1/6] gpiolib: cdev: simplify linereq_free Kent Gibson
                   ` (7 more replies)
  0 siblings, 8 replies; 21+ messages in thread
From: Kent Gibson @ 2022-07-13  1:37 UTC (permalink / raw)
  To: linux-kernel, linux-gpio, brgl, linus.walleij, dipenp; +Cc: Kent Gibson

This patch series is a collection of improvements to simplify the
code, improve readability, and compile out unused code.
There are no functional changes.

The first patch is a cleanup for my recent linereq_free() fix. I
noted then that the edge_detector_stop() could probably be safely
moved inside the line desc check block, but wanted to keep that
change minimal just in case.  It can be safely moved, and so here
it is.

Patch 2 makes use of an existing macro to simplify a call.

Patch 3 replaces some more if-else chains with switches, which is
more readable (YMMV).

Patch 4 reorganizes the line identification code to share code
common to alternate paths.

Patch 5 consolidates a number of separate flags into one.  This
reduces code complexity, simplifies any future edge source additions,
and makes patch 6 significantly simpler.

Patch 6 totally compiles out the hte specific code when CONFIG_HTE
is not selected.

I've based this series on gpio/for-current, as it requires the fix
patch -
commit c8e27a4a5136 ("gpiolib: cdev: fix null pointer dereference in linereq_free()")
Happy to rebase if that doesn't suit.

Dipen, I don't have any HTE compatible hardware to test with, so
could you check that this still works for you?


Kent Gibson (6):
  gpiolib: cdev: simplify linereq_free
  gpiolib: cdev: simplify parameter in call to hte_edge_setup
  gpiolib: cdev: replace if-else chains with switches
  gpiolib: cdev: simplify line event identification
  gpiolib: cdev: consolidate edge detector configuration flags
  gpiolib: cdev: compile out HTE unless CONFIG_HTE selected

 drivers/gpio/gpiolib-cdev.c | 286 +++++++++++++++++++-----------------
 1 file changed, 149 insertions(+), 137 deletions(-)


base-commit: 7329b071729645e243b6207e76bca2f4951c991b
-- 
2.37.0


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

end of thread, other threads:[~2022-07-18  9:27 UTC | newest]

Thread overview: 21+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-07-13  1:37 [PATCH 0/6] gpiolib: cdev: code cleanup following hte integration Kent Gibson
2022-07-13  1:37 ` [PATCH 1/6] gpiolib: cdev: simplify linereq_free Kent Gibson
2022-07-18  9:27   ` Linus Walleij
2022-07-13  1:37 ` [PATCH 2/6] gpiolib: cdev: simplify parameter in call to hte_edge_setup Kent Gibson
2022-07-13  1:37 ` [PATCH 3/6] gpiolib: cdev: replace if-else chains with switches Kent Gibson
2022-07-13  1:37 ` [PATCH 4/6] gpiolib: cdev: simplify line event identification Kent Gibson
2022-07-13  9:59   ` Andy Shevchenko
2022-07-13 10:27     ` Kent Gibson
2022-07-13 11:24       ` Andy Shevchenko
2022-07-14  0:32         ` Kent Gibson
2022-07-13  1:37 ` [PATCH 5/6] gpiolib: cdev: consolidate edge detector configuration flags Kent Gibson
2022-07-13 10:07   ` Andy Shevchenko
2022-07-13 10:24     ` Kent Gibson
2022-07-13 11:29       ` Andy Shevchenko
2022-07-13  1:37 ` [PATCH 6/6] gpiolib: cdev: compile out HTE unless CONFIG_HTE selected Kent Gibson
2022-07-13 10:03   ` Andy Shevchenko
2022-07-13 10:30     ` Kent Gibson
2022-07-14  1:08       ` Kent Gibson
2022-07-13 10:08 ` [PATCH 0/6] gpiolib: cdev: code cleanup following hte integration Andy Shevchenko
2022-07-15  2:06 ` Dipen Patel
2022-07-15  2:08   ` 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).