* [PATCH v2 0/2] iio: adc: ad7779: Remove dead code and redundant error message
@ 2026-06-28 14:57 Moksh Panicker
2026-06-28 14:57 ` [PATCH v2 1/2] iio: adc: ad7779: Remove unused completion field Moksh Panicker
` (2 more replies)
0 siblings, 3 replies; 4+ messages in thread
From: Moksh Panicker @ 2026-06-28 14:57 UTC (permalink / raw)
To: jic23
Cc: nuno.sa, Michael.Hennerich, dlechner, joshua.crofts1, linux-iio,
linux-kernel, skhan, Moksh Panicker
These two patches address review feedback from Joshua Crofts on the
ad7779 driver:
1. Remove an unused completion field that was initialized but never
waited on or signaled anywhere in the driver.
2. Remove a redundant dev_err_probe() wrapper around devm_request_irq(),
which already calls dev_err_probe() internally.
Moksh Panicker (2):
iio: adc: ad7779: Remove unused completion field
iio: adc: ad7779: Remove redundant dev_err_probe() after
devm_request_irq()
drivers/iio/adc/ad7779.c | 5 +----
1 file changed, 1 insertion(+), 4 deletions(-)
--
2.34.1
^ permalink raw reply [flat|nested] 4+ messages in thread
* [PATCH v2 1/2] iio: adc: ad7779: Remove unused completion field
2026-06-28 14:57 [PATCH v2 0/2] iio: adc: ad7779: Remove dead code and redundant error message Moksh Panicker
@ 2026-06-28 14:57 ` Moksh Panicker
2026-06-28 14:57 ` [PATCH v2 2/2] iio: adc: ad7779: Remove redundant dev_err_probe() after devm_request_irq() Moksh Panicker
2026-06-28 17:13 ` [PATCH v2 0/2] iio: adc: ad7779: Remove dead code and redundant error message Joshua Crofts
2 siblings, 0 replies; 4+ messages in thread
From: Moksh Panicker @ 2026-06-28 14:57 UTC (permalink / raw)
To: jic23
Cc: nuno.sa, Michael.Hennerich, dlechner, joshua.crofts1, linux-iio,
linux-kernel, skhan, Moksh Panicker
struct ad7779_state contains a completion field that is initialized
in ad7779_setup_without_backend() but never waited on or signaled
anywhere in the driver. Remove the dead code.
Suggested-by: Joshua Crofts <joshua.crofts1@gmail.com>
Signed-off-by: Moksh Panicker <mokshpanicker.7@gmail.com>
---
drivers/iio/adc/ad7779.c | 2 --
1 file changed, 2 deletions(-)
diff --git a/drivers/iio/adc/ad7779.c b/drivers/iio/adc/ad7779.c
index 695cc79e78da..c1a99b4c1256 100644
--- a/drivers/iio/adc/ad7779.c
+++ b/drivers/iio/adc/ad7779.c
@@ -143,7 +143,6 @@ struct ad7779_state {
const struct ad7779_chip_info *chip_info;
struct clk *mclk;
struct iio_trigger *trig;
- struct completion completion;
unsigned int sampling_freq;
enum ad7779_filter filter_enabled;
struct iio_backend *back;
@@ -852,7 +851,6 @@ static int ad7779_setup_without_backend(struct ad7779_state *st, struct iio_dev
indio_dev->trig = iio_trigger_get(st->trig);
- init_completion(&st->completion);
ret = devm_iio_triggered_buffer_setup(dev, indio_dev,
&iio_pollfunc_store_time,
--
2.34.1
^ permalink raw reply related [flat|nested] 4+ messages in thread
* [PATCH v2 2/2] iio: adc: ad7779: Remove redundant dev_err_probe() after devm_request_irq()
2026-06-28 14:57 [PATCH v2 0/2] iio: adc: ad7779: Remove dead code and redundant error message Moksh Panicker
2026-06-28 14:57 ` [PATCH v2 1/2] iio: adc: ad7779: Remove unused completion field Moksh Panicker
@ 2026-06-28 14:57 ` Moksh Panicker
2026-06-28 17:13 ` [PATCH v2 0/2] iio: adc: ad7779: Remove dead code and redundant error message Joshua Crofts
2 siblings, 0 replies; 4+ messages in thread
From: Moksh Panicker @ 2026-06-28 14:57 UTC (permalink / raw)
To: jic23
Cc: nuno.sa, Michael.Hennerich, dlechner, joshua.crofts1, linux-iio,
linux-kernel, skhan, Moksh Panicker
devm_request_irq() already prints an error message on failure via the
IRQ core, so wrapping its return value in dev_err_probe() results in a
duplicate error message. Return the error directly instead.
Suggested-by: Joshua Crofts <joshua.crofts1@gmail.com>
Signed-off-by: Moksh Panicker <mokshpanicker.7@gmail.com>
---
drivers/iio/adc/ad7779.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/drivers/iio/adc/ad7779.c b/drivers/iio/adc/ad7779.c
index c1a99b4c1256..a5b8bfa99a74 100644
--- a/drivers/iio/adc/ad7779.c
+++ b/drivers/iio/adc/ad7779.c
@@ -842,8 +842,7 @@ static int ad7779_setup_without_backend(struct ad7779_state *st, struct iio_dev
IRQF_NO_THREAD | IRQF_NO_AUTOEN, indio_dev->name,
st->trig);
if (ret)
- return dev_err_probe(dev, ret, "request IRQ %d failed\n",
- st->spi->irq);
+ return ret;
ret = devm_iio_trigger_register(dev, st->trig);
if (ret)
--
2.34.1
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PATCH v2 0/2] iio: adc: ad7779: Remove dead code and redundant error message
2026-06-28 14:57 [PATCH v2 0/2] iio: adc: ad7779: Remove dead code and redundant error message Moksh Panicker
2026-06-28 14:57 ` [PATCH v2 1/2] iio: adc: ad7779: Remove unused completion field Moksh Panicker
2026-06-28 14:57 ` [PATCH v2 2/2] iio: adc: ad7779: Remove redundant dev_err_probe() after devm_request_irq() Moksh Panicker
@ 2026-06-28 17:13 ` Joshua Crofts
2 siblings, 0 replies; 4+ messages in thread
From: Joshua Crofts @ 2026-06-28 17:13 UTC (permalink / raw)
To: Moksh Panicker
Cc: jic23, nuno.sa, Michael.Hennerich, dlechner, linux-iio,
linux-kernel, skhan
On Sun, 28 Jun 2026 14:57:32 +0000
Moksh Panicker <mokshpanicker.7@gmail.com> wrote:
> These two patches address review feedback from Joshua Crofts on the
> ad7779 driver:
>
> 1. Remove an unused completion field that was initialized but never
> waited on or signaled anywhere in the driver.
>
> 2. Remove a redundant dev_err_probe() wrapper around devm_request_irq(),
> which already calls dev_err_probe() internally.
>
> Moksh Panicker (2):
> iio: adc: ad7779: Remove unused completion field
> iio: adc: ad7779: Remove redundant dev_err_probe() after
> devm_request_irq()
>
> drivers/iio/adc/ad7779.c | 5 +----
> 1 file changed, 1 insertion(+), 4 deletions(-)
>
You forgot to pull my Reviewed-by tags, no need to resend:
Reviewed-by: Joshua Crofts <joshua.crofts1@gmail.com>
--
Kind regards
CJD
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2026-06-28 17:13 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-06-28 14:57 [PATCH v2 0/2] iio: adc: ad7779: Remove dead code and redundant error message Moksh Panicker
2026-06-28 14:57 ` [PATCH v2 1/2] iio: adc: ad7779: Remove unused completion field Moksh Panicker
2026-06-28 14:57 ` [PATCH v2 2/2] iio: adc: ad7779: Remove redundant dev_err_probe() after devm_request_irq() Moksh Panicker
2026-06-28 17:13 ` [PATCH v2 0/2] iio: adc: ad7779: Remove dead code and redundant error message Joshua Crofts
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox