GPU-DRM-Etnaviv: Fine-tuning for two function implementations
Subsystems (3)
cover GPU-DRM-Etnaviv: Fine-tuning for two function implementations
From: Markus Elfring <[email protected]>
Date: Mon, 8 May 2017 13:16:15 +0200
Two update suggestions were taken into account
from static source code analysis.
Markus Elfring (2):
Use seq_putc() in etnaviv_buffer_dump()
Delete an error message for a failed memory allocation in etnaviv_bind()
drivers/gpu/drm/etnaviv/etnaviv_drv.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-)
Signature · 1 line
2.12.2
PATCH 1/2 drm/etnaviv: Use seq_putc() in etnaviv_buffer_dump()
From: Markus Elfring <[email protected]>
Date: Mon, 8 May 2017 13:00:28 +0200
Two single characters (line breaks) should be put into a sequence. Thus use the corresponding function "seq_putc".
This issue was detected by using the Coccinelle software.
--- drivers/gpu/drm/etnaviv/etnaviv_drv.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/gpu/drm/etnaviv/etnaviv_drv.c +2 -2
@@ -182,12 +182,12 @@ static void etnaviv_buffer_dump(struct etnaviv_gpu *gpu, struct seq_file *m)for (i =0 ; i < size /4 ; i++) {if (i && !(i %4 )) -seq_puts (m,"\n" ); +seq_putc (m,'\n' ); if (i % 4 = 0)seq_printf (m,"\t0x%p: " , ptr + i);seq_printf (m,"%08x " , *(ptr + i)); } -seq_puts (m,"\n" ); +seq_putc (m,'\n' ); }static int etnaviv_ring_show (struct etnaviv_gpu *gpu,struct seq_file *m)
Signature · 1 line
2.12.2
PATCH 2/2 drm/etnaviv: Delete an error message for a failed memory allocation in etnaviv_bind()
In reply to SF Markus ElfringFrom: Markus Elfring <[email protected]>
Date: Mon, 8 May 2017 13:08:11 +0200
The script "checkpatch.pl" pointed information out like the following.
WARNING: Possible unnecessary 'out of memory' message
Thus remove such a statement here.
--- drivers/gpu/drm/etnaviv/etnaviv_drv.c | 1 - 1 file changed, 1 deletion(-)
drivers/gpu/drm/etnaviv/etnaviv_drv.c +0 -1
@@ -530,7 +530,6 @@ static int etnaviv_bind(struct device *dev) priv =kzalloc (sizeof (*priv),GFP_KERNEL );if (!priv) { -dev_err (dev,"failed to allocate private data\n" ); ret = -ENOMEM ; goto out_unref; }
Signature · 1 line
2.12.2