* [PATCH] Staging: fbtft: Fix Sparse warnings
@ 2015-01-29 3:22 Frederic Jacob
2015-02-07 9:12 ` Greg KH
0 siblings, 1 reply; 3+ messages in thread
From: Frederic Jacob @ 2015-01-29 3:22 UTC (permalink / raw)
To: thomas.petazzoni, noralf, gregkh; +Cc: linux-kernel, Frederic Jacob
Fix Sparse warnings for undeclared symbols
Signed-off-by: Frederic Jacob <frederic.jacob.78@gmail.com>
---
drivers/staging/fbtft/fb_hx8340bn.c | 2 +-
drivers/staging/fbtft/fbtft_device.c | 4 ++--
2 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/drivers/staging/fbtft/fb_hx8340bn.c b/drivers/staging/fbtft/fb_hx8340bn.c
index 3939502..26a987a 100644
--- a/drivers/staging/fbtft/fb_hx8340bn.c
+++ b/drivers/staging/fbtft/fb_hx8340bn.c
@@ -108,7 +108,7 @@ static int init_display(struct fbtft_par *par)
return 0;
}
-void set_addr_win(struct fbtft_par *par, int xs, int ys, int xe, int ye)
+static void set_addr_win(struct fbtft_par *par, int xs, int ys, int xe, int ye)
{
fbtft_par_dbg(DEBUG_SET_ADDR_WIN, par,
"%s(xs=%d, ys=%d, xe=%d, ye=%d)\n", __func__, xs, ys, xe, ye);
diff --git a/drivers/staging/fbtft/fbtft_device.c b/drivers/staging/fbtft/fbtft_device.c
index b9f4c30..157f79c 100644
--- a/drivers/staging/fbtft/fbtft_device.c
+++ b/drivers/staging/fbtft/fbtft_device.c
@@ -29,8 +29,8 @@
#define MAX_GPIOS 32
-struct spi_device *spi_device;
-struct platform_device *p_device;
+static struct spi_device *spi_device;
+static struct platform_device *p_device;
static char *name;
module_param(name, charp, 0);
--
1.9.1
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] Staging: fbtft: Fix Sparse warnings
2015-01-29 3:22 [PATCH] Staging: fbtft: Fix Sparse warnings Frederic Jacob
@ 2015-02-07 9:12 ` Greg KH
2015-02-08 2:15 ` [PATCH v2] " Frederic Jacob
0 siblings, 1 reply; 3+ messages in thread
From: Greg KH @ 2015-02-07 9:12 UTC (permalink / raw)
To: Frederic Jacob; +Cc: thomas.petazzoni, noralf, linux-kernel
On Wed, Jan 28, 2015 at 10:22:26PM -0500, Frederic Jacob wrote:
> Fix Sparse warnings for undeclared symbols
Huh?
>
> Signed-off-by: Frederic Jacob <frederic.jacob.78@gmail.com>
> ---
> drivers/staging/fbtft/fb_hx8340bn.c | 2 +-
> drivers/staging/fbtft/fbtft_device.c | 4 ++--
> 2 files changed, 3 insertions(+), 3 deletions(-)
>
> diff --git a/drivers/staging/fbtft/fb_hx8340bn.c b/drivers/staging/fbtft/fb_hx8340bn.c
> index 3939502..26a987a 100644
> --- a/drivers/staging/fbtft/fb_hx8340bn.c
> +++ b/drivers/staging/fbtft/fb_hx8340bn.c
> @@ -108,7 +108,7 @@ static int init_display(struct fbtft_par *par)
> return 0;
> }
>
> -void set_addr_win(struct fbtft_par *par, int xs, int ys, int xe, int ye)
> +static void set_addr_win(struct fbtft_par *par, int xs, int ys, int xe, int ye)
> {
> fbtft_par_dbg(DEBUG_SET_ADDR_WIN, par,
> "%s(xs=%d, ys=%d, xe=%d, ye=%d)\n", __func__, xs, ys, xe, ye);
> diff --git a/drivers/staging/fbtft/fbtft_device.c b/drivers/staging/fbtft/fbtft_device.c
> index b9f4c30..157f79c 100644
> --- a/drivers/staging/fbtft/fbtft_device.c
> +++ b/drivers/staging/fbtft/fbtft_device.c
> @@ -29,8 +29,8 @@
>
> #define MAX_GPIOS 32
>
> -struct spi_device *spi_device;
> -struct platform_device *p_device;
> +static struct spi_device *spi_device;
> +static struct platform_device *p_device;
These changes are making things static, not undeclared. Can you fix up
your changelog entry to show the exact error you are fixing?
thanks,
greg k-h
^ permalink raw reply [flat|nested] 3+ messages in thread
* [PATCH v2] Staging: fbtft: Fix Sparse warnings
2015-02-07 9:12 ` Greg KH
@ 2015-02-08 2:15 ` Frederic Jacob
0 siblings, 0 replies; 3+ messages in thread
From: Frederic Jacob @ 2015-02-08 2:15 UTC (permalink / raw)
To: gregkh; +Cc: thomas.petazzoni, noralf, linux-kernel, Frederic Jacob
This fixes the folowing sparse warnings:
fb_hx8340bn.c:111:6: warning: symbol 'set_addr_win' was not declared. Should it be static?
fbtft_device.c:32:19: warning: symbol 'spi_device' was not declared. Should it be static?
fbtft_device.c:33:24: warning: symbol 'p_device' was not declared. Should it be static?
Signed-off-by: Frederic Jacob <frederic.jacob.78@gmail.com>
---
Corrected the changelog to specify the fixed Sparse warnings.
drivers/staging/fbtft/fb_hx8340bn.c | 2 +-
drivers/staging/fbtft/fbtft_device.c | 4 ++--
2 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/drivers/staging/fbtft/fb_hx8340bn.c b/drivers/staging/fbtft/fb_hx8340bn.c
index 3939502..26a987a 100644
--- a/drivers/staging/fbtft/fb_hx8340bn.c
+++ b/drivers/staging/fbtft/fb_hx8340bn.c
@@ -108,7 +108,7 @@ static int init_display(struct fbtft_par *par)
return 0;
}
-void set_addr_win(struct fbtft_par *par, int xs, int ys, int xe, int ye)
+static void set_addr_win(struct fbtft_par *par, int xs, int ys, int xe, int ye)
{
fbtft_par_dbg(DEBUG_SET_ADDR_WIN, par,
"%s(xs=%d, ys=%d, xe=%d, ye=%d)\n", __func__, xs, ys, xe, ye);
diff --git a/drivers/staging/fbtft/fbtft_device.c b/drivers/staging/fbtft/fbtft_device.c
index b9f4c30..157f79c 100644
--- a/drivers/staging/fbtft/fbtft_device.c
+++ b/drivers/staging/fbtft/fbtft_device.c
@@ -29,8 +29,8 @@
#define MAX_GPIOS 32
-struct spi_device *spi_device;
-struct platform_device *p_device;
+static struct spi_device *spi_device;
+static struct platform_device *p_device;
static char *name;
module_param(name, charp, 0);
--
1.9.1
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2015-02-08 2:16 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-01-29 3:22 [PATCH] Staging: fbtft: Fix Sparse warnings Frederic Jacob
2015-02-07 9:12 ` Greg KH
2015-02-08 2:15 ` [PATCH v2] " Frederic Jacob
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
Powered by JetHome