lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20220415191031.4cd40c35@jic23-huawei>
Date:   Fri, 15 Apr 2022 19:10:31 +0100
From:   Jonathan Cameron <jic23@...nel.org>
To:     Andy Shevchenko <andriy.shevchenko@...ux.intel.com>
Cc:     linux-iio@...r.kernel.org, linux-kernel@...r.kernel.org,
        Lars-Peter Clausen <lars@...afoo.de>,
        Michael Hennerich <Michael.Hennerich@...log.com>,
        Nuno Sá <nuno.sa@...log.com>
Subject: Re: [PATCH v2 2/3] iio: imu: adis16480: Use temporary variable for
 struct device

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

> Use temporary variable for struct device to make code neater.
> 
> Signed-off-by: Andy Shevchenko <andriy.shevchenko@...ux.intel.com>
> Reviewed-by: Nuno Sá <nuno.sa@...log.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

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ