* [PATCH v3 0/2] iio: adc: ad7779: Remove dead code and redundant error message
@ 2026-07-02 11:46 Moksh Panicker
2026-07-02 11:46 ` [PATCH v3 1/2] iio: adc: ad7779: Remove unused completion field Moksh Panicker
2026-07-02 11:46 ` [PATCH v3 2/2] iio: adc: ad7779: Remove redundant dev_err_probe() after devm_request_irq() Moksh Panicker
0 siblings, 2 replies; 7+ messages in thread
From: Moksh Panicker @ 2026-07-02 11:46 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.
v3: Fix double blank line left after removing the completion field
v2: Add cover letter; send as fresh thread (not as reply to v1)
v1: Initial submission
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] 7+ messages in thread* [PATCH v3 1/2] iio: adc: ad7779: Remove unused completion field
2026-07-02 11:46 [PATCH v3 0/2] iio: adc: ad7779: Remove dead code and redundant error message Moksh Panicker
@ 2026-07-02 11:46 ` Moksh Panicker
2026-07-02 11:54 ` Joshua Crofts
2026-07-02 11:46 ` [PATCH v3 2/2] iio: adc: ad7779: Remove redundant dev_err_probe() after devm_request_irq() Moksh Panicker
1 sibling, 1 reply; 7+ messages in thread
From: Moksh Panicker @ 2026-07-02 11:46 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] 7+ messages in thread* Re: [PATCH v3 1/2] iio: adc: ad7779: Remove unused completion field
2026-07-02 11:46 ` [PATCH v3 1/2] iio: adc: ad7779: Remove unused completion field Moksh Panicker
@ 2026-07-02 11:54 ` Joshua Crofts
2026-07-02 17:01 ` Jonathan Cameron
0 siblings, 1 reply; 7+ messages in thread
From: Joshua Crofts @ 2026-07-02 11:54 UTC (permalink / raw)
To: Moksh Panicker
Cc: jic23, nuno.sa, Michael.Hennerich, dlechner, linux-iio,
linux-kernel, skhan
On Thu, 2 Jul 2026 11:46:48 +0000
Moksh Panicker <mokshpanicker.7@gmail.com> wrote:
> 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);
>
Remove the blank line here as well.
> ret = devm_iio_triggered_buffer_setup(dev, indio_dev,
> &iio_pollfunc_store_time,
--
Kind regards
CJD
^ permalink raw reply [flat|nested] 7+ messages in thread* Re: [PATCH v3 1/2] iio: adc: ad7779: Remove unused completion field
2026-07-02 11:54 ` Joshua Crofts
@ 2026-07-02 17:01 ` Jonathan Cameron
0 siblings, 0 replies; 7+ messages in thread
From: Jonathan Cameron @ 2026-07-02 17:01 UTC (permalink / raw)
To: Joshua Crofts
Cc: Moksh Panicker, nuno.sa, Michael.Hennerich, dlechner, linux-iio,
linux-kernel, skhan
On Thu, 2 Jul 2026 13:54:28 +0200
Joshua Crofts <joshua.crofts1@gmail.com> wrote:
> On Thu, 2 Jul 2026 11:46:48 +0000
> Moksh Panicker <mokshpanicker.7@gmail.com> wrote:
>
> > 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);
> >
>
> Remove the blank line here as well.
Fixed up and applied.
>
> > ret = devm_iio_triggered_buffer_setup(dev, indio_dev,
> > &iio_pollfunc_store_time,
>
>
>
^ permalink raw reply [flat|nested] 7+ messages in thread
* [PATCH v3 2/2] iio: adc: ad7779: Remove redundant dev_err_probe() after devm_request_irq()
2026-07-02 11:46 [PATCH v3 0/2] iio: adc: ad7779: Remove dead code and redundant error message Moksh Panicker
2026-07-02 11:46 ` [PATCH v3 1/2] iio: adc: ad7779: Remove unused completion field Moksh Panicker
@ 2026-07-02 11:46 ` Moksh Panicker
2026-07-02 11:54 ` Joshua Crofts
1 sibling, 1 reply; 7+ messages in thread
From: Moksh Panicker @ 2026-07-02 11:46 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] 7+ messages in thread
* Re: [PATCH v3 2/2] iio: adc: ad7779: Remove redundant dev_err_probe() after devm_request_irq()
2026-07-02 11:46 ` [PATCH v3 2/2] iio: adc: ad7779: Remove redundant dev_err_probe() after devm_request_irq() Moksh Panicker
@ 2026-07-02 11:54 ` Joshua Crofts
2026-07-02 17:01 ` Jonathan Cameron
0 siblings, 1 reply; 7+ messages in thread
From: Joshua Crofts @ 2026-07-02 11:54 UTC (permalink / raw)
To: Moksh Panicker
Cc: jic23, nuno.sa, Michael.Hennerich, dlechner, linux-iio,
linux-kernel, skhan
On Thu, 2 Jul 2026 11:46:49 +0000
Moksh Panicker <mokshpanicker.7@gmail.com> wrote:
> 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)
Reviewed-by: Joshua Crofts <joshua.crofts1@gmail.com>
--
Kind regards
CJD
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH v3 2/2] iio: adc: ad7779: Remove redundant dev_err_probe() after devm_request_irq()
2026-07-02 11:54 ` Joshua Crofts
@ 2026-07-02 17:01 ` Jonathan Cameron
0 siblings, 0 replies; 7+ messages in thread
From: Jonathan Cameron @ 2026-07-02 17:01 UTC (permalink / raw)
To: Joshua Crofts
Cc: Moksh Panicker, nuno.sa, Michael.Hennerich, dlechner, linux-iio,
linux-kernel, skhan
On Thu, 2 Jul 2026 13:54:54 +0200
Joshua Crofts <joshua.crofts1@gmail.com> wrote:
> On Thu, 2 Jul 2026 11:46:49 +0000
> Moksh Panicker <mokshpanicker.7@gmail.com> wrote:
>
> > 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)
>
> Reviewed-by: Joshua Crofts <joshua.crofts1@gmail.com>
>
Applied.
^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2026-07-02 17:01 UTC | newest]
Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-07-02 11:46 [PATCH v3 0/2] iio: adc: ad7779: Remove dead code and redundant error message Moksh Panicker
2026-07-02 11:46 ` [PATCH v3 1/2] iio: adc: ad7779: Remove unused completion field Moksh Panicker
2026-07-02 11:54 ` Joshua Crofts
2026-07-02 17:01 ` Jonathan Cameron
2026-07-02 11:46 ` [PATCH v3 2/2] iio: adc: ad7779: Remove redundant dev_err_probe() after devm_request_irq() Moksh Panicker
2026-07-02 11:54 ` Joshua Crofts
2026-07-02 17:01 ` Jonathan Cameron
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox