summaryrefslogtreecommitdiffstats
path: root/drivers/platform
diff options
context:
space:
mode:
authorAndy Shevchenko <andriy.shevchenko@linux.intel.com>2014-12-29 13:26:50 +0100
committerDarren Hart <dvhart@linux.intel.com>2015-10-07 00:22:08 +0200
commit7d3777d1069137800cdd1420a6c75cd94151d877 (patch)
tree3c26a4cbf933be48cd61a8e245bcaa377b09e2f8 /drivers/platform
parentMAINTAINERS: Add drivers/platform/olpc to drivers/platform/x86 (diff)
downloadlinux-7d3777d1069137800cdd1420a6c75cd94151d877.tar.xz
linux-7d3777d1069137800cdd1420a6c75cd94151d877.zip
OLPC: Use %*ph specifier instead of passing direct values
The %*ph specifier allows to dump small buffers in hex format. Let's use it instead of passing direct values via stack. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Acked-by: Paul Fox <pgf@laptop.org> Signed-off-by: Darren Hart <dvhart@linux.intel.com>
Diffstat (limited to 'drivers/platform')
-rw-r--r--drivers/platform/olpc/olpc-ec.c13
1 files changed, 5 insertions, 8 deletions
diff --git a/drivers/platform/olpc/olpc-ec.c b/drivers/platform/olpc/olpc-ec.c
index f9119525f557..f99b183d5296 100644
--- a/drivers/platform/olpc/olpc-ec.c
+++ b/drivers/platform/olpc/olpc-ec.c
@@ -192,18 +192,15 @@ static ssize_t ec_dbgfs_cmd_write(struct file *file, const char __user *buf,
for (i = 0; i <= ec_cmd_bytes; i++)
ec_cmd[i] = ec_cmd_int[i];
- pr_debug("olpc-ec: debugfs cmd 0x%02x with %d args %02x %02x %02x %02x %02x, want %d returns\n",
- ec_cmd[0], ec_cmd_bytes, ec_cmd[1], ec_cmd[2],
- ec_cmd[3], ec_cmd[4], ec_cmd[5], ec_dbgfs_resp_bytes);
+ pr_debug("olpc-ec: debugfs cmd 0x%02x with %d args %5ph, want %d returns\n",
+ ec_cmd[0], ec_cmd_bytes, ec_cmd + 1,
+ ec_dbgfs_resp_bytes);
olpc_ec_cmd(ec_cmd[0], (ec_cmd_bytes == 0) ? NULL : &ec_cmd[1],
ec_cmd_bytes, ec_dbgfs_resp, ec_dbgfs_resp_bytes);
- pr_debug("olpc-ec: response %02x %02x %02x %02x %02x %02x %02x %02x (%d bytes expected)\n",
- ec_dbgfs_resp[0], ec_dbgfs_resp[1], ec_dbgfs_resp[2],
- ec_dbgfs_resp[3], ec_dbgfs_resp[4], ec_dbgfs_resp[5],
- ec_dbgfs_resp[6], ec_dbgfs_resp[7],
- ec_dbgfs_resp_bytes);
+ pr_debug("olpc-ec: response %8ph (%d bytes expected)\n",
+ ec_dbgfs_resp, ec_dbgfs_resp_bytes);
out:
mutex_unlock(&ec_dbgfs_lock);