diff options
author | Andy Shevchenko <andriy.shevchenko@linux.intel.com> | 2013-05-28 05:25:49 -0400 |
---|---|---|
committer | Wim Van Sebroeck <wim@iguana.be> | 2013-07-11 15:26:31 -0400 |
commit | 48388069bd6736065ed5143cb42d22a16b1744a5 (patch) | |
tree | 085af16ede81793419ac085a44c24cd2cea59407 /drivers/watchdog/wdrtas.c | |
parent | fcf95670fd29359a382e0755e573b36076d6283e (diff) |
watchdog: wdrtas: don't use custom version of print_hex_dump
Kernel has nice helpers to dump buffers.
Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Reviewed-by: Guenter Roeck <linux@roeck-us.net>
Signed-off-by: Wim Van Sebroeck <wim@iguana.be>
Diffstat (limited to 'drivers/watchdog/wdrtas.c')
-rw-r--r-- | drivers/watchdog/wdrtas.c | 29 |
1 files changed, 3 insertions, 26 deletions
diff --git a/drivers/watchdog/wdrtas.c b/drivers/watchdog/wdrtas.c index 0a77655cda60..3045debd5411 100644 --- a/drivers/watchdog/wdrtas.c +++ b/drivers/watchdog/wdrtas.c | |||
@@ -162,31 +162,6 @@ static void wdrtas_timer_stop(void) | |||
162 | } | 162 | } |
163 | 163 | ||
164 | /** | 164 | /** |
165 | * wdrtas_log_scanned_event - logs an event we received during keepalive | ||
166 | * | ||
167 | * wdrtas_log_scanned_event prints a message to the log buffer dumping | ||
168 | * the results of the last event-scan call | ||
169 | */ | ||
170 | static void wdrtas_log_scanned_event(void) | ||
171 | { | ||
172 | int i; | ||
173 | |||
174 | for (i = 0; i < WDRTAS_LOGBUFFER_LEN; i += 16) | ||
175 | pr_info("dumping event (line %i/%i), data = " | ||
176 | "%02x %02x %02x %02x %02x %02x %02x %02x " | ||
177 | "%02x %02x %02x %02x %02x %02x %02x %02x\n", | ||
178 | (i / 16) + 1, (WDRTAS_LOGBUFFER_LEN / 16), | ||
179 | wdrtas_logbuffer[i + 0], wdrtas_logbuffer[i + 1], | ||
180 | wdrtas_logbuffer[i + 2], wdrtas_logbuffer[i + 3], | ||
181 | wdrtas_logbuffer[i + 4], wdrtas_logbuffer[i + 5], | ||
182 | wdrtas_logbuffer[i + 6], wdrtas_logbuffer[i + 7], | ||
183 | wdrtas_logbuffer[i + 8], wdrtas_logbuffer[i + 9], | ||
184 | wdrtas_logbuffer[i + 10], wdrtas_logbuffer[i + 11], | ||
185 | wdrtas_logbuffer[i + 12], wdrtas_logbuffer[i + 13], | ||
186 | wdrtas_logbuffer[i + 14], wdrtas_logbuffer[i + 15]); | ||
187 | } | ||
188 | |||
189 | /** | ||
190 | * wdrtas_timer_keepalive - resets watchdog timer to keep system alive | 165 | * wdrtas_timer_keepalive - resets watchdog timer to keep system alive |
191 | * | 166 | * |
192 | * wdrtas_timer_keepalive restarts the watchdog timer by calling the | 167 | * wdrtas_timer_keepalive restarts the watchdog timer by calling the |
@@ -205,7 +180,9 @@ static void wdrtas_timer_keepalive(void) | |||
205 | if (result < 0) | 180 | if (result < 0) |
206 | pr_err("event-scan failed: %li\n", result); | 181 | pr_err("event-scan failed: %li\n", result); |
207 | if (result == 0) | 182 | if (result == 0) |
208 | wdrtas_log_scanned_event(); | 183 | print_hex_dump(KERN_INFO, "dumping event, data: ", |
184 | DUMP_PREFIX_OFFSET, 16, 1, | ||
185 | wdrtas_logbuffer, WDRTAS_LOGBUFFER_LEN, false); | ||
209 | } while (result == 0); | 186 | } while (result == 0); |
210 | } | 187 | } |
211 | 188 | ||