Skip to content

Input: Automated coccinelle cleanup

Guenter Roeck linux-arm-kernel linux-input lkml 1 version Applied

Status from this message: Applied, thank you.

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest33 patches 28 repliesApplied

Patches in v1 Applied

#Subject and filesSizeRepliesApplied
1/33Input: adp5520-keys - Drop unnecessary error messages and other changesdrivers/input/keyboard/adp5520-keys.c+1 -30 replies
2/33Input: bcm-keypad - Drop unnecessary call to platform_set_drvdata and other changesdrivers/input/keyboard/bcm-keypad.c+0 -20 replies
3/33Input: cap11xx - Drop unnecessary call to i2c_set_clientdata and other changesdrivers/input/keyboard/cap11xx.c+4 -100 replies
4/33Input: cros_ec_keyb - Drop unnecessary call to dev_set_drvdata and other changesdrivers/input/keyboard/cros_ec_keyb.c+1 -21 reply
5/33Input: imx_keypad - Drop unnecessary error messages and other changesdrivers/input/keyboard/imx_keypad.c+1 -30 replies
6/33Input: samsung-keypad - Drop unnecessary error messages and other changesdrivers/input/keyboard/samsung-keypad.c+3 -90 replies
7/33Input: sh_keysc - Drop unnecessary error messages and other changesdrivers/input/keyboard/sh_keysc.c+5 -100 replies
8/33Input: spear-keyboard - Drop unnecessary error messages and other changesdrivers/input/keyboard/spear-keyboard.c+1 -31 reply
9/33Input: sun4i-lradc-keys - Drop unnecessary call to platform_set_drvdata and other changesdrivers/input/keyboard/sun4i-lradc-keys.c+1 -61 reply
10/33Input: twl4030_keypad - Drop unnecessary call to platform_set_drvdata and other changesdrivers/input/keyboard/twl4030_keypad.c+0 -11 reply
11/33Input: ab8500-ponkey - Drop unnecessary call to platform_set_drvdata and other changesdrivers/input/misc/ab8500-ponkey.c+0 -11 reply
12/33Input: axp20x-pek - Use devm_add_action_or_reset and other changesdrivers/input/misc/axp20x-pek.c+3 -31 reply
13/33Input: bfin_rotary - Use 'dev' instead of dereferencing it and other changesdrivers/input/misc/bfin_rotary.c+8 -104 replies
14/33Input: gpio_decoder - Drop unnecessary call to platform_set_drvdata and other changesdrivers/input/misc/gpio_decoder.c+0 -11 reply
15/33Input: kxtj9 - Drop unnecessary error messages and other changesdrivers/input/misc/kxtj9.c+3 -90 replies
16/33Input: mma8450 - Drop unnecessary call to i2c_set_clientdata and other changesdrivers/input/misc/mma8450.c+0 -21 reply
17/33Input: retu-pwrbutton - Simplify error return and other changesdrivers/input/misc/retu-pwrbutton.c+1 -110 replies
18/33Input: soc_button_array - Use 'dev' instead of dereferencing it and other changesdrivers/input/misc/soc_button_array.c+3 -31 reply
19/33Input: tps65218-pwrbutton - Drop unnecessary call to platform_set_drvdata and other changesdrivers/input/misc/tps65218-pwrbutton.c+4 -71 reply
20/33Input: elan_i2c_core - Use 'dev' instead of dereferencing it and other changesdrivers/input/mouse/elan_i2c_core.c+21 -380 replies
21/33Input: arc_ps2 - Drop unnecessary error messages and other changesdrivers/input/serio/arc_ps2.c+1 -30 replies
22/33Input: at32psif - Drop unnecessary error messages and other changesdrivers/input/serio/at32psif.c+3 -91 reply
23/33Input: xilinx_ps2 - Use 'dev' instead of dereferencing it and other changesdrivers/input/serio/xilinx_ps2.c+3 -41 reply
24/33Input: ar1021_i2c - Drop unnecessary call to i2c_set_clientdata and other changesdrivers/input/touchscreen/ar1021_i2c.c+2 -41 reply
25/33Input: atmel-wm97xx - Drop unnecessary error messages and other changesdrivers/input/touchscreen/atmel-wm97xx.c+1 -31 reply
26/33Input: atmel_mxt_ts - Drop unnecessary error messages and other changesdrivers/input/touchscreen/atmel_mxt_ts.c+10 -370 replies
27/33Input: eeti_ts - Drop unnecessary error messages and other changesdrivers/input/touchscreen/eeti_ts.c+2 -51 reply
28/33Input: egalax_ts - Drop unnecessary call to i2c_set_clientdata and other changesdrivers/input/touchscreen/egalax_ts.c+4 -172 replies
29/33Input: melfas_mip4 - Use devm_add_action_or_reset and other changesdrivers/input/touchscreen/melfas_mip4.c+4 -61 reply
30/33Input: raydium_i2c_ts - Simplify error return and other changesdrivers/input/touchscreen/raydium_i2c_ts.c+6 -121 reply
31/33Input: rohm_bu21023 - Use 'dev' instead of dereferencing it and other changesdrivers/input/touchscreen/rohm_bu21023.c+5 -70 replies
32/33Input: sis_i2c - Drop unnecessary call to i2c_set_clientdata and other changesdrivers/input/touchscreen/sis_i2c.c+0 -11 reply
33/33Input: sx8654 - Drop unnecessary call to i2c_set_clientdata and other changesdrivers/input/touchscreen/sx8654.c+4 -100 replies

Reviews trailers per patch

3 of 33 patches have a Reviewed-by or Acked-by.

PatchViresh KumarChen-Yu Tsai
1/33
2/33
3/33
4/33
5/33
6/33
7/33
8/33A-b
9/33A-b
10/33
11/33
12/33A-b
13/33
14/33
15/33
16/33
17/33
18/33
19/33
20/33
21/33
22/33
23/33
24/33
25/33
26/33
27/33
28/33
29/33
30/33
31/33
32/33
33/33

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

Read the v1 thread

Cover letter [PATCH 00/33] Input: Automated coccinelle cleanup

This patch series is the result of applying a set of coccinelle semantic patches to the input subsystem. The patches are only cleanup patches; there is little or no change in functionality.

A more complex series of patches making actual code changes will be sent separately. This patch series is a fallout from this more complex series. It may be questionable if the patches in this series, or any of them, are worth it. I'll leave that up to the maintainers to decide.

A surprising aspect of this patch series is the number of removed calls to platform_set_drvdata() and i2c_set_clientdata(). While I have not found any problems with those removals, this deserves some extra scrutiny from reviewers.

The conversion was done automatically with coccinelle using several semantic patches. The semantic patches and the scripts used to generate this commit log are available at https://github.com/groeck/coccinelle-patches.
A few files had to be edited manually to fix checkpatch issues. Those edits were also handled automatically with fixup patches included in the repository.

The series was build tested on kerneltests.org and by the 0day build system.

To reproduce this series of patches, checkout the tree above, then run the following commands from the Linux source tree.

sh ~coccinelle-patches/input/make-base.sh
sh ~coccinelle-patches/input/do-commit-base.sh

The patch series is based on v4.10-rc3. For convenience, the series
is available at:
git://git.kernel.org/pub/scm/linux/kernel/git/groeck/linux-staging.git input-base

The semantic patches used in this series were written with substantial help from Julia Lawall. Without her support, this effort would not have been possible.

----------------------------------------------------------------
Guenter Roeck (33):
Input: adp5520-keys - Drop unnecessary error messages and other changes
Input: bcm-keypad - Drop unnecessary call to platform_set_drvdata and other changes
Input: cap11xx - Drop unnecessary call to i2c_set_clientdata and other changes
Input: cros_ec_keyb - Drop unnecessary call to dev_set_drvdata and other changes
Input: imx_keypad - Drop unnecessary error messages and other changes
Input: samsung-keypad - Drop unnecessary error messages and other changes
Input: sh_keysc - Drop unnecessary error messages and other changes
Input: spear-keyboard - Drop unnecessary error messages and other changes
Input: sun4i-lradc-keys - Drop unnecessary call to platform_set_drvdata and other changes
Input: twl4030_keypad - Drop unnecessary call to platform_set_drvdata and other changes
Input: ab8500-ponkey - Drop unnecessary call to platform_set_drvdata and other changes
Input: axp20x-pek - Use devm_add_action_or_reset and other changes
Input: bfin_rotary - Use 'dev' instead of dereferencing it and other changes
Input: gpio_decoder - Drop unnecessary call to platform_set_drvdata and other changes
Input: kxtj9 - Drop unnecessary error messages and other changes
Input: mma8450 - Drop unnecessary call to i2c_set_clientdata and other changes
Input: retu-pwrbutton - Simplify error return and other changes
Input: soc_button_array - Use 'dev' instead of dereferencing it and other changes
Input: tps65218-pwrbutton - Drop unnecessary call to platform_set_drvdata and other changes
Input: elan_i2c_core - Use 'dev' instead of dereferencing it and other changes
Input: arc_ps2 - Drop unnecessary error messages and other changes
Input: at32psif - Drop unnecessary error messages and other changes
Input: xilinx_ps2 - Use 'dev' instead of dereferencing it and other changes
Input: ar1021_i2c - Drop unnecessary call to i2c_set_clientdata and other changes
Input: atmel-wm97xx - Drop unnecessary error messages and other changes
Input: atmel_mxt_ts - Drop unnecessary error messages and other changes
Input: eeti_ts - Drop unnecessary error messages and other changes
Input: egalax_ts - Drop unnecessary call to i2c_set_clientdata and other changes
Input: melfas_mip4 - Use devm_add_action_or_reset and other changes
Input: raydium_i2c_ts - Simplify error return and other changes
Input: rohm_bu21023 - Use 'dev' instead of dereferencing it and other changes
Input: sis_i2c - Drop unnecessary call to i2c_set_clientdata and other changes
Input: sx8654 - Drop unnecessary call to i2c_set_clientdata and other changes

 drivers/input/keyboard/adp5520-keys.c      |  4 +-
 drivers/input/keyboard/bcm-keypad.c        |  2 -
 drivers/input/keyboard/cap11xx.c           | 14 ++-----
 drivers/input/keyboard/cros_ec_keyb.c      |  3 +-
 drivers/input/keyboard/imx_keypad.c        |  4 +-
 drivers/input/keyboard/samsung-keypad.c    | 12 ++----
 drivers/input/keyboard/sh_keysc.c          | 15 +++-----
 drivers/input/keyboard/spear-keyboard.c    |  4 +-
 drivers/input/keyboard/sun4i-lradc-keys.c  |  7 +---
 drivers/input/keyboard/twl4030_keypad.c    |  1 -
 drivers/input/misc/ab8500-ponkey.c         |  1 -
 drivers/input/misc/axp20x-pek.c            |  6 +--
 drivers/input/misc/bfin_rotary.c           | 18 ++++-----
 drivers/input/misc/gpio_decoder.c          |  1 -
 drivers/input/misc/kxtj9.c                 | 12 ++----
 drivers/input/misc/mma8450.c               |  2 -
 drivers/input/misc/retu-pwrbutton.c        | 12 +-----
 drivers/input/misc/soc_button_array.c      |  6 +--
 drivers/input/misc/tps65218-pwrbutton.c    | 11 ++----
 drivers/input/mouse/elan_i2c_core.c        | 59 +++++++++++-------------------
 drivers/input/serio/arc_ps2.c              |  4 +-
 drivers/input/serio/at32psif.c             | 12 ++----
 drivers/input/serio/xilinx_ps2.c           |  7 ++--
 drivers/input/touchscreen/ar1021_i2c.c     |  6 +--
 drivers/input/touchscreen/atmel-wm97xx.c   |  4 +-
 drivers/input/touchscreen/atmel_mxt_ts.c   | 47 +++++-------------------
 drivers/input/touchscreen/eeti_ts.c        |  7 +---
 drivers/input/touchscreen/egalax_ts.c      | 21 ++---------
 drivers/input/touchscreen/melfas_mip4.c    | 10 ++---
 drivers/input/touchscreen/raydium_i2c_ts.c | 18 +++------
 drivers/input/touchscreen/rohm_bu21023.c   | 12 +++---
 drivers/input/touchscreen/sis_i2c.c        |  1 -
 drivers/input/touchscreen/sx8654.c         | 14 ++-----
 33 files changed, 105 insertions(+), 252 deletions(-)