lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <1389023175-11872-1-git-send-email-jesperfalk94@gmail.com>
Date:	Mon,  6 Jan 2014 16:46:15 +0100
From:	Jesper Falk <jesperfalk94@...il.com>
To:	anton@...msg.org
Cc:	dwmw2@...radead.org, linux-kernel@...r.kernel.org,
	Jesper Falk <jesperfalk94@...il.com>
Subject: [PATCH] Power: charger-manager: Fixed coding style

Removed apaces before semicolon and fixed brackets on if statements

Signed-off-by: Jesper Falk <jesperfalk94@...il.com>
---
 drivers/power/charger-manager.c | 19 ++++++++-----------
 1 file changed, 8 insertions(+), 11 deletions(-)

diff --git a/drivers/power/charger-manager.c b/drivers/power/charger-manager.c
index 7287c0e..4c5a848 100644
--- a/drivers/power/charger-manager.c
+++ b/drivers/power/charger-manager.c
@@ -327,7 +327,7 @@ static int try_charger_enable(struct charger_manager *cm, bool enable)
 		cm->charging_start_time = ktime_to_ms(ktime_get());
 		cm->charging_end_time = 0;
 
-		for (i = 0 ; i < desc->num_charger_regulators ; i++) {
+		for (i = 0; i < desc->num_charger_regulators; i++) {
 			if (desc->charger_regulators[i].externally_control)
 				continue;
 
@@ -345,7 +345,7 @@ static int try_charger_enable(struct charger_manager *cm, bool enable)
 		cm->charging_start_time = 0;
 		cm->charging_end_time = ktime_to_ms(ktime_get());
 
-		for (i = 0 ; i < desc->num_charger_regulators ; i++) {
+		for (i = 0; i < desc->num_charger_regulators; i++) {
 			if (desc->charger_regulators[i].externally_control)
 				continue;
 
@@ -1476,20 +1476,17 @@ static int charger_manager_probe(struct platform_device *pdev)
 	 * The following two do not need to be errors.
 	 * Users may intentionally ignore those two features.
 	 */
-	if (desc->fullbatt_uV == 0) {
+	if (desc->fullbatt_uV == 0)
 		dev_info(&pdev->dev, "Ignoring full-battery voltage threshold as it is not supplied\n");
-	}
 	if (!desc->fullbatt_vchkdrop_ms || !desc->fullbatt_vchkdrop_uV) {
 		dev_info(&pdev->dev, "Disabling full-battery voltage drop checking mechanism as it is not supplied\n");
 		desc->fullbatt_vchkdrop_ms = 0;
 		desc->fullbatt_vchkdrop_uV = 0;
 	}
-	if (desc->fullbatt_soc == 0) {
+	if (desc->fullbatt_soc == 0)
 		dev_info(&pdev->dev, "Ignoring full-battery soc(state of charge) threshold as it is not supplied\n");
-	}
-	if (desc->fullbatt_full_capacity == 0) {
+	if (desc->fullbatt_full_capacity == 0)
 		dev_info(&pdev->dev, "Ignoring full-battery full capacity threshold as it is not supplied\n");
-	}
 
 	if (!desc->charger_regulators || desc->num_charger_regulators < 1) {
 		dev_err(&pdev->dev, "charger_regulators undefined\n");
@@ -1676,16 +1673,16 @@ static int charger_manager_remove(struct platform_device *pdev)
 	cancel_work_sync(&setup_polling);
 	cancel_delayed_work_sync(&cm_monitor_work);
 
-	for (i = 0 ; i < desc->num_charger_regulators ; i++) {
+	for (i = 0; i < desc->num_charger_regulators; i++) {
 		struct charger_regulator *charger
 				= &desc->charger_regulators[i];
-		for (j = 0 ; j < charger->num_cables ; j++) {
+		for (j = 0; j < charger->num_cables; j++) {
 			struct charger_cable *cable = &charger->cables[j];
 			extcon_unregister_interest(&cable->extcon_dev);
 		}
 	}
 
-	for (i = 0 ; i < desc->num_charger_regulators ; i++)
+	for (i = 0; i < desc->num_charger_regulators; i++)
 		regulator_put(desc->charger_regulators[i].consumer);
 
 	power_supply_unregister(&cm->charger_psy);
-- 
1.8.5.2

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ