linux-i2c.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Wolfram Sang <wsa@the-dreams.de>
To: linux-i2c@vger.kernel.org
Cc: linux-pm@vger.kernel.org, Phil Reid <preid@electromag.com.au>,
	sre@kernel.org, Wolfram Sang <wsa@the-dreams.de>,
	Sebastian Reichel <sebastian.reichel@collabora.co.uk>
Subject: [PATCH 3/3] power: supply: sbs-message: fix some code style issues
Date: Sun, 29 Oct 2017 16:35:45 +0100	[thread overview]
Message-ID: <20171029153545.3947-4-wsa@the-dreams.de> (raw)
In-Reply-To: <20171029153545.3947-1-wsa@the-dreams.de>

Use 'unsigned int' and curly braces for 'else'.

Reviewed-by: Sebastian Reichel <sebastian.reichel@collabora.co.uk>
Signed-off-by: Wolfram Sang <wsa@the-dreams.de>
---
 drivers/power/supply/sbs-manager.c | 7 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)

diff --git a/drivers/power/supply/sbs-manager.c b/drivers/power/supply/sbs-manager.c
index 3e3ad09c5f11c3..ccb4217b963869 100644
--- a/drivers/power/supply/sbs-manager.c
+++ b/drivers/power/supply/sbs-manager.c
@@ -193,7 +193,7 @@ static int sbsm_select(struct i2c_mux_core *muxc, u32 chan)
 	return ret;
 }
 
-static int sbsm_gpio_get_value(struct gpio_chip *gc, unsigned off)
+static int sbsm_gpio_get_value(struct gpio_chip *gc, unsigned int off)
 {
 	struct sbsm_data *data = gpiochip_get_data(gc);
 	int ret;
@@ -209,7 +209,7 @@ static int sbsm_gpio_get_value(struct gpio_chip *gc, unsigned off)
  * This needs to be defined or the GPIO lib fails to register the pin.
  * But the 'gpio' is always an input.
  */
-static int sbsm_gpio_direction_input(struct gpio_chip *gc, unsigned off)
+static int sbsm_gpio_direction_input(struct gpio_chip *gc, unsigned int off)
 {
 	return 0;
 }
@@ -229,8 +229,9 @@ static int sbsm_do_alert(struct device *dev, void *d)
 			driver->alert(client, I2C_PROTOCOL_SMBUS_ALERT, 0);
 		else
 			dev_warn(&client->dev, "no driver alert()!\n");
-	} else
+	} else {
 		dev_dbg(&client->dev, "alert with no driver\n");
+	}
 	device_unlock(dev);
 
 	return -EBUSY;
-- 
2.11.0

      parent reply	other threads:[~2017-10-29 15:35 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-10-29 15:35 [PATCH 0/3] power: supply: minor improvements to sbs-manager and battery Wolfram Sang
2017-10-29 15:35 ` [PATCH 1/3] power: supply: sbs-battery: remove superfluous variable init Wolfram Sang
2017-10-29 15:35 ` [PATCH 2/3] power: supply: sbs-battery: remove unchecked return var Wolfram Sang
2017-10-29 15:35 ` Wolfram Sang [this message]

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=20171029153545.3947-4-wsa@the-dreams.de \
    --to=wsa@the-dreams.de \
    --cc=linux-i2c@vger.kernel.org \
    --cc=linux-pm@vger.kernel.org \
    --cc=preid@electromag.com.au \
    --cc=sebastian.reichel@collabora.co.uk \
    --cc=sre@kernel.org \
    /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).