Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754615AbaAHBCY (ORCPT ); Tue, 7 Jan 2014 20:02:24 -0500 Received: from mailout4.samsung.com ([203.254.224.34]:28831 "EHLO mailout4.samsung.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754037AbaAHBCS (ORCPT ); Tue, 7 Jan 2014 20:02:18 -0500 X-AuditID: cbfee691-b7efc6d0000039d3-8f-52cca39894f0 From: Jingoo Han To: "'Mark Brown'" Cc: "'Liam Girdwood'" , linux-kernel@vger.kernel.org, "'Jingoo Han'" Subject: [PATCH 1/3] regulator: core: Fix checkpatch issue Date: Wed, 08 Jan 2014 10:02:16 +0900 Message-id: <002001cf0c0d$461abfa0$d2503ee0$%han@samsung.com> MIME-version: 1.0 Content-type: text/plain; charset=us-ascii Content-transfer-encoding: 7bit X-Mailer: Microsoft Office Outlook 12.0 Thread-index: Ac8MDUYAj2m3DqtwQ9mZHqZTKqWOEA== Content-language: ko X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFtrEIsWRmVeSWpSXmKPExsVy+t8zY90Zi88EGXxfbmMx9eETNovLCy+x Wny70sFkcXnXHDYHFo+ds+6ye2xa1cnm0bdlFaPH501yASxRXDYpqTmZZalF+nYJXBkdv3UL pghWrJop2cC4l7eLkZNDQsBE4suSuWwQtpjEhXvrgWwuDiGBZYwSU3b9YoUpet3xhgUiMZ1R 4lbnQlYI5xejxPET+5hBqtgE1CS+fDnM3sXIwSEioCrx/5U7iMkskCvRvS0dpEJYwEri/PN1 YNUsQBUXtixmArF5BWwlXh/9ywxhC0r8mHyPBcRmFtCSWL/zOBOELS+xec1bZpCREgLqEo/+ 6oKERQT0JD5vWgtVIiKx78U7RpDLJAQ2sUv82HeCCWKXgMS3yYdYIHplJTYdYIZ4S1Li4Iob LBMYxWYh2TwLyeZZSDbPQrJiASPLKkbR1ILkguKk9CJTveLE3OLSvHS95PzcTYyQ+Jq4g/H+ AetDjMlA6ycyS4km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RLhgMtp22UY97u cCtnmBd0l1PQb1lv22P7k9c9PuZzRJQpCDU/+HTMKq/tVXtK3pkVTw4nXwiYdvS2qvwSJZbi jERDLeai4kQA/L5tlSIDAAA= DLP-Filter: Pass X-MTR: 20000000000000000@CPGS X-CFilter-Loop: Reflected Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Fix the following checkpatch errors and warnings. ERROR: trailing whitespace ERROR: return is not a function, parentheses are not required WARNING: braces {} are not necessary for single statement blocks Signed-off-by: Jingoo Han --- drivers/regulator/core.c | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) diff --git a/drivers/regulator/core.c b/drivers/regulator/core.c index 9888f26..b38a6b6 100644 --- a/drivers/regulator/core.c +++ b/drivers/regulator/core.c @@ -1334,9 +1334,8 @@ static struct regulator *_regulator_get(struct device *dev, const char *id, * If we have return value from dev_lookup fail, we do not expect to * succeed, so, quit with appropriate error value */ - if (ret && ret != -ENODEV) { + if (ret && ret != -ENODEV) goto out; - } if (!devname) devname = "deviceless"; @@ -2245,7 +2244,7 @@ int regulator_is_supported_voltage(struct regulator *regulator, if (!(rdev->constraints->valid_ops_mask & REGULATOR_CHANGE_VOLTAGE)) { ret = regulator_get_voltage(regulator); if (ret >= 0) - return (min_uV <= ret && ret <= max_uV); + return min_uV <= ret && ret <= max_uV; else return ret; } @@ -2417,7 +2416,7 @@ int regulator_set_voltage(struct regulator *regulator, int min_uV, int max_uV) ret = regulator_check_voltage(rdev, &min_uV, &max_uV); if (ret < 0) goto out; - + /* restore original values in case of error */ old_min_uV = regulator->min_uV; old_max_uV = regulator->max_uV; @@ -2431,7 +2430,7 @@ int regulator_set_voltage(struct regulator *regulator, int min_uV, int max_uV) ret = _regulator_do_set_voltage(rdev, min_uV, max_uV); if (ret < 0) goto out2; - + out: mutex_unlock(&rdev->mutex); return ret; @@ -3836,9 +3835,8 @@ static int __init regulator_init_complete(void) * goes wrong. */ rdev_info(rdev, "disabling\n"); ret = ops->disable(rdev); - if (ret != 0) { + if (ret != 0) rdev_err(rdev, "couldn't disable: %d\n", ret); - } } else { /* The intention is that in future we will * assume that full constraints are provided -- 1.7.10.4 -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/