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

From: Sanjay Chitroda via B4 Relay

Date: Thu Jul 02 2026 - 12:25:07 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.
- use common device for devres framework;

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 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/all/20260616-15-jun-hid-iio-alignment-v1-0-0cd544286575@xxxxxxxxx

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

---
Sanjay Chitroda (6):
iio: hid-sensors: add/remove blank line
iio: hid-sensors: align function parenthesis for readability
iio: hid-sensors: Use implicit NULL pointer checks
iio: humidity: hid-sensor-humidity: use common device for devres
iio: position: hid-sensor-custom-intel-hinge: use common device for devres
iio: temperature: hid-sensor-temperature: use common device for devres

drivers/iio/accel/hid-sensor-accel-3d.c | 48 ++++++------
.../iio/common/hid-sensors/hid-sensor-attributes.c | 89 +++++++++++-----------
.../iio/common/hid-sensors/hid-sensor-trigger.c | 5 +-
.../iio/common/hid-sensors/hid-sensor-trigger.h | 2 +-
drivers/iio/gyro/hid-sensor-gyro-3d.c | 54 ++++++-------
drivers/iio/humidity/hid-sensor-humidity.c | 49 ++++++------
drivers/iio/light/hid-sensor-als.c | 32 ++++----
drivers/iio/light/hid-sensor-prox.c | 29 +++----
drivers/iio/magnetometer/hid-sensor-magn-3d.c | 76 +++++++++---------
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 | 15 ++--
drivers/iio/pressure/hid-sensor-press.c | 35 ++++-----
drivers/iio/temperature/hid-sensor-temperature.c | 42 +++++-----
14 files changed, 252 insertions(+), 283 deletions(-)
---
base-commit: 16f3a4a21cab16dc9242a2e0749b026e1f2c5706
change-id: 20260615-15-jun-hid-iio-alignment-46bba7279be3

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