diff mbox series

[v2,3/9] iio: adis16475: do not return ints in irq handlers

Message ID 20210422101911.135630-4-nuno.sa@analog.com (mailing list archive)
State New, archived
Headers show
Series Adis IRQ fixes and minor improvements | expand

Commit Message

Nuno Sa April 22, 2021, 10:19 a.m. UTC
On an IRQ handler we should return normal error codes as 'irqreturn_t'
is expected.

Fixes: fff7352bf7a3c ("iio: imu: Add support for adis16475")
Signed-off-by: Nuno Sa <nuno.sa@analog.com>
---
 drivers/iio/imu/adis16475.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Alexandru Ardelean April 23, 2021, 6:41 a.m. UTC | #1
On Thu, Apr 22, 2021 at 1:17 PM Nuno Sa <nuno.sa@analog.com> wrote:
>
> On an IRQ handler we should return normal error codes as 'irqreturn_t'
> is expected.
>

Reviewed-by: Alexandru Ardelean <ardeleanalex@gmail.com>

> Fixes: fff7352bf7a3c ("iio: imu: Add support for adis16475")
> Signed-off-by: Nuno Sa <nuno.sa@analog.com>
> ---
>  drivers/iio/imu/adis16475.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/iio/imu/adis16475.c b/drivers/iio/imu/adis16475.c
> index 1de62fc79e0f..51b76444db0b 100644
> --- a/drivers/iio/imu/adis16475.c
> +++ b/drivers/iio/imu/adis16475.c
> @@ -1068,7 +1068,7 @@ static irqreturn_t adis16475_trigger_handler(int irq, void *p)
>
>         ret = spi_sync(adis->spi, &adis->msg);
>         if (ret)
> -               return ret;
> +               goto check_burst32;
>
>         adis->spi->max_speed_hz = cached_spi_speed_hz;
>         buffer = adis->buffer;
> --
> 2.31.1
>
Jonathan Cameron April 24, 2021, 11:06 a.m. UTC | #2
On Fri, 23 Apr 2021 09:41:26 +0300
Alexandru Ardelean <ardeleanalex@gmail.com> wrote:

> On Thu, Apr 22, 2021 at 1:17 PM Nuno Sa <nuno.sa@analog.com> wrote:
> >
> > On an IRQ handler we should return normal error codes as 'irqreturn_t'
> > is expected.
> >  
> 
> Reviewed-by: Alexandru Ardelean <ardeleanalex@gmail.com>
> 
> > Fixes: fff7352bf7a3c ("iio: imu: Add support for adis16475")
> > Signed-off-by: Nuno Sa <nuno.sa@analog.com>

Hi Nuno,

This needs a more detailed commit message as it is simply changing
the return code.  That goto does other stuff.
Please add some more info and send a v3 with this + other patches
I that build on it and hence I won't be able to apply.

Whilst this one is a real bug, I'm not that fussed about backporting
it quickly so will probably be fine to take this via togreg once the
commit message gives enough detail.

Thanks,

Jonathan


> > ---
> >  drivers/iio/imu/adis16475.c | 2 +-
> >  1 file changed, 1 insertion(+), 1 deletion(-)
> >
> > diff --git a/drivers/iio/imu/adis16475.c b/drivers/iio/imu/adis16475.c
> > index 1de62fc79e0f..51b76444db0b 100644
> > --- a/drivers/iio/imu/adis16475.c
> > +++ b/drivers/iio/imu/adis16475.c
> > @@ -1068,7 +1068,7 @@ static irqreturn_t adis16475_trigger_handler(int irq, void *p)
> >
> >         ret = spi_sync(adis->spi, &adis->msg);
> >         if (ret)
> > -               return ret;
> > +               goto check_burst32;
> >
> >         adis->spi->max_speed_hz = cached_spi_speed_hz;
> >         buffer = adis->buffer;
> > --
> > 2.31.1
> >
Nuno Sa April 26, 2021, 9:45 a.m. UTC | #3
> From: Jonathan Cameron <jic23@kernel.org>
> Sent: Saturday, April 24, 2021 1:07 PM
> To: Alexandru Ardelean <ardeleanalex@gmail.com>
> Cc: Sa, Nuno <Nuno.Sa@analog.com>; linux-iio <linux-
> iio@vger.kernel.org>; Hennerich, Michael
> <Michael.Hennerich@analog.com>; Lars-Peter Clausen
> <lars@metafoo.de>
> Subject: Re: [PATCH v2 3/9] iio: adis16475: do not return ints in irq
> handlers
> 
> [External]
> 
> On Fri, 23 Apr 2021 09:41:26 +0300
> Alexandru Ardelean <ardeleanalex@gmail.com> wrote:
> 
> > On Thu, Apr 22, 2021 at 1:17 PM Nuno Sa <nuno.sa@analog.com>
> wrote:
> > >
> > > On an IRQ handler we should return normal error codes as
> 'irqreturn_t'
> > > is expected.
> > >
> >
> > Reviewed-by: Alexandru Ardelean <ardeleanalex@gmail.com>
> >
> > > Fixes: fff7352bf7a3c ("iio: imu: Add support for adis16475")
> > > Signed-off-by: Nuno Sa <nuno.sa@analog.com>
> 
> Hi Nuno,
> 
> This needs a more detailed commit message as it is simply changing
> the return code.  That goto does other stuff.
> Please add some more info and send a v3 with this + other patches
> I that build on it and hence I won't be able to apply.
> 
> Whilst this one is a real bug, I'm not that fussed about backporting
> it quickly so will probably be fine to take this via togreg once the
> commit message gives enough detail.

Agreed...

- Nuno Sá
diff mbox series

Patch

diff --git a/drivers/iio/imu/adis16475.c b/drivers/iio/imu/adis16475.c
index 1de62fc79e0f..51b76444db0b 100644
--- a/drivers/iio/imu/adis16475.c
+++ b/drivers/iio/imu/adis16475.c
@@ -1068,7 +1068,7 @@  static irqreturn_t adis16475_trigger_handler(int irq, void *p)
 
 	ret = spi_sync(adis->spi, &adis->msg);
 	if (ret)
-		return ret;
+		goto check_burst32;
 
 	adis->spi->max_speed_hz = cached_spi_speed_hz;
 	buffer = adis->buffer;