]> git.proxmox.com Git - mirror_ubuntu-kernels.git/commitdiff
watchdog: wdrtas: don't use custom version of print_hex_dump
authorAndy Shevchenko <andriy.shevchenko@linux.intel.com>
Tue, 28 May 2013 09:25:49 +0000 (12:25 +0300)
committerWim Van Sebroeck <wim@iguana.be>
Thu, 11 Jul 2013 19:26:31 +0000 (21:26 +0200)
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>
drivers/watchdog/wdrtas.c

index 0a77655cda60d6341f379d674b48bce17e6166c3..3045debd5411e26d818309fc3a24c349af0ade4f 100644 (file)
@@ -161,31 +161,6 @@ static void wdrtas_timer_stop(void)
        wdrtas_set_interval(0);
 }
 
-/**
- * wdrtas_log_scanned_event - logs an event we received during keepalive
- *
- * wdrtas_log_scanned_event prints a message to the log buffer dumping
- * the results of the last event-scan call
- */
-static void wdrtas_log_scanned_event(void)
-{
-       int i;
-
-       for (i = 0; i < WDRTAS_LOGBUFFER_LEN; i += 16)
-               pr_info("dumping event (line %i/%i), data = "
-                       "%02x %02x %02x %02x  %02x %02x %02x %02x   "
-                       "%02x %02x %02x %02x  %02x %02x %02x %02x\n",
-                       (i / 16) + 1, (WDRTAS_LOGBUFFER_LEN / 16),
-                       wdrtas_logbuffer[i + 0], wdrtas_logbuffer[i + 1],
-                       wdrtas_logbuffer[i + 2], wdrtas_logbuffer[i + 3],
-                       wdrtas_logbuffer[i + 4], wdrtas_logbuffer[i + 5],
-                       wdrtas_logbuffer[i + 6], wdrtas_logbuffer[i + 7],
-                       wdrtas_logbuffer[i + 8], wdrtas_logbuffer[i + 9],
-                       wdrtas_logbuffer[i + 10], wdrtas_logbuffer[i + 11],
-                       wdrtas_logbuffer[i + 12], wdrtas_logbuffer[i + 13],
-                       wdrtas_logbuffer[i + 14], wdrtas_logbuffer[i + 15]);
-}
-
 /**
  * wdrtas_timer_keepalive - resets watchdog timer to keep system alive
  *
@@ -205,7 +180,9 @@ static void wdrtas_timer_keepalive(void)
                if (result < 0)
                        pr_err("event-scan failed: %li\n", result);
                if (result == 0)
-                       wdrtas_log_scanned_event();
+                       print_hex_dump(KERN_INFO, "dumping event, data: ",
+                               DUMP_PREFIX_OFFSET, 16, 1,
+                               wdrtas_logbuffer, WDRTAS_LOGBUFFER_LEN, false);
        } while (result == 0);
 }