From: Lee Jones <hidden> Date: 2021-01-14 15:24:15
This set is part of a larger effort attempting to clean-up W=1
kernel builds, which are currently overwhelmingly riddled with
niggly little warnings.
This is the second (and last) of 2 sets.
v3:
- Make use of 'ret' instead of removing it
- Use __always_unused instead of removing unused variables
- Fix recent/new warning regarding undocumented 'prop' param
v2:
- Replace empty if() with commentary
- Suggested-by: Joe Perches
Lee Jones (5):
input: mouse: synaptics: Replace NOOP with suitable commentary
input: touchscreen: melfas_mip4: Mark a bunch of variables as
__always_unused
input: touchscreen: usbtouchscreen: Actually check return value of
usb_submit_urb()
input: touchscreen: surface3_spi: Remove set but unused variable
'timestamp'
input: touchscreen: stmpe-ts: Add description for 'prop' struct member
drivers/input/mouse/synaptics.c | 7 +++++--
drivers/input/touchscreen/melfas_mip4.c | 8 ++++----
drivers/input/touchscreen/stmpe-ts.c | 1 +
drivers/input/touchscreen/surface3_spi.c | 2 --
drivers/input/touchscreen/usbtouchscreen.c | 3 +++
5 files changed, 13 insertions(+), 8 deletions(-)
Cc: Alexandre Torgue <redacted>
Cc: Benjamin Tissoires <redacted>
Cc: Bruce Kalk <redacted>
Cc: "C. Scott Ananian" <redacted>
Cc: Daniel Ritz <redacted>
Cc: Dmitry Torokhov <dmitry.torokhov@gmail.com>
Cc: Henrik Rydberg <rydberg@bitmath.org>
Cc: James Hilliard <redacted>
Cc: linux-arm-kernel@lists.infradead.org
Cc: linux-input@vger.kernel.org
Cc: linux-stm32@st-md-mailman.stormreply.com
Cc: Luotao Fu <redacted>
Cc: Maxime Coquelin <mcoquelin.stm32@gmail.com>
Cc: Peter Osterlund <redacted>
Cc: Sangwon Jee <redacted>
Cc: Stefan Gmeiner <redacted>
Cc: Stefan Riedmueller <redacted>
Cc: this to <redacted>
--
2.25.1
From: Lee Jones <hidden> Date: 2021-01-14 15:24:33
Dmitry requested to keep these around for the purposes of documentation.
Fixes the following W=1 kernel build warning(s):
drivers/input/touchscreen/melfas_mip4.c: In function ‘mip4_report_touch’:
drivers/input/touchscreen/melfas_mip4.c:474:5: warning: variable ‘size’ set but not used [-Wunused-but-set-variable]
drivers/input/touchscreen/melfas_mip4.c:472:5: warning: variable ‘pressure_stage’ set but not used [-Wunused-but-set-variable]
drivers/input/touchscreen/melfas_mip4.c:469:7: warning: variable ‘palm’ set but not used [-Wunused-but-set-variable]
drivers/input/touchscreen/melfas_mip4.c:468:7: warning: variable ‘hover’ set but not used [-Wunused-but-set-variable]
Cc: Sangwon Jee <redacted>
Cc: Dmitry Torokhov <dmitry.torokhov@gmail.com>
Cc: Henrik Rydberg <rydberg@bitmath.org>
Cc: linux-input@vger.kernel.org
Signed-off-by: Lee Jones <redacted>
---
drivers/input/touchscreen/melfas_mip4.c | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
From: Lee Jones <hidden> Date: 2021-01-14 15:24:33
Fixes the following W=1 kernel build warning(s):
drivers/input/mouse/synaptics.c: In function ‘synaptics_process_packet’:
drivers/input/mouse/synaptics.c:1110:6: warning: suggest braces around empty body in an ‘if’ statement [-Wempty-body]
Cc: Dmitry Torokhov <dmitry.torokhov@gmail.com>
Cc: Henrik Rydberg <rydberg@bitmath.org>
Cc: Peter Osterlund <redacted>
Cc: Stefan Gmeiner <redacted>
Cc: "C. Scott Ananian" <redacted>
Cc: Bruce Kalk <redacted>
Cc: this to <redacted>
Cc: linux-input@vger.kernel.org
Signed-off-by: Lee Jones <redacted>
---
drivers/input/mouse/synaptics.c | 7 +++++--
1 file changed, 5 insertions(+), 2 deletions(-)
@@ -1106,8 +1106,11 @@ static void synaptics_process_packet(struct psmouse *psmouse)num_fingers=hw.w+2;break;case2:-if(SYN_MODEL_PEN(info->model_id))-;/* Nothing, treat a pen as a single finger */+/*+*Keepdefaults+*+*SYN_MODEL_PEN:Treatpensasasinglefinger+*/break;case4...15:if(SYN_CAP_PALMDETECT(info->capabilities))
From: Lee Jones <hidden> Date: 2021-01-14 15:25:14
Fixes the following W=1 kernel build warning(s):
drivers/input/touchscreen/surface3_spi.c: In function ‘surface3_spi_process_touch’:
drivers/input/touchscreen/surface3_spi.c:97:6: warning: variable ‘timestamp’ set but not used [-Wunused-but-set-variable]
Cc: Dmitry Torokhov <dmitry.torokhov@gmail.com>
Cc: Henrik Rydberg <rydberg@bitmath.org>
Cc: Benjamin Tissoires <redacted>
Cc: linux-input@vger.kernel.org
Signed-off-by: Lee Jones <redacted>
---
drivers/input/touchscreen/surface3_spi.c | 2 --
1 file changed, 2 deletions(-)
From: Lee Jones <hidden> Date: 2021-01-14 15:25:14
Fixes the following W=1 kernel build warning(s):
drivers/input/touchscreen/usbtouchscreen.c: In function ‘nexio_read_data’:
drivers/input/touchscreen/usbtouchscreen.c:1052:50: warning: variable ‘ret’ set but not used [-Wunused-but-set-variable]
Cc: Dmitry Torokhov <dmitry.torokhov@gmail.com>
Cc: Henrik Rydberg <rydberg@bitmath.org>
Cc: James Hilliard <redacted>
Cc: Daniel Ritz <redacted>
Cc: linux-input@vger.kernel.org
Signed-off-by: Lee Jones <redacted>
---
drivers/input/touchscreen/usbtouchscreen.c | 3 +++
1 file changed, 3 insertions(+)
From: Lee Jones <hidden> Date: 2021-01-14 15:25:14
Fixes the following W=1 kernel build warning(s):
drivers/input/touchscreen/stmpe-ts.c:82: warning: Function parameter or member 'prop' not described in 'stmpe_touch'
Cc: Dmitry Torokhov <dmitry.torokhov@gmail.com>
Cc: Maxime Coquelin <mcoquelin.stm32@gmail.com>
Cc: Alexandre Torgue <redacted>
Cc: Stefan Riedmueller <redacted>
Cc: Luotao Fu <redacted>
Cc: linux-input@vger.kernel.org
Cc: linux-stm32@st-md-mailman.stormreply.com
Cc: linux-arm-kernel@lists.infradead.org
Signed-off-by: Lee Jones <redacted>
---
drivers/input/touchscreen/stmpe-ts.c | 1 +
1 file changed, 1 insertion(+)
From: Benjamin Tissoires <hidden> Date: 2021-01-14 16:05:47
On Thu, Jan 14, 2021 at 4:23 PM Lee Jones [off-list ref] wrote:
Fixes the following W=1 kernel build warning(s):
drivers/input/touchscreen/surface3_spi.c: In function ‘surface3_spi_process_touch’:
drivers/input/touchscreen/surface3_spi.c:97:6: warning: variable ‘timestamp’ set but not used [-Wunused-but-set-variable]
Cc: Dmitry Torokhov <dmitry.torokhov@gmail.com>
Cc: Henrik Rydberg <rydberg@bitmath.org>
Cc: Benjamin Tissoires <redacted>
Cc: linux-input@vger.kernel.org
Signed-off-by: Lee Jones <redacted>
Reviewed-by: Benjamin Tissoires <redacted>
Thanks for the cleanup :)
Cheers,
Benjamin
On Thu, Jan 14, 2021 at 03:23:20PM +0000, Lee Jones wrote:
Dmitry requested to keep these around for the purposes of documentation.
Fixes the following W=1 kernel build warning(s):
drivers/input/touchscreen/melfas_mip4.c: In function ‘mip4_report_touch’:
drivers/input/touchscreen/melfas_mip4.c:474:5: warning: variable ‘size’ set but not used [-Wunused-but-set-variable]
drivers/input/touchscreen/melfas_mip4.c:472:5: warning: variable ‘pressure_stage’ set but not used [-Wunused-but-set-variable]
drivers/input/touchscreen/melfas_mip4.c:469:7: warning: variable ‘palm’ set but not used [-Wunused-but-set-variable]
drivers/input/touchscreen/melfas_mip4.c:468:7: warning: variable ‘hover’ set but not used [-Wunused-but-set-variable]
Cc: Sangwon Jee <redacted>
Cc: Dmitry Torokhov <dmitry.torokhov@gmail.com>
Cc: Henrik Rydberg <rydberg@bitmath.org>
Cc: linux-input@vger.kernel.org
Signed-off-by: Lee Jones <redacted>
On Thu, Jan 14, 2021 at 03:23:21PM +0000, Lee Jones wrote:
Fixes the following W=1 kernel build warning(s):
drivers/input/touchscreen/usbtouchscreen.c: In function ‘nexio_read_data’:
drivers/input/touchscreen/usbtouchscreen.c:1052:50: warning: variable ‘ret’ set but not used [-Wunused-but-set-variable]
Cc: Dmitry Torokhov <dmitry.torokhov@gmail.com>
Cc: Henrik Rydberg <rydberg@bitmath.org>
Cc: James Hilliard <redacted>
Cc: Daniel Ritz <redacted>
Cc: linux-input@vger.kernel.org
Signed-off-by: Lee Jones <redacted>
On Thu, Jan 14, 2021 at 03:23:22PM +0000, Lee Jones wrote:
Fixes the following W=1 kernel build warning(s):
drivers/input/touchscreen/surface3_spi.c: In function ‘surface3_spi_process_touch’:
drivers/input/touchscreen/surface3_spi.c:97:6: warning: variable ‘timestamp’ set but not used [-Wunused-but-set-variable]
Cc: Dmitry Torokhov <dmitry.torokhov@gmail.com>
Cc: Henrik Rydberg <rydberg@bitmath.org>
Cc: Benjamin Tissoires <redacted>
Cc: linux-input@vger.kernel.org
Signed-off-by: Lee Jones <redacted>
On Thu, Jan 14, 2021 at 03:23:23PM +0000, Lee Jones wrote:
Fixes the following W=1 kernel build warning(s):
drivers/input/touchscreen/stmpe-ts.c:82: warning: Function parameter or member 'prop' not described in 'stmpe_touch'
Cc: Dmitry Torokhov <dmitry.torokhov@gmail.com>
Cc: Maxime Coquelin <mcoquelin.stm32@gmail.com>
Cc: Alexandre Torgue <redacted>
Cc: Stefan Riedmueller <redacted>
Cc: Luotao Fu <redacted>
Cc: linux-input@vger.kernel.org
Cc: linux-stm32@st-md-mailman.stormreply.com
Cc: linux-arm-kernel@lists.infradead.org
Signed-off-by: Lee Jones <redacted>