Commit af78114e authored by Joe Perches's avatar Joe Perches Committed by Mark Brown

regulator: dbx500: Remove use of seq_puts/seq_printf return value

The seq_puts/seq_printf return value, because it's frequently misused,
will eventually be converted to void.

See: commit 1f33c41c ("seq_file: Rename seq_overflow() to
     seq_has_overflowed() and make public")

Miscellanea:

o Remove unnecessary dev_err("seq_<foo> overflow\n") messages
Signed-off-by: default avatarJoe Perches <joe@perches.com>
Signed-off-by: default avatarMark Brown <broonie@kernel.org>
parent c517d838
...@@ -95,14 +95,9 @@ void ux500_regulator_resume_debug(void) ...@@ -95,14 +95,9 @@ void ux500_regulator_resume_debug(void)
static int ux500_regulator_power_state_cnt_print(struct seq_file *s, void *p) static int ux500_regulator_power_state_cnt_print(struct seq_file *s, void *p)
{ {
struct device *dev = s->private;
int err;
/* print power state count */ /* print power state count */
err = seq_printf(s, "ux500-regulator power state count: %i\n", seq_printf(s, "ux500-regulator power state count: %i\n",
power_state_active_get()); power_state_active_get());
if (err < 0)
dev_err(dev, "seq_printf overflow\n");
return 0; return 0;
} }
...@@ -124,19 +119,11 @@ static const struct file_operations ux500_regulator_power_state_cnt_fops = { ...@@ -124,19 +119,11 @@ static const struct file_operations ux500_regulator_power_state_cnt_fops = {
static int ux500_regulator_status_print(struct seq_file *s, void *p) static int ux500_regulator_status_print(struct seq_file *s, void *p)
{ {
struct device *dev = s->private;
int err;
int i; int i;
/* print dump header */ /* print dump header */
err = seq_puts(s, "ux500-regulator status:\n"); seq_puts(s, "ux500-regulator status:\n");
if (err < 0) seq_printf(s, "%31s : %8s : %8s\n", "current", "before", "after");
dev_err(dev, "seq_puts overflow\n");
err = seq_printf(s, "%31s : %8s : %8s\n", "current",
"before", "after");
if (err < 0)
dev_err(dev, "seq_printf overflow\n");
for (i = 0; i < rdebug.num_regulators; i++) { for (i = 0; i < rdebug.num_regulators; i++) {
struct dbx500_regulator_info *info; struct dbx500_regulator_info *info;
...@@ -144,12 +131,11 @@ static int ux500_regulator_status_print(struct seq_file *s, void *p) ...@@ -144,12 +131,11 @@ static int ux500_regulator_status_print(struct seq_file *s, void *p)
info = &rdebug.regulator_array[i]; info = &rdebug.regulator_array[i];
/* print status */ /* print status */
err = seq_printf(s, "%20s : %8s : %8s : %8s\n", info->desc.name, seq_printf(s, "%20s : %8s : %8s : %8s\n",
info->is_enabled ? "enabled" : "disabled", info->desc.name,
rdebug.state_before_suspend[i] ? "enabled" : "disabled", info->is_enabled ? "enabled" : "disabled",
rdebug.state_after_suspend[i] ? "enabled" : "disabled"); rdebug.state_before_suspend[i] ? "enabled" : "disabled",
if (err < 0) rdebug.state_after_suspend[i] ? "enabled" : "disabled");
dev_err(dev, "seq_printf overflow\n");
} }
return 0; return 0;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment