* [PATCH 0/2] iio: magnetometer: cleanup unused IIO_CHAN_INFO_PROCESSED handling
@ 2025-09-10 14:06 Dixit Parmar
2025-09-10 14:06 ` [PATCH 1/2] iio: magnetometer: als31300: remove " Dixit Parmar
` (2 more replies)
0 siblings, 3 replies; 4+ messages in thread
From: Dixit Parmar @ 2025-09-10 14:06 UTC (permalink / raw)
To: Jonathan Cameron, David Lechner, Nuno Sá,
Andy Shevchenko, Gerald Loacker
Cc: linux-iio, linux-kernel, Dixit Parmar
This series cleans up dead code in the magnetometer drivers by
removing unused handling for IIO_CHAN_INFO_PROCESSED. None of these
drivers set this bit in info_mask_* fields, so the cases are never
reached.
These changes reduce code paths, improve readability, and make the
switch statements easier to maintain. No functional changes are
intended.
Signed-off-by: Dixit Parmar <dixitparmar19@gmail.com>
---
Dixit Parmar (2):
iio: magnetometer: als31300: remove unused IIO_CHAN_INFO_PROCESSED handling
iio: magnetometer: tmag5273: remove unused IIO_CHAN_INFO_PROCESSED handling
drivers/iio/magnetometer/als31300.c | 1 -
drivers/iio/magnetometer/tmag5273.c | 1 -
2 files changed, 2 deletions(-)
---
base-commit: 76eeb9b8de9880ca38696b2fb56ac45ac0a25c6c
change-id: 20250910-iio_chan_617_rc5-59be964d7451
Best regards,
--
Dixit Parmar <dixitparmar19@gmail.com>
^ permalink raw reply [flat|nested] 4+ messages in thread
* [PATCH 1/2] iio: magnetometer: als31300: remove unused IIO_CHAN_INFO_PROCESSED handling
2025-09-10 14:06 [PATCH 0/2] iio: magnetometer: cleanup unused IIO_CHAN_INFO_PROCESSED handling Dixit Parmar
@ 2025-09-10 14:06 ` Dixit Parmar
2025-09-10 14:06 ` [PATCH 2/2] iio: magnetometer: tmag5273: " Dixit Parmar
2025-09-10 16:32 ` [PATCH 0/2] iio: magnetometer: cleanup " Jonathan Cameron
2 siblings, 0 replies; 4+ messages in thread
From: Dixit Parmar @ 2025-09-10 14:06 UTC (permalink / raw)
To: Jonathan Cameron, David Lechner, Nuno Sá,
Andy Shevchenko, Gerald Loacker
Cc: linux-iio, linux-kernel, Dixit Parmar
The als31300 driver does not advertise IIO_CHAN_INFO_PROCESSED in its
info_mask_* fields, so the corresponding case in read_raw() is never used.
Drop the dead code to reduce unnecessary branches and improve clarity.
Signed-off-by: Dixit Parmar <dixitparmar19@gmail.com>
---
drivers/iio/magnetometer/als31300.c | 1 -
1 file changed, 1 deletion(-)
diff --git a/drivers/iio/magnetometer/als31300.c b/drivers/iio/magnetometer/als31300.c
index f72af829715f..6edc84378ff3 100644
--- a/drivers/iio/magnetometer/als31300.c
+++ b/drivers/iio/magnetometer/als31300.c
@@ -156,7 +156,6 @@ static int als31300_read_raw(struct iio_dev *indio_dev,
int ret;
switch (mask) {
- case IIO_CHAN_INFO_PROCESSED:
case IIO_CHAN_INFO_RAW:
ret = als31300_get_measure(data, &t, &x, &y, &z);
if (ret)
--
2.43.0
^ permalink raw reply [flat|nested] 4+ messages in thread
* [PATCH 2/2] iio: magnetometer: tmag5273: remove unused IIO_CHAN_INFO_PROCESSED handling
2025-09-10 14:06 [PATCH 0/2] iio: magnetometer: cleanup unused IIO_CHAN_INFO_PROCESSED handling Dixit Parmar
2025-09-10 14:06 ` [PATCH 1/2] iio: magnetometer: als31300: remove " Dixit Parmar
@ 2025-09-10 14:06 ` Dixit Parmar
2025-09-10 16:32 ` [PATCH 0/2] iio: magnetometer: cleanup " Jonathan Cameron
2 siblings, 0 replies; 4+ messages in thread
From: Dixit Parmar @ 2025-09-10 14:06 UTC (permalink / raw)
To: Jonathan Cameron, David Lechner, Nuno Sá,
Andy Shevchenko, Gerald Loacker
Cc: linux-iio, linux-kernel, Dixit Parmar
The tmag5273 driver does not advertise IIO_CHAN_INFO_PROCESSED in its
info_mask_* fields, so the corresponding case in read_raw()/write_raw()
is never used.
Drop the dead code to reduce unnecessary branches and improve clarity.
Signed-off-by: Dixit Parmar <dixitparmar19@gmail.com>
---
drivers/iio/magnetometer/tmag5273.c | 1 -
1 file changed, 1 deletion(-)
diff --git a/drivers/iio/magnetometer/tmag5273.c b/drivers/iio/magnetometer/tmag5273.c
index 2ca5c26f0091..ed023eae5e42 100644
--- a/drivers/iio/magnetometer/tmag5273.c
+++ b/drivers/iio/magnetometer/tmag5273.c
@@ -287,7 +287,6 @@ static int tmag5273_read_raw(struct iio_dev *indio_dev,
int ret;
switch (mask) {
- case IIO_CHAN_INFO_PROCESSED:
case IIO_CHAN_INFO_RAW:
ret = pm_runtime_resume_and_get(data->dev);
if (ret < 0)
--
2.43.0
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH 0/2] iio: magnetometer: cleanup unused IIO_CHAN_INFO_PROCESSED handling
2025-09-10 14:06 [PATCH 0/2] iio: magnetometer: cleanup unused IIO_CHAN_INFO_PROCESSED handling Dixit Parmar
2025-09-10 14:06 ` [PATCH 1/2] iio: magnetometer: als31300: remove " Dixit Parmar
2025-09-10 14:06 ` [PATCH 2/2] iio: magnetometer: tmag5273: " Dixit Parmar
@ 2025-09-10 16:32 ` Jonathan Cameron
2 siblings, 0 replies; 4+ messages in thread
From: Jonathan Cameron @ 2025-09-10 16:32 UTC (permalink / raw)
To: Dixit Parmar
Cc: David Lechner, Nuno Sá,
Andy Shevchenko, Gerald Loacker, linux-iio, linux-kernel
On Wed, 10 Sep 2025 19:36:48 +0530
Dixit Parmar <dixitparmar19@gmail.com> wrote:
> This series cleans up dead code in the magnetometer drivers by
> removing unused handling for IIO_CHAN_INFO_PROCESSED. None of these
> drivers set this bit in info_mask_* fields, so the cases are never
> reached.
> These changes reduce code paths, improve readability, and make the
> switch statements easier to maintain. No functional changes are
> intended.
>
> Signed-off-by: Dixit Parmar <dixitparmar19@gmail.com>
> ---
> Dixit Parmar (2):
> iio: magnetometer: als31300: remove unused IIO_CHAN_INFO_PROCESSED handling
> iio: magnetometer: tmag5273: remove unused IIO_CHAN_INFO_PROCESSED handling
>
> drivers/iio/magnetometer/als31300.c | 1 -
> drivers/iio/magnetometer/tmag5273.c | 1 -
> 2 files changed, 2 deletions(-)
> ---
> base-commit: 76eeb9b8de9880ca38696b2fb56ac45ac0a25c6c
> change-id: 20250910-iio_chan_617_rc5-59be964d7451
>
> Best regards,
Good find. Applied to the togreg branch of iio.git and pushed out as testing.
Thanks,
Jonathan
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2025-09-10 16:32 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2025-09-10 14:06 [PATCH 0/2] iio: magnetometer: cleanup unused IIO_CHAN_INFO_PROCESSED handling Dixit Parmar
2025-09-10 14:06 ` [PATCH 1/2] iio: magnetometer: als31300: remove " Dixit Parmar
2025-09-10 14:06 ` [PATCH 2/2] iio: magnetometer: tmag5273: " Dixit Parmar
2025-09-10 16:32 ` [PATCH 0/2] iio: magnetometer: cleanup " Jonathan Cameron
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®