From patchwork Sun Oct 29 15:35:45 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Wolfram Sang X-Patchwork-Id: 10031555 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id B97BA603FF for ; Sun, 29 Oct 2017 15:36:02 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id AF599205FC for ; Sun, 29 Oct 2017 15:36:02 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id A4804285CF; Sun, 29 Oct 2017 15:36:02 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.9 required=2.0 tests=BAYES_00,RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 559B5205FC for ; Sun, 29 Oct 2017 15:36:02 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751207AbdJ2PgB (ORCPT ); Sun, 29 Oct 2017 11:36:01 -0400 Received: from sauhun.de ([88.99.104.3]:42738 "EHLO pokefinder.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751199AbdJ2Pf6 (ORCPT ); Sun, 29 Oct 2017 11:35:58 -0400 Received: from localhost (unknown [94.230.152.199]) by pokefinder.org (Postfix) with ESMTPSA id E54882C4217; Sun, 29 Oct 2017 16:35:56 +0100 (CET) From: Wolfram Sang To: linux-i2c@vger.kernel.org Cc: linux-pm@vger.kernel.org, Phil Reid , sre@kernel.org, Wolfram Sang , Sebastian Reichel Subject: [PATCH 3/3] power: supply: sbs-message: fix some code style issues Date: Sun, 29 Oct 2017 16:35:45 +0100 Message-Id: <20171029153545.3947-4-wsa@the-dreams.de> X-Mailer: git-send-email 2.11.0 In-Reply-To: <20171029153545.3947-1-wsa@the-dreams.de> References: <20171029153545.3947-1-wsa@the-dreams.de> Sender: linux-pm-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-pm@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Use 'unsigned int' and curly braces for 'else'. Reviewed-by: Sebastian Reichel Signed-off-by: Wolfram Sang --- 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;