summaryrefslogtreecommitdiff
path: root/drivers/gpu/drm/tinydrm
diff options
context:
space:
mode:
authorJoe Perches <joe@perches.com>2017-05-31 02:35:37 +0300
committerDaniel Vetter <daniel.vetter@ffwll.ch>2017-05-31 11:30:38 +0300
commit46466b0dac3f6bee397c1db4f0ebfedf3e8c9e9c (patch)
tree9b115d63f292300957f723487a720cee78119411 /drivers/gpu/drm/tinydrm
parent99cdb35e787b277bc66ed9fe7d5f9852de9e0eb0 (diff)
downloadlinux-46466b0dac3f6bee397c1db4f0ebfedf3e8c9e9c.tar.xz
drm: Use vsnprintf extension %ph
Using the extension saves a bit of code. Miscellanea: o Neaten and simplify dump_dp_payload_table o Removed trailing blank space from output $ size drivers/gpu/drm/drm_dp_mst_topology.o.* drivers/gpu/drm/tinydrm/*.o* text data bss dec hex filename 25848 0 16 25864 6508 drivers/gpu/drm/drm_dp_mst_topology.o.new 26091 0 16 26107 65fb drivers/gpu/drm/drm_dp_mst_topology.o.old 3362 2 0 3364 d24 drivers/gpu/drm/tinydrm/mipi-dbi.o.new 3376 2 0 3378 d32 drivers/gpu/drm/tinydrm/mipi-dbi.o.old Signed-off-by: Joe Perches <joe@perches.com> Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch> Link: http://patchwork.freedesktop.org/patch/msgid/a78a21b5f34947da65473a0b7326922cda51a3be.1496187315.git.joe@perches.com
Diffstat (limited to 'drivers/gpu/drm/tinydrm')
-rw-r--r--drivers/gpu/drm/tinydrm/mipi-dbi.c7
1 files changed, 2 insertions, 5 deletions
diff --git a/drivers/gpu/drm/tinydrm/mipi-dbi.c b/drivers/gpu/drm/tinydrm/mipi-dbi.c
index f4eb412f3604..c83eeb7a34b0 100644
--- a/drivers/gpu/drm/tinydrm/mipi-dbi.c
+++ b/drivers/gpu/drm/tinydrm/mipi-dbi.c
@@ -914,7 +914,7 @@ static int mipi_dbi_debugfs_command_show(struct seq_file *m, void *unused)
{
struct mipi_dbi *mipi = m->private;
u8 cmd, val[4];
- size_t len, i;
+ size_t len;
int ret;
for (cmd = 0; cmd < 255; cmd++) {
@@ -943,10 +943,7 @@ static int mipi_dbi_debugfs_command_show(struct seq_file *m, void *unused)
seq_puts(m, "XX\n");
continue;
}
-
- for (i = 0; i < len; i++)
- seq_printf(m, "%02x", val[i]);
- seq_puts(m, "\n");
+ seq_printf(m, "%*phN\n", (int)len, val);
}
return 0;