Skip to contentSkip to conversation

Staging: fbtft: Fix Sparse warnings

PATCH Superseded Frederic Jacob 2 participants 3 messages Jan 29, 2015 – Feb 8, 2015

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 Staging: fbtft: Fix Sparse warnings

Fix Sparse warnings for undeclared symbols

---
 drivers/staging/fbtft/fb_hx8340bn.c  | 2 +-
 drivers/staging/fbtft/fbtft_device.c | 4 ++--
 2 files changed, 3 insertions(+), 3 deletions(-)
drivers/staging/fbtft/fb_hx8340bn.c +1 -1
index 3939502..26a987a 100644
@@ -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);
drivers/staging/fbtft/fbtft_device.c +2 -2
index b9f4c30..157f79c 100644
@@ -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);
Signature · 1 line
1.9.1
maintainer
#1 lore raw
Quoted 1 line · Frederic Jacob

Fix Sparse warnings for undeclared symbols

Huh?

Quoted 25 lines
---
 drivers/staging/fbtft/fb_hx8340bn.c  | 2 +-
 drivers/staging/fbtft/fbtft_device.c | 4 ++--
 2 files changed, 3 insertions(+), 3 deletions(-)
drivers/staging/fbtft/fb_hx8340bn.c +1 -1
index 3939502..26a987a 100644
@@ -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);
drivers/staging/fbtft/fbtft_device.c +0 -0
index b9f4c30..157f79c 100644

drivers/staging/fbtft/fbtft_device.c line 33

Quoted 7 lines
drivers/staging/fbtft/fbtft_device.c +2 -2
@@ -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

#2 lore raw

PATCH v2 1/1 Staging: fbtft: Fix Sparse warnings

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?

---
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(-)
drivers/staging/fbtft/fb_hx8340bn.c +1 -1
index 3939502..26a987a 100644
@@ -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);
drivers/staging/fbtft/fbtft_device.c +2 -2
index b9f4c30..157f79c 100644
@@ -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);
Signature · 1 line
1.9.1