linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Lee Jones <lee.jones@linaro.org>
To: linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org
Subject: [PATCH 07/19] mfd: ab8500-sysctrl: Fix Constify, printk => pr_info and formatting issues
Date: Mon,  7 Dec 2015 11:50:20 +0000	[thread overview]
Message-ID: <1449489032-14374-8-git-send-email-lee.jones@linaro.org> (raw)
In-Reply-To: <1449489032-14374-1-git-send-email-lee.jones@linaro.org>

WARNING: char * array declaration might be better as static const
+       static char *pss[] = {"ab8500_ac", "pm2301", "ab8500_usb"};

WARNING: Prefer [subsystem eg: netdev]_info([subsystem]dev, ... then dev_info(dev, ... then
 pr_info(...  to printk(KERN_INFO ...
+                       printk(KERN_INFO

WARNING: quoted string split across lines
+                              "Charger \"%s\" is connected with known battery."
+                              " Rebooting.\n",

WARNING: quoted string split across lines
+                                       "unable to set sysClkReq%dRfClkBuf: "
+                                       "%d\n", j + 1, ret);

total: 0 errors, 4 warnings, 199 lines checked

Cc: Linus Walleij <linus.walleij@linaro.org>
Signed-off-by: Lee Jones <lee.jones@linaro.org>
---
 drivers/mfd/ab8500-sysctrl.c | 13 ++++++-------
 1 file changed, 6 insertions(+), 7 deletions(-)

diff --git a/drivers/mfd/ab8500-sysctrl.c b/drivers/mfd/ab8500-sysctrl.c
index 0d18256..b9f0010 100644
--- a/drivers/mfd/ab8500-sysctrl.c
+++ b/drivers/mfd/ab8500-sysctrl.c
@@ -27,7 +27,7 @@ static void ab8500_power_off(void)
 {
 	sigset_t old;
 	sigset_t all;
-	static char *pss[] = {"ab8500_ac", "pm2301", "ab8500_usb"};
+	static const char * const pss[] = {"ab8500_ac", "pm2301", "ab8500_usb"};
 	int i;
 	bool charger_present = false;
 	union power_supply_propval val;
@@ -68,10 +68,9 @@ static void ab8500_power_off(void)
 		ret = power_supply_get_property(psy,
 				POWER_SUPPLY_PROP_TECHNOLOGY, &val);
 		if (!ret && val.intval != POWER_SUPPLY_TECHNOLOGY_UNKNOWN) {
-			printk(KERN_INFO
-			       "Charger \"%s\" is connected with known battery."
-			       " Rebooting.\n",
-			       pss[i]);
+			pr_info("Charger '%s' is connected with known battery",
+				pss[i]);
+			pr_info(" - Rebooting.\n");
 			machine_restart("charging");
 		}
 		power_supply_put(psy);
@@ -161,8 +160,8 @@ static int ab8500_sysctrl_probe(struct platform_device *pdev)
 					pdata->initial_req_buf_config[j]);
 			if (ret < 0) {
 				dev_err(&pdev->dev,
-					"unable to set sysClkReq%dRfClkBuf: "
-					"%d\n", j + 1, ret);
+					"Can't set sysClkReq%dRfClkBuf: %d\n",
+					j + 1, ret);
 			}
 		}
 	}
-- 
1.9.1


  parent reply	other threads:[~2015-12-07 11:50 UTC|newest]

Thread overview: 23+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-12-07 11:50 [PATCH 00/19] mfd: Lots of clean-ups Lee Jones
2015-12-07 11:50 ` [PATCH 01/19] mfd: aat2870-core: Remove unnecessary 'out of memory' message Lee Jones
2015-12-07 11:50 ` [PATCH 02/19] mfd: ab3100-core.c: Fix multiple warnings reported by Checkpatch Lee Jones
2015-12-07 11:50 ` [PATCH 03/19] mfd: ab2100-otp: Remove pointless 'out of memory' error message Lee Jones
2015-12-07 11:50 ` [PATCH 04/19] mfd: ab8500-core: Fix many warnings reported by Checkpatch Lee Jones
2015-12-07 11:50 ` [PATCH 05/19] mfd: ab8500-debugfs: Clean-up non-conforming commenting and print formatting Lee Jones
2015-12-07 11:50 ` [PATCH 06/19] mfd: ab8500-gpadc: Squash a whole bunch of Checkpatch warnings and one error Lee Jones
2015-12-07 11:50 ` Lee Jones [this message]
2015-12-07 11:50 ` [PATCH 08/19] mfd: adp5520: Some trivial 'no space before tab' fixes Lee Jones
2015-12-07 11:50 ` [PATCH 09/19] mfd: arizona-core: msleep() is unreliable for anything <20ms use usleep_range() instead Lee Jones
2015-12-08 14:33   ` Charles Keepax
2015-12-08 15:45     ` Lee Jones
2015-12-07 11:50 ` [PATCH 10/19] mfd: arizona-i2c: Add blank line formatting after declaration Lee Jones
2015-12-08 14:33   ` Charles Keepax
2015-12-07 11:50 ` [PATCH 11/19] mfd: as3711: Repair OOM and 'line over 80 chars' formatting warnings Lee Jones
2015-12-07 11:50 ` [PATCH 12/19] mfd: asic3: Fix a plethora of Checkpatch errors and warnings Lee Jones
2015-12-07 11:50 ` [PATCH 13/19] mfd: cros_ec_i2c: Fix trivial 'tabs before spaces' whitespace issue Lee Jones
2015-12-07 11:50 ` [PATCH 14/19] mfd: cros_ec_spi: Repair comparison ordering issue Lee Jones
2015-12-07 11:50 ` [PATCH 15/19] mfd: cs5535-mfd: Add missing line spacing and make local array static Lee Jones
2015-12-07 11:50 ` [PATCH 16/19] mfd: da903x: Fix white space and split string issues Lee Jones
2015-12-07 11:50 ` [PATCH 17/19] mfd: da9052-i2c: Fix tabbing/whitespace issue Lee Jones
2015-12-07 11:50 ` [PATCH 18/19] mfd: da9052-irq: Fix trivial 'space before comma' error Lee Jones
2015-12-07 11:50 ` [PATCH 19/19] mfd: davinci_voicecodec: Remove pointless 'out of memory' error message Lee Jones

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=1449489032-14374-8-git-send-email-lee.jones@linaro.org \
    --to=lee.jones@linaro.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.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).