* [PATCH] iio: mma8452: Use correct type for return variable in IRQ handler
@ 2021-11-01 10:27 Lars-Peter Clausen
2021-11-01 10:37 ` Andy Shevchenko
0 siblings, 1 reply; 3+ messages in thread
From: Lars-Peter Clausen @ 2021-11-01 10:27 UTC (permalink / raw)
To: Jonathan Cameron; +Cc: Martin Fuzzey, linux-iio, Lars-Peter Clausen
The IRQ handler's return type is irqreturn_t. The mma8452 uses a variable
to store the return value, but the variable is of type int. Change this to
irqreturn_t. This makes it easier to verify that the code is correct.
Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
---
drivers/iio/accel/mma8452.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/iio/accel/mma8452.c b/drivers/iio/accel/mma8452.c
index 09c7f10fefb6..64b82b4503ad 100644
--- a/drivers/iio/accel/mma8452.c
+++ b/drivers/iio/accel/mma8452.c
@@ -1053,7 +1053,7 @@ static irqreturn_t mma8452_interrupt(int irq, void *p)
{
struct iio_dev *indio_dev = p;
struct mma8452_data *data = iio_priv(indio_dev);
- int ret = IRQ_NONE;
+ irqreturn_t ret = IRQ_NONE;
int src;
src = i2c_smbus_read_byte_data(data->client, MMA8452_INT_SRC);
--
2.20.1
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH] iio: mma8452: Use correct type for return variable in IRQ handler
2021-11-01 10:27 [PATCH] iio: mma8452: Use correct type for return variable in IRQ handler Lars-Peter Clausen
@ 2021-11-01 10:37 ` Andy Shevchenko
2021-11-03 18:22 ` Jonathan Cameron
0 siblings, 1 reply; 3+ messages in thread
From: Andy Shevchenko @ 2021-11-01 10:37 UTC (permalink / raw)
To: Lars-Peter Clausen; +Cc: Jonathan Cameron, Martin Fuzzey, linux-iio
On Mon, Nov 1, 2021 at 12:28 PM Lars-Peter Clausen <lars@metafoo.de> wrote:
>
> The IRQ handler's return type is irqreturn_t. The mma8452 uses a variable
> to store the return value, but the variable is of type int. Change this to
> irqreturn_t. This makes it easier to verify that the code is correct.
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
> Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
> ---
> drivers/iio/accel/mma8452.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/iio/accel/mma8452.c b/drivers/iio/accel/mma8452.c
> index 09c7f10fefb6..64b82b4503ad 100644
> --- a/drivers/iio/accel/mma8452.c
> +++ b/drivers/iio/accel/mma8452.c
> @@ -1053,7 +1053,7 @@ static irqreturn_t mma8452_interrupt(int irq, void *p)
> {
> struct iio_dev *indio_dev = p;
> struct mma8452_data *data = iio_priv(indio_dev);
> - int ret = IRQ_NONE;
> + irqreturn_t ret = IRQ_NONE;
> int src;
>
> src = i2c_smbus_read_byte_data(data->client, MMA8452_INT_SRC);
> --
> 2.20.1
>
--
With Best Regards,
Andy Shevchenko
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] iio: mma8452: Use correct type for return variable in IRQ handler
2021-11-01 10:37 ` Andy Shevchenko
@ 2021-11-03 18:22 ` Jonathan Cameron
0 siblings, 0 replies; 3+ messages in thread
From: Jonathan Cameron @ 2021-11-03 18:22 UTC (permalink / raw)
To: Andy Shevchenko; +Cc: Lars-Peter Clausen, Martin Fuzzey, linux-iio
On Mon, 1 Nov 2021 12:37:19 +0200
Andy Shevchenko <andy.shevchenko@gmail.com> wrote:
> On Mon, Nov 1, 2021 at 12:28 PM Lars-Peter Clausen <lars@metafoo.de> wrote:
> >
> > The IRQ handler's return type is irqreturn_t. The mma8452 uses a variable
> > to store the return value, but the variable is of type int. Change this to
> > irqreturn_t. This makes it easier to verify that the code is correct.
>
> Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Applied. Thanks,
>
> > Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
> > ---
> > drivers/iio/accel/mma8452.c | 2 +-
> > 1 file changed, 1 insertion(+), 1 deletion(-)
> >
> > diff --git a/drivers/iio/accel/mma8452.c b/drivers/iio/accel/mma8452.c
> > index 09c7f10fefb6..64b82b4503ad 100644
> > --- a/drivers/iio/accel/mma8452.c
> > +++ b/drivers/iio/accel/mma8452.c
> > @@ -1053,7 +1053,7 @@ static irqreturn_t mma8452_interrupt(int irq, void *p)
> > {
> > struct iio_dev *indio_dev = p;
> > struct mma8452_data *data = iio_priv(indio_dev);
> > - int ret = IRQ_NONE;
> > + irqreturn_t ret = IRQ_NONE;
> > int src;
> >
> > src = i2c_smbus_read_byte_data(data->client, MMA8452_INT_SRC);
> > --
> > 2.20.1
> >
>
>
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2021-11-03 18:18 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-11-01 10:27 [PATCH] iio: mma8452: Use correct type for return variable in IRQ handler Lars-Peter Clausen
2021-11-01 10:37 ` Andy Shevchenko
2021-11-03 18:22 ` Jonathan Cameron
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.