linux-tegra.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] GPU-host1x: Use a signed return type for do_relocs()
@ 2015-12-19 11:56 SF Markus Elfring
       [not found] ` <56754606.6060201-Rn4VEauK+AKRv+LV9MX5uipxlwaOVQ5f@public.gmane.org>
  0 siblings, 1 reply; 2+ messages in thread
From: SF Markus Elfring @ 2015-12-19 11:56 UTC (permalink / raw)
  To: linux-tegra, dri-devel, Terje Bergström, Thierry Reding
  Cc: Julia Lawall, kernel-janitors, LKML

From: Markus Elfring <elfring@users.sourceforge.net>
Date: Sat, 19 Dec 2015 12:48:31 +0100

The return type "unsigned int" was used by the do_relocs() function
despite of the aspect that it will eventually return a negative error code.
Improve this implementation detail by deletion of the type qualifier then.

This issue was detected by using the Coccinelle software.

Signed-off-by: Markus Elfring <elfring@users.sourceforge.net>
---
 drivers/gpu/host1x/job.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/gpu/host1x/job.c b/drivers/gpu/host1x/job.c
index 63bd63f..1919aab 100644
--- a/drivers/gpu/host1x/job.c
+++ b/drivers/gpu/host1x/job.c
@@ -225,7 +225,7 @@ unpin:
 	return 0;
 }
 
-static unsigned int do_relocs(struct host1x_job *job, struct host1x_bo *cmdbuf)
+static int do_relocs(struct host1x_job *job, struct host1x_bo *cmdbuf)
 {
 	int i = 0;
 	u32 last_page = ~0;
-- 
2.6.3

_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/dri-devel

^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH] GPU-host1x: Use a signed return type for do_relocs()
       [not found] ` <56754606.6060201-Rn4VEauK+AKRv+LV9MX5uipxlwaOVQ5f@public.gmane.org>
@ 2016-01-25 14:05   ` Thierry Reding
  0 siblings, 0 replies; 2+ messages in thread
From: Thierry Reding @ 2016-01-25 14:05 UTC (permalink / raw)
  To: SF Markus Elfring
  Cc: linux-tegra-u79uwXL29TY76Z2rM5mHXA,
	dri-devel-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW, Terje Bergström,
	LKML, kernel-janitors-u79uwXL29TY76Z2rM5mHXA, Julia Lawall

[-- Attachment #1: Type: text/plain, Size: 723 bytes --]

On Sat, Dec 19, 2015 at 12:56:54PM +0100, SF Markus Elfring wrote:
> From: Markus Elfring <elfring-Rn4VEauK+AKRv+LV9MX5uipxlwaOVQ5f@public.gmane.org>
> Date: Sat, 19 Dec 2015 12:48:31 +0100
> 
> The return type "unsigned int" was used by the do_relocs() function
> despite of the aspect that it will eventually return a negative error code.
> Improve this implementation detail by deletion of the type qualifier then.
> 
> This issue was detected by using the Coccinelle software.
> 
> Signed-off-by: Markus Elfring <elfring-Rn4VEauK+AKRv+LV9MX5uipxlwaOVQ5f@public.gmane.org>
> ---
>  drivers/gpu/host1x/job.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)

Good catch. Applied, thanks.

Thierry

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 819 bytes --]

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2016-01-25 14:05 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-12-19 11:56 [PATCH] GPU-host1x: Use a signed return type for do_relocs() SF Markus Elfring
     [not found] ` <56754606.6060201-Rn4VEauK+AKRv+LV9MX5uipxlwaOVQ5f@public.gmane.org>
2016-01-25 14:05   ` Thierry Reding

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).