[PATCH 1/2] iio: pressure: bmp280: i2c: Rearrange vars in reverse xmas tree order

Angel Iglesias posted 2 patches 2 years, 1 month ago
[PATCH 1/2] iio: pressure: bmp280: i2c: Rearrange vars in reverse xmas tree order
Posted by Angel Iglesias 2 years, 1 month ago
Minor cleanup reordering local variable declarations following reverse
christmas tree convention.

Signed-off-by: Angel Iglesias <ang.iglesiasg@gmail.com>

diff --git a/drivers/iio/pressure/bmp280-i2c.c b/drivers/iio/pressure/bmp280-i2c.c
index dbe630ad05b5..693eb1975fdc 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 = device_get_match_data(&client->dev);
 	if (!chip_info)
-- 
2.41.0
Re: [PATCH 1/2] iio: pressure: bmp280: i2c: Rearrange vars in reverse xmas tree order
Posted by Andy Shevchenko 2 years, 1 month ago
On Sun, Aug 06, 2023 at 01:15:02AM +0200, Angel Iglesias wrote:
> Minor cleanup reordering local variable declarations following reverse
> christmas tree convention.

What about other functions there? Are all of them ordered correctly?

-- 
With Best Regards,
Andy Shevchenko
Re: [PATCH 1/2] iio: pressure: bmp280: i2c: Rearrange vars in reverse xmas tree order
Posted by Angel Iglesias 2 years, 1 month ago
On Mon, 2023-08-07 at 18:43 +0300, Andy Shevchenko wrote:
> On Sun, Aug 06, 2023 at 01:15:02AM +0200, Angel Iglesias wrote:
> > Minor cleanup reordering local variable declarations following reverse
> > christmas tree convention.
> 
> What about other functions there? Are all of them ordered correctly?
> 
This one was a leftover from previous work I did on this driver. I will check
the rest of the drive and update it to follow the same convention if required.
Thank you for your time.

Kind regards
Angel