From: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
To: Linus Walleij <linus.walleij@linaro.org>,
Bartosz Golaszewski <bgolaszewski@baylibre.com>,
linux-gpio@vger.kernel.org,
Rasmus Villemoes <linux@rasmusvillemoes.dk>,
Yury Norov <yury.norov@gmail.com>,
linux-kernel@vger.kernel.org,
Andrew Morton <akpm@linux-foundation.org>,
William Breathitt Gray <vilhelm.gray@gmail.com>
Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Subject: [PATCH v2 11/11] gpio: pca953x: Tight up indentation
Date: Tue, 22 Oct 2019 20:29:22 +0300 [thread overview]
Message-ID: <20191022172922.61232-12-andriy.shevchenko@linux.intel.com> (raw)
In-Reply-To: <20191022172922.61232-1-andriy.shevchenko@linux.intel.com>
There is no need to split some of the lines. However,
improve the style of multi-line comment. On top of this
there is no need to have double space.
Correct above indentation issues without altering the functionality.
Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
---
drivers/gpio/gpio-pca953x.c | 22 +++++++++++-----------
1 file changed, 11 insertions(+), 11 deletions(-)
diff --git a/drivers/gpio/gpio-pca953x.c b/drivers/gpio/gpio-pca953x.c
index 774e4c69df03..f80ed5a43614 100644
--- a/drivers/gpio/gpio-pca953x.c
+++ b/drivers/gpio/gpio-pca953x.c
@@ -421,7 +421,9 @@ static int pca953x_gpio_get_value(struct gpio_chip *gc, unsigned off)
ret = regmap_read(chip->regmap, inreg, ®_val);
mutex_unlock(&chip->i2c_lock);
if (ret < 0) {
- /* NOTE: diagnostic already emitted; that's all we should
+ /*
+ * NOTE:
+ * diagnostic already emitted; that's all we should
* do unless gpio_*_value_cansleep() calls become different
* from their nonsleeping siblings (and report faults).
*/
@@ -735,8 +737,7 @@ static irqreturn_t pca953x_irq_handler(int irq, void *devid)
return IRQ_HANDLED;
}
-static int pca953x_irq_setup(struct pca953x_chip *chip,
- int irq_base)
+static int pca953x_irq_setup(struct pca953x_chip *chip, int irq_base)
{
struct i2c_client *client = chip->client;
struct irq_chip *irq_chip = &chip->irq_chip;
@@ -786,9 +787,9 @@ static int pca953x_irq_setup(struct pca953x_chip *chip,
irq_chip->irq_set_type = pca953x_irq_set_type;
irq_chip->irq_shutdown = pca953x_irq_shutdown;
- ret = gpiochip_irqchip_add_nested(&chip->gpio_chip, irq_chip,
- irq_base, handle_simple_irq,
- IRQ_TYPE_NONE);
+ ret = gpiochip_irqchip_add_nested(&chip->gpio_chip, irq_chip,
+ irq_base, handle_simple_irq,
+ IRQ_TYPE_NONE);
if (ret) {
dev_err(&client->dev,
"could not connect irqchip to gpiochip\n");
@@ -862,7 +863,7 @@ static int device_pca957x_init(struct pca953x_chip *chip, u32 invert)
static const struct of_device_id pca953x_dt_ids[];
static int pca953x_probe(struct i2c_client *client,
- const struct i2c_device_id *i2c_id)
+ const struct i2c_device_id *i2c_id)
{
struct pca953x_platform_data *pdata;
struct pca953x_chip *chip;
@@ -871,8 +872,7 @@ static int pca953x_probe(struct i2c_client *client,
u32 invert = 0;
struct regulator *reg;
- chip = devm_kzalloc(&client->dev,
- sizeof(struct pca953x_chip), GFP_KERNEL);
+ chip = devm_kzalloc(&client->dev, sizeof(*chip), GFP_KERNEL);
if (chip == NULL)
return -ENOMEM;
@@ -986,7 +986,7 @@ static int pca953x_probe(struct i2c_client *client,
if (pdata && pdata->setup) {
ret = pdata->setup(client, chip->gpio_chip.base,
- chip->gpio_chip.ngpio, pdata->context);
+ chip->gpio_chip.ngpio, pdata->context);
if (ret < 0)
dev_warn(&client->dev, "setup failed, %d\n", ret);
}
@@ -1006,7 +1006,7 @@ static int pca953x_remove(struct i2c_client *client)
if (pdata && pdata->teardown) {
ret = pdata->teardown(client, chip->gpio_chip.base,
- chip->gpio_chip.ngpio, pdata->context);
+ chip->gpio_chip.ngpio, pdata->context);
if (ret < 0)
dev_err(&client->dev, "teardown failed, %d\n", ret);
} else {
--
2.23.0
next prev parent reply other threads:[~2019-10-22 17:29 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-10-22 17:29 [PATCH v2 00/11] gpio: pca953x: Convert to bitmap (extended) API Andy Shevchenko
2019-10-22 17:29 ` [PATCH v2 01/11] lib/test_bitmap: Force argument of bitmap_parselist_user() to proper address space Andy Shevchenko
2019-10-22 17:29 ` [PATCH v2 02/11] lib/test_bitmap: Undefine macros after use Andy Shevchenko
2019-10-22 17:29 ` [PATCH v2 03/11] lib/test_bitmap: Name EXP_BYTES properly Andy Shevchenko
2019-10-22 17:29 ` [PATCH v2 04/11] lib/test_bitmap: Rename exp to exp1 to avoid ambiguous name Andy Shevchenko
2019-10-22 17:29 ` [PATCH v2 05/11] lib/test_bitmap: Move exp1 and exp2 upper for others to use Andy Shevchenko
2019-10-22 17:29 ` [PATCH v2 06/11] lib/test_bitmap: Fix comment about this file Andy Shevchenko
2019-10-22 17:29 ` [PATCH v2 07/11] bitmap: Introduce bitmap_replace() helper Andy Shevchenko
2019-12-26 16:15 ` Guenter Roeck
2020-01-08 18:10 ` Andy Shevchenko
2019-10-22 17:29 ` [PATCH v2 08/11] gpio: pca953x: Remove redundant variable and check in IRQ handler Andy Shevchenko
2019-10-22 17:29 ` [PATCH v2 09/11] gpio: pca953x: Use input from regs structure in pca953x_irq_pending() Andy Shevchenko
2019-10-22 17:29 ` [PATCH v2 10/11] gpio: pca953x: Convert to use bitmap API Andy Shevchenko
2019-10-22 18:03 ` Geert Uytterhoeven
2019-10-23 8:01 ` Andy Shevchenko
2019-10-23 8:34 ` Geert Uytterhoeven
2019-10-22 17:29 ` Andy Shevchenko [this message]
2019-10-23 14:10 ` [PATCH v2 00/11] gpio: pca953x: Convert to bitmap (extended) API Linus Walleij
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=20191022172922.61232-12-andriy.shevchenko@linux.intel.com \
--to=andriy.shevchenko@linux.intel.com \
--cc=akpm@linux-foundation.org \
--cc=bgolaszewski@baylibre.com \
--cc=linus.walleij@linaro.org \
--cc=linux-gpio@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux@rasmusvillemoes.dk \
--cc=vilhelm.gray@gmail.com \
--cc=yury.norov@gmail.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;
as well as URLs for NNTP newsgroup(s).