diff options
| author | Joe Perches <joe@perches.com> | 2015-02-21 21:53:54 -0500 |
|---|---|---|
| committer | Mark Brown <broonie@kernel.org> | 2015-02-24 03:16:14 -0500 |
| commit | af78114ec757cea281aafa3433a3a2e211e2eb67 (patch) | |
| tree | ece82b261454ef38ef913992f39603c5349febfd | |
| parent | c517d838eb7d07bbe9507871fab3931deccff539 (diff) | |
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 1f33c41c03da ("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: Joe Perches <joe@perches.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
| -rw-r--r-- | drivers/regulator/dbx500-prcmu.c | 32 |
1 files changed, 9 insertions, 23 deletions
diff --git a/drivers/regulator/dbx500-prcmu.c b/drivers/regulator/dbx500-prcmu.c index 2d16b9f16de7..3963dfad766c 100644 --- a/drivers/regulator/dbx500-prcmu.c +++ b/drivers/regulator/dbx500-prcmu.c | |||
| @@ -95,14 +95,9 @@ void ux500_regulator_resume_debug(void) | |||
| 95 | 95 | ||
| 96 | static int ux500_regulator_power_state_cnt_print(struct seq_file *s, void *p) | 96 | static int ux500_regulator_power_state_cnt_print(struct seq_file *s, void *p) |
| 97 | { | 97 | { |
| 98 | struct device *dev = s->private; | ||
| 99 | int err; | ||
| 100 | |||
| 101 | /* print power state count */ | 98 | /* print power state count */ |
| 102 | err = seq_printf(s, "ux500-regulator power state count: %i\n", | 99 | seq_printf(s, "ux500-regulator power state count: %i\n", |
| 103 | power_state_active_get()); | 100 | power_state_active_get()); |
| 104 | if (err < 0) | ||
| 105 | dev_err(dev, "seq_printf overflow\n"); | ||
| 106 | 101 | ||
| 107 | return 0; | 102 | return 0; |
| 108 | } | 103 | } |
| @@ -124,19 +119,11 @@ static const struct file_operations ux500_regulator_power_state_cnt_fops = { | |||
| 124 | 119 | ||
| 125 | static int ux500_regulator_status_print(struct seq_file *s, void *p) | 120 | static int ux500_regulator_status_print(struct seq_file *s, void *p) |
| 126 | { | 121 | { |
| 127 | struct device *dev = s->private; | ||
| 128 | int err; | ||
| 129 | int i; | 122 | int i; |
| 130 | 123 | ||
| 131 | /* print dump header */ | 124 | /* print dump header */ |
| 132 | err = seq_puts(s, "ux500-regulator status:\n"); | 125 | seq_puts(s, "ux500-regulator status:\n"); |
| 133 | if (err < 0) | 126 | seq_printf(s, "%31s : %8s : %8s\n", "current", "before", "after"); |
| 134 | dev_err(dev, "seq_puts overflow\n"); | ||
| 135 | |||
| 136 | err = seq_printf(s, "%31s : %8s : %8s\n", "current", | ||
| 137 | "before", "after"); | ||
| 138 | if (err < 0) | ||
| 139 | dev_err(dev, "seq_printf overflow\n"); | ||
| 140 | 127 | ||
| 141 | for (i = 0; i < rdebug.num_regulators; i++) { | 128 | for (i = 0; i < rdebug.num_regulators; i++) { |
| 142 | struct dbx500_regulator_info *info; | 129 | struct dbx500_regulator_info *info; |
| @@ -144,12 +131,11 @@ static int ux500_regulator_status_print(struct seq_file *s, void *p) | |||
| 144 | info = &rdebug.regulator_array[i]; | 131 | info = &rdebug.regulator_array[i]; |
| 145 | 132 | ||
| 146 | /* print status */ | 133 | /* print status */ |
| 147 | err = seq_printf(s, "%20s : %8s : %8s : %8s\n", info->desc.name, | 134 | seq_printf(s, "%20s : %8s : %8s : %8s\n", |
| 148 | info->is_enabled ? "enabled" : "disabled", | 135 | info->desc.name, |
| 149 | rdebug.state_before_suspend[i] ? "enabled" : "disabled", | 136 | info->is_enabled ? "enabled" : "disabled", |
| 150 | rdebug.state_after_suspend[i] ? "enabled" : "disabled"); | 137 | rdebug.state_before_suspend[i] ? "enabled" : "disabled", |
| 151 | if (err < 0) | 138 | rdebug.state_after_suspend[i] ? "enabled" : "disabled"); |
| 152 | dev_err(dev, "seq_printf overflow\n"); | ||
| 153 | } | 139 | } |
| 154 | 140 | ||
| 155 | return 0; | 141 | return 0; |
