* [PATCH 11/11] iio: hid-sensor-accel-3d: use ! instead of explicit NULL check
[not found] <20260616-15-jun-hid-iio-alignment-v1-0-950d25a05d9a@gmail.com>
@ 2026-06-16 11:01 ` Sanjay Chitroda
0 siblings, 0 replies; 2+ messages in thread
From: Sanjay Chitroda @ 2026-06-16 11:01 UTC (permalink / raw)
To: jikos, jic23, srinivas.pandruvada, David Lechner, Nuno Sá,
Andy Shevchenko
Cc: linux-input, linux-iio, linux-kernel
From: Sanjay Chitroda <sanjayembeddedse@gmail.com>
Replace 'if (indio_dev == NULL)' with 'if (!indio_dev)' in to follow
the preferred kernel style.
No functional change.
Signed-off-by: Sanjay Chitroda <sanjayembeddedse@gmail.com>
---
drivers/iio/accel/hid-sensor-accel-3d.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/iio/accel/hid-sensor-accel-3d.c b/drivers/iio/accel/hid-sensor-accel-3d.c
index 42c4259bf209..0999f7dbf434 100644
--- a/drivers/iio/accel/hid-sensor-accel-3d.c
+++ b/drivers/iio/accel/hid-sensor-accel-3d.c
@@ -329,7 +329,7 @@ static int hid_accel_3d_probe(struct platform_device *pdev)
indio_dev = devm_iio_device_alloc(&pdev->dev,
sizeof(struct accel_3d_state));
- if (indio_dev == NULL)
+ if (!indio_dev)
return -ENOMEM;
platform_set_drvdata(pdev, indio_dev);
--
2.34.1
^ permalink raw reply [flat|nested] 2+ messages in thread
* [PATCH 00/11] HID: iio: warning clean up and prefer kernel coding style
@ 2026-06-16 10:26 Sanjay Chitroda
2026-06-16 11:11 ` [PATCH 11/11] iio: hid-sensor-accel-3d: use ! instead of explicit NULL check Sanjay Chitroda
0 siblings, 1 reply; 2+ messages in thread
From: Sanjay Chitroda @ 2026-06-16 10:26 UTC (permalink / raw)
To: Jonathan Cameron, David Lechner, Nuno Sá,
Andy Shevchenko, Jiri Kosina, Srinivas Pandruvada
Cc: linux-iio, linux-kernel, linux-input, Sanjay Chitroda, Zhang Lixu
Hi all,
This series updates HID IIO drivers to resolve checkpatch and
kernel coding style issue.
This improves readability and follow standard kernel coding style
No functional changes are introduced.
Testing:
- Compiled with W=1 for each patch in the series
---
Sanjay Chitroda (11):
iio: hid-sensors: add missing blank line after declarations
iio: humidity: hid-sensor-humidity: align parenthesis for readability
iio: gyro: hid-sensor-gyro-3d: align parenthesis for readability
iio: magnetometer: hid-sensor-magn-3d: align parenthesis for readability
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
iio: hid-sensor-magn-3d: use ! instead of explicit NULL check
iio: hid-sensor-rotation: use ! instead of explicit NULL check
iio: hid-sensor-incl-3d: use ! instead of explicit NULL check
iio: hid-sensor-accel-3d: use ! instead of explicit NULL check
drivers/iio/accel/hid-sensor-accel-3d.c | 2 +-
.../iio/common/hid-sensors/hid-sensor-trigger.c | 3 +
drivers/iio/gyro/hid-sensor-gyro-3d.c | 58 ++++++++--------
drivers/iio/humidity/hid-sensor-humidity.c | 48 ++++++-------
drivers/iio/magnetometer/hid-sensor-magn-3d.c | 80 +++++++++++-----------
drivers/iio/orientation/hid-sensor-incl-3d.c | 2 +-
drivers/iio/orientation/hid-sensor-rotation.c | 2 +-
.../iio/position/hid-sensor-custom-intel-hinge.c | 2 +-
drivers/iio/temperature/hid-sensor-temperature.c | 4 +-
9 files changed, 102 insertions(+), 99 deletions(-)
---
base-commit: a50909aa46dec46de3c73235fc15a7d6f763d996
change-id: 20260615-15-jun-hid-iio-alignment-46bba7279be3
Best regards,
--
Sanjay Chitroda <sanjayembeddedse@gmail.com>
^ permalink raw reply [flat|nested] 2+ messages in thread* [PATCH 11/11] iio: hid-sensor-accel-3d: use ! instead of explicit NULL check
2026-06-16 10:26 [PATCH 00/11] HID: iio: warning clean up and prefer kernel coding style Sanjay Chitroda
@ 2026-06-16 11:11 ` Sanjay Chitroda
0 siblings, 0 replies; 2+ messages in thread
From: Sanjay Chitroda @ 2026-06-16 11:11 UTC (permalink / raw)
To: jikos, jic23, srinivas.pandruvada, David Lechner, Nuno Sá,
Andy Shevchenko
Cc: linux-input, linux-iio, linux-kernel
From: Sanjay Chitroda <sanjayembeddedse@gmail.com>
Replace 'if (indio_dev == NULL)' with 'if (!indio_dev)' in to follow
the preferred kernel style.
No functional change.
Signed-off-by: Sanjay Chitroda <sanjayembeddedse@gmail.com>
---
drivers/iio/accel/hid-sensor-accel-3d.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/iio/accel/hid-sensor-accel-3d.c b/drivers/iio/accel/hid-sensor-accel-3d.c
index 42c4259bf209..0999f7dbf434 100644
--- a/drivers/iio/accel/hid-sensor-accel-3d.c
+++ b/drivers/iio/accel/hid-sensor-accel-3d.c
@@ -329,7 +329,7 @@ static int hid_accel_3d_probe(struct platform_device *pdev)
indio_dev = devm_iio_device_alloc(&pdev->dev,
sizeof(struct accel_3d_state));
- if (indio_dev == NULL)
+ if (!indio_dev)
return -ENOMEM;
platform_set_drvdata(pdev, indio_dev);
--
2.34.1
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2026-06-16 11:11 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
[not found] <20260616-15-jun-hid-iio-alignment-v1-0-950d25a05d9a@gmail.com>
2026-06-16 11:01 ` [PATCH 11/11] iio: hid-sensor-accel-3d: use ! instead of explicit NULL check Sanjay Chitroda
2026-06-16 10:26 [PATCH 00/11] HID: iio: warning clean up and prefer kernel coding style Sanjay Chitroda
2026-06-16 11:11 ` [PATCH 11/11] iio: hid-sensor-accel-3d: use ! instead of explicit NULL check Sanjay Chitroda
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®