Linux IIO development
 help / color / mirror / Atom feed
From: Jonathan Cameron <jic23@kernel.org>
To: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Cc: linux-iio@vger.kernel.org, linux-kernel@vger.kernel.org,
	"Lars-Peter Clausen" <lars@metafoo.de>,
	"Michael Hennerich" <Michael.Hennerich@analog.com>,
	"Nuno Sá" <nuno.sa@analog.com>
Subject: Re: [PATCH v2 2/3] iio: imu: adis16480: Use temporary variable for struct device
Date: Fri, 15 Apr 2022 19:10:31 +0100	[thread overview]
Message-ID: <20220415191031.4cd40c35@jic23-huawei> (raw)
In-Reply-To: <20220414131559.24694-2-andriy.shevchenko@linux.intel.com>

On Thu, 14 Apr 2022 16:15:58 +0300
Andy Shevchenko <andriy.shevchenko@linux.intel.com> wrote:

> Use temporary variable for struct device to make code neater.
> 
> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
> Reviewed-by: Nuno Sá <nuno.sa@analog.com>
> ---
> v2: added tag (Nuno)
>  drivers/iio/imu/adis16480.c | 46 ++++++++++++++++++-------------------
>  1 file changed, 23 insertions(+), 23 deletions(-)
> 
> diff --git a/drivers/iio/imu/adis16480.c b/drivers/iio/imu/adis16480.c
> index 68eed088cca6..287914016f28 100644
> --- a/drivers/iio/imu/adis16480.c
> +++ b/drivers/iio/imu/adis16480.c
...

> @@ -1216,12 +1217,12 @@ static const struct iio_info adis16480_info = {
>  static int adis16480_stop_device(struct iio_dev *indio_dev)
>  {
>  	struct adis16480 *st = iio_priv(indio_dev);
> +	struct device *dev = &st->adis.spi->dev;
>  	int ret;
>  
>  	ret = adis_write_reg_16(&st->adis, ADIS16480_REG_SLP_CNT, BIT(9));
>  	if (ret)
> -		dev_err(&indio_dev->dev,
> -			"Could not power down device: %d\n", ret);
> +		dev_err(dev, "Could not power down device: %d\n", ret);
>  

Subtle but this is a functional change.  I think it's an improvement
to use the spi dev, but if anyone sees this error message it will
be different as a result, so ideally the patch description
would have mentioned this.  Meh. It's trivial so I don't really care
enough for a v3 or to modify it whilst applying :)

So fine as is, but I thought I'd call it out anyway.

Jonathan

  reply	other threads:[~2022-04-15 18:02 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-04-14 13:15 [PATCH v2 1/3] iio: imu: adis16480: Make use of device properties Andy Shevchenko
2022-04-14 13:15 ` [PATCH v2 2/3] iio: imu: adis16480: Use temporary variable for struct device Andy Shevchenko
2022-04-15 18:10   ` Jonathan Cameron [this message]
2022-04-14 13:15 ` [PATCH v2 3/3] iio: imu: adis16480: Improve getting the optional clocks Andy Shevchenko
2022-04-27 18:37   ` Jonathan Cameron

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=20220415191031.4cd40c35@jic23-huawei \
    --to=jic23@kernel.org \
    --cc=Michael.Hennerich@analog.com \
    --cc=andriy.shevchenko@linux.intel.com \
    --cc=lars@metafoo.de \
    --cc=linux-iio@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=nuno.sa@analog.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox