[PATCH v3 0/2] HID: iio: warning clean up and prefer kernel coding style

From: Sanjay Chitroda via B4 Relay

Date: Mon Jul 06 2026 - 16:10:48 EST


Hi all,

This series updates HID sensor IIO drivers to address checkpatch
warnings, improves readability and compliance with kernel coding style.

The changes are:
- replacing explicit NULL comparisons with implicit pointer checks;
- adjusting indentation and alignment;
- reformatting multi-line function declarations for improved
readability and consistency.

While updating alignment and line wrapping, function parameters are
grouped more logically and common callback signatures are formatted
consistently across HID sensor IIO drivers.

Testing:
- Compiled with W=1 for each patch in the series

---
Changes in v3:
- Rebase series on top of iio/testing where parital v2 series is added.
- Rectify commit message and resolve inconsistency highlighted by
Jonathan.
- Link to v2: https://patch.msgid.link/20260702-15-jun-hid-iio-alignment-v2-0-b87f01f5efbc@xxxxxxxxx

Changes in v2:
- Following input from Joshua and Maxwell squash all related changes
in single change as this is code churn.
- Following input from Andy (re-)split function argument/parameter
logically.
- Added review tag of Maxwell to implicit NULL check change while
drop for parenthesis alignemnt to have a fresh review.
- Link to v1: https://lore.kernel.org/20260616-15-jun-hid-iio-alignment-v1-0-0cd544286575@xxxxxxxxx

To: Jiri Kosina <jikos@xxxxxxxxxx>
To: Jonathan Cameron <jic23@xxxxxxxxxx>
To: Srinivas Pandruvada <srinivas.pandruvada@xxxxxxxxxxxxxxx>
To: David Lechner <dlechner@xxxxxxxxxxxx>
To: Nuno Sá <nuno.sa@xxxxxxxxxx>
To: Andy Shevchenko <andy@xxxxxxxxxx>
Cc: linux-input@xxxxxxxxxxxxxxx
Cc: linux-iio@xxxxxxxxxxxxxxx
Cc: linux-kernel@xxxxxxxxxxxxxxx

---
Sanjay Chitroda (2):
iio: hid-sensors: align function parenthesis for readability
iio: hid-sensors: Use implicit NULL pointer checks

drivers/iio/accel/hid-sensor-accel-3d.c | 48 ++++++-------
.../iio/common/hid-sensors/hid-sensor-attributes.c | 80 +++++++++++-----------
.../iio/common/hid-sensors/hid-sensor-trigger.c | 4 +-
.../iio/common/hid-sensors/hid-sensor-trigger.h | 2 +-
drivers/iio/gyro/hid-sensor-gyro-3d.c | 35 ++++------
drivers/iio/humidity/hid-sensor-humidity.c | 33 ++++-----
drivers/iio/light/hid-sensor-als.c | 32 ++++-----
drivers/iio/light/hid-sensor-prox.c | 29 ++++----
drivers/iio/magnetometer/hid-sensor-magn-3d.c | 53 +++++++-------
drivers/iio/orientation/hid-sensor-incl-3d.c | 33 ++++-----
drivers/iio/orientation/hid-sensor-rotation.c | 26 +++----
.../iio/position/hid-sensor-custom-intel-hinge.c | 13 ++--
drivers/iio/pressure/hid-sensor-press.c | 35 ++++------
drivers/iio/temperature/hid-sensor-temperature.c | 30 ++++----
14 files changed, 208 insertions(+), 245 deletions(-)
---
base-commit: 4c0ecdbdc0d87570f74e656e21d56bae1ab6a8f1
change-id: 20260615-15-jun-hid-iio-alignment-46bba7279be3

Best regards,
--
Sanjay Chitroda <sanjayembeddedse@xxxxxxxxx>