2014-02-10 00:32:29

by Daeseok Youn

[permalink] [raw]
Subject: [PATCH] gpu: ion: fix sparse non static symbol warnings

>From 08b77be03927d450810c07d3a4440dc8c32fe766 Mon Sep 17 00:00:00 2001
From: Daeseok Youn <[email protected]>
Date: Mon, 10 Feb 2014 09:02:26 +0900
Subject: [PATCH] gpu: ion: fix sparse non static symbol warnings

Fixes the following sparse warnings:

drivers/staging/android/ion/ion_dummy_driver.c:26:19:
warning: symbol 'idev' was not declared. Should it be static?
drivers/staging/android/ion/ion_dummy_driver.c:27:17:
warning: symbol 'heaps' was not declared. Should it be static?
drivers/staging/android/ion/ion_dummy_driver.c:29:6:
warning: symbol 'carveout_ptr' was not declared. Should it be static?
drivers/staging/android/ion/ion_dummy_driver.c:30:6:
warning: symbol 'chunk_ptr' was not declared. Should it be static?
drivers/staging/android/ion/ion_dummy_driver.c:32:26:
warning: symbol 'dummy_heaps' was not declared. Should it be static?
drivers/staging/android/ion/ion_dummy_driver.c:59:26:
warning: symbol 'dummy_ion_pdata' was not declared. Should it be static?

Signed-off-by: Daeseok Youn <[email protected]>
---
drivers/staging/android/ion/ion_dummy_driver.c | 12 ++++++------
1 file changed, 6 insertions(+), 6 deletions(-)

diff --git a/drivers/staging/android/ion/ion_dummy_driver.c b/drivers/staging/android/ion/ion_dummy_driver.c
index 55b2002..b89004a 100644
--- a/drivers/staging/android/ion/ion_dummy_driver.c
+++ b/drivers/staging/android/ion/ion_dummy_driver.c
@@ -23,13 +23,13 @@
#include "ion.h"
#include "ion_priv.h"

-struct ion_device *idev;
-struct ion_heap **heaps;
+static struct ion_device *idev;
+static struct ion_heap **heaps;

-void *carveout_ptr;
-void *chunk_ptr;
+static void *carveout_ptr;
+static void *chunk_ptr;

-struct ion_platform_heap dummy_heaps[] = {
+static struct ion_platform_heap dummy_heaps[] = {
{
.id = ION_HEAP_TYPE_SYSTEM,
.type = ION_HEAP_TYPE_SYSTEM,
@@ -56,7 +56,7 @@ struct ion_platform_heap dummy_heaps[] = {
},
};

-struct ion_platform_data dummy_ion_pdata = {
+static struct ion_platform_data dummy_ion_pdata = {
.nr = 4,
.heaps = dummy_heaps,
};
--
1.7.9.5
---


2014-02-11 20:24:36

by Greg Kroah-Hartman

[permalink] [raw]
Subject: Re: [PATCH] gpu: ion: fix sparse non static symbol warnings

On Mon, Feb 10, 2014 at 09:32:22AM +0900, Daeseok Youn wrote:
> >From 08b77be03927d450810c07d3a4440dc8c32fe766 Mon Sep 17 00:00:00 2001
> From: Daeseok Youn <[email protected]>
> Date: Mon, 10 Feb 2014 09:02:26 +0900
> Subject: [PATCH] gpu: ion: fix sparse non static symbol warnings
>
> Fixes the following sparse warnings:
>
> drivers/staging/android/ion/ion_dummy_driver.c:26:19:
> warning: symbol 'idev' was not declared. Should it be static?
> drivers/staging/android/ion/ion_dummy_driver.c:27:17:
> warning: symbol 'heaps' was not declared. Should it be static?
> drivers/staging/android/ion/ion_dummy_driver.c:29:6:
> warning: symbol 'carveout_ptr' was not declared. Should it be static?
> drivers/staging/android/ion/ion_dummy_driver.c:30:6:
> warning: symbol 'chunk_ptr' was not declared. Should it be static?
> drivers/staging/android/ion/ion_dummy_driver.c:32:26:
> warning: symbol 'dummy_heaps' was not declared. Should it be static?
> drivers/staging/android/ion/ion_dummy_driver.c:59:26:
> warning: symbol 'dummy_ion_pdata' was not declared. Should it be static?
>
> Signed-off-by: Daeseok Youn <[email protected]>

This patch has already been made in my tree, please always work against
linux-next to prevent duplication of work.

thanks,

greg k-h