Skip to content

Simplify event handling logic in input core

Dmitry Torokhov linux-input lkml 2 versions – In review

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v2 Latest7 patches 8 repliesIn review
  2. v14 patches 7 repliesSuperseded

Patches in v2 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/7Input: evdev - remove ->event() methoddrivers/input/evdev.c+0 -121 reply
2/7Input: make sure input handlers define only one processing methoddrivers/input/input.c+24 -01 reply
3/7Input: make events() method return number of events processeddrivers/input/evdev.c include/linux/input.h+8 -51 reply
4/7Input: simplify event handling logicdrivers/input/input.c+68 -411 reply
5/7Input: rearrange input_alloc_device() to prepare for preallocating of valsdrivers/input/input.c+22 -151 reply
6/7Input: preallocate memory to hold event valuesdrivers/input/input.c+44 -171 reply
7/7Input: do not check number of events in input_pass_values()drivers/input/input.c+0 -31 reply

Reviews trailers per patch

All 7 patches have a Reviewed-by or Acked-by of their own; the series has one for all of them.

PatchBenjamin TissoiresJeff LaBundy
SeriesR-b
1/7R-b
2/7R-b
3/7R-b
4/7R-b
5/7R-b
6/7R-b
7/7R-b

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.

Read the v2 thread

Cover letter [PATCH v2 0/7] Simplify event handling logic in input core

This series tries to untangle somewhat convoluted logic in the input event processing in the input core by realizing that input handler can be either a filter, or a handler that handles a single event at a time, or a handler that can handle a sequence of events, but should not mix the 3 behaviors in one handler. This allows us to reduce both filter functionality and single-event handling functionality to batch handling and have the main event handling path to only deal with input_handle->events() batch method.

v2: addressed comments from Benjamin:

- added missing patch to remove evdev->event() implementation
- allow not specifying any event handling method to satisfy kgdboc handler
- expanded comment on order of running input handlers when passing events
- split pre-allocation into 2 patches and moved removal of count check into 3rd patch.

Dmitry Torokhov (7):
Input: evdev - remove ->event() method
Input: make sure input handlers define only one processing method
Input: make events() method return number of events processed
Input: simplify event handling logic
Input: rearrange input_alloc_device() to prepare for preallocating of vals
Input: preallocate memory to hold event values
Input: do not check number of events in input_pass_values()

 drivers/input/evdev.c |  16 +--
 drivers/input/input.c | 230 ++++++++++++++++++++++++++++--------------
 include/linux/input.h |   7 +-
 3 files changed, 163 insertions(+), 90 deletions(-)
Signature · 1 line
2.45.2.803.g4e1b14247a-goog