All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jonathan Cameron <Jonathan.Cameron@Huawei.com>
To: Su Hui <suhui@nfschina.com>
Cc: Jonathan Cameron <jic23@kernel.org>, <lars@metafoo.de>,
	<jean-baptiste.maneyrol@tdk.com>, <andy.shevchenko@gmail.com>,
	<chenhuiz@axis.com>, <linux-iio@vger.kernel.org>,
	<linux-kernel@vger.kernel.org>, <kernel-janitors@vger.kernel.org>
Subject: Re: [PATCH v2] iio: imu: inv_mpu6050: fix an error code problem in inv_mpu6050_read_raw
Date: Wed, 1 Nov 2023 10:00:19 +0000	[thread overview]
Message-ID: <20231101100019.00004be7@Huawei.com> (raw)
In-Reply-To: <7555437b-9289-eba4-efa8-965386e0e956@nfschina.com>

On Mon, 30 Oct 2023 10:10:05 +0800
Su Hui <suhui@nfschina.com> wrote:

> On 2023/10/27 21:59, Jonathan Cameron wrote:
> > On Mon, 23 Oct 2023 12:05:52 +0800
> > Su Hui <suhui@nfschina.com> wrote:
> >  
> >> inv_mpu6050_sensor_show() can return -EINVAL or IIO_VAL_INT. Return the
> >> true value rather than only return IIO_VAL_INT.
> >>
> >> Signed-off-by: Su Hui <suhui@nfschina.com>  
> > If you can figure out a fixes tag that would be great.  Just reply to this thread
> > with it and I'll pick it up from here.  
> Oh, I just send a v3 patch, sorry....
> Fixes: d5098447147c ("iio: imu: mpu6050: add calibration offset support")
That works too!

Thanks,

J
> >> ---
> >> v2:
> >>   - fix the error of commit title.
> >> v1:
> >>   - https://lore.kernel.org/all/20231020091413.205743-2-suhui@nfschina.com/
> >>   drivers/iio/imu/inv_mpu6050/inv_mpu_core.c | 4 ++--
> >>   1 file changed, 2 insertions(+), 2 deletions(-)
> >>
> >> diff --git a/drivers/iio/imu/inv_mpu6050/inv_mpu_core.c b/drivers/iio/imu/inv_mpu6050/inv_mpu_core.c
> >> index 29f906c884bd..a9a5fb266ef1 100644
> >> --- a/drivers/iio/imu/inv_mpu6050/inv_mpu_core.c
> >> +++ b/drivers/iio/imu/inv_mpu6050/inv_mpu_core.c
> >> @@ -749,13 +749,13 @@ inv_mpu6050_read_raw(struct iio_dev *indio_dev,
> >>   			ret = inv_mpu6050_sensor_show(st, st->reg->gyro_offset,
> >>   						chan->channel2, val);
> >>   			mutex_unlock(&st->lock);
> >> -			return IIO_VAL_INT;
> >> +			return ret;
> >>   		case IIO_ACCEL:
> >>   			mutex_lock(&st->lock);
> >>   			ret = inv_mpu6050_sensor_show(st, st->reg->accl_offset,
> >>   						chan->channel2, val);
> >>   			mutex_unlock(&st->lock);
> >> -			return IIO_VAL_INT;
> >> +			return ret;
> >>   
> >>   		default:
> >>   			return -EINVAL;  
> 


  reply	other threads:[~2023-11-01 10:00 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <20231027145949.243f03f2@jic23-huawei>
2023-10-30  2:10 ` [PATCH v2] iio: imu: inv_mpu6050: fix an error code problem in inv_mpu6050_read_raw Su Hui
2023-11-01 10:00   ` Jonathan Cameron [this message]
2023-10-23  4:05 Su Hui
2023-10-23 12:57 ` Jean-Baptiste Maneyrol

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20231101100019.00004be7@Huawei.com \
    --to=jonathan.cameron@huawei.com \
    --cc=andy.shevchenko@gmail.com \
    --cc=chenhuiz@axis.com \
    --cc=jean-baptiste.maneyrol@tdk.com \
    --cc=jic23@kernel.org \
    --cc=kernel-janitors@vger.kernel.org \
    --cc=lars@metafoo.de \
    --cc=linux-iio@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=suhui@nfschina.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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.