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: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20231027144123.4d371a33@jic23-huawei>
Date:   Fri, 27 Oct 2023 14:41:23 +0100
From:   Jonathan Cameron <jic23@...nel.org>
To:     Angel Iglesias <ang.iglesiasg@...il.com>
Cc:     linux-iio@...r.kernel.org, Biju Das <biju.das.jz@...renesas.com>,
        linux-kernel@...r.kernel.org,
        Andy Shevchenko <andriy.shevchenko@...ux.intel.com>,
        Lars-Peter Clausen <lars@...afoo.de>,
        Linus Walleij <linus.walleij@...aro.org>,
        Phil Elwell <phil@...pberrypi.com>,
        Uwe Kleine-König 
        <u.kleine-koenig@...gutronix.de>
Subject: Re: [PATCH v2 3/5] iio: pressure: bmp280: Rearrange vars in reverse
 xmas tree order

On Sun, 22 Oct 2023 19:22:19 +0200
Angel Iglesias <ang.iglesiasg@...il.com> wrote:

> Small cleanup reordering local variable declarations following reverse
> christmas tree convention.
> 
> Signed-off-by: Angel Iglesias <ang.iglesiasg@...il.com>
> Reviewed-by: Andy Shevchenko <andriy.shevchenko@...ux.intel.com>
Applied patches 1-3 to the togreg branch of iio.git.
I'll be rebasing that on rc1 once available.  In meantime, pushed out
as testing for 0-day to take a poke at it.

Thanks,

Jonathan

> 
> diff --git a/drivers/iio/pressure/bmp280-i2c.c b/drivers/iio/pressure/bmp280-i2c.c
> index b3e069730f97..34e3bc758493 100644
> --- a/drivers/iio/pressure/bmp280-i2c.c
> +++ b/drivers/iio/pressure/bmp280-i2c.c
> @@ -7,9 +7,9 @@
>  
>  static int bmp280_i2c_probe(struct i2c_client *client)
>  {
> -	struct regmap *regmap;
> -	const struct bmp280_chip_info *chip_info;
>  	const struct i2c_device_id *id = i2c_client_get_device_id(client);
> +	const struct bmp280_chip_info *chip_info;
> +	struct regmap *regmap;
>  
>  	chip_info = i2c_get_match_data(client);
>  
> diff --git a/drivers/iio/pressure/bmp280-spi.c b/drivers/iio/pressure/bmp280-spi.c
> index 2eed483a8cc4..433d6fac83c4 100644
> --- a/drivers/iio/pressure/bmp280-spi.c
> +++ b/drivers/iio/pressure/bmp280-spi.c
> @@ -14,8 +14,7 @@
>  static int bmp280_regmap_spi_write(void *context, const void *data,
>                                     size_t count)
>  {
> -	struct device *dev = context;
> -	struct spi_device *spi = to_spi_device(dev);
> +	struct spi_device *spi = to_spi_device(context);
>  	u8 buf[2];
>  
>  	memcpy(buf, data, 2);
> @@ -31,8 +30,7 @@ static int bmp280_regmap_spi_write(void *context, const void *data,
>  static int bmp280_regmap_spi_read(void *context, const void *reg,
>                                    size_t reg_size, void *val, size_t val_size)
>  {
> -	struct device *dev = context;
> -	struct spi_device *spi = to_spi_device(dev);
> +	struct spi_device *spi = to_spi_device(context);
>  
>  	return spi_write_then_read(spi, reg, reg_size, val, val_size);
>  }

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ