Skip to contentSkip to conversation

drm/sitronix/st7571-i2c: Make st7571_panel_data variables static const

PATCH In review Javier Martinez Canillas 2 participants 3 messages Jul 18, 2025 – Sep 1, 2025

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

PATCH v2 1/1 drm/sitronix/st7571-i2c: Make st7571_panel_data variables static const

The kernel test robot reported that sparse gives the following warnings:

make C=2 M=drivers/gpu/drm/sitronix/
CC [M] st7571-i2c.o
CHECK st7571-i2c.c
st7571-i2c.c:1027:26: warning: symbol 'st7567_config' was not declared. Should it be static? st7571-i2c.c:1039:26: warning: symbol 'st7571_config' was not declared. Should it be static?
MODPOST Module.symvers
LD [M] st7571-i2c.ko

---

Changes in v2:
- Also make the st7571_panel_data variables to be const (Thomas Zimmermann).

 drivers/gpu/drm/sitronix/st7571-i2c.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/gpu/drm/sitronix/st7571-i2c.c +2 -2
index 453eb7e045e5..dda99cbe5372 100644
@@ -1024,7 +1024,7 @@ static void st7571_remove(struct i2c_client *client)
 	drm_dev_unplug(&st7571->dev);
 }
 
-struct st7571_panel_data st7567_config = {
+static const struct st7571_panel_data st7567_config = {
 	.init = st7567_lcd_init,
 	.parse_dt = st7567_parse_dt,
 	.constraints = {
@@ -1036,7 +1036,7 @@ struct st7571_panel_data st7567_config = {
 	},
 };
 
-struct st7571_panel_data st7571_config = {
+static const struct st7571_panel_data st7571_config = {
 	.init = st7571_lcd_init,
 	.parse_dt = st7571_parse_dt,
 	.constraints = {
Signature · 4 lines
2.49.0

base-commit: a55863ba4c9ea9febe81ecf7dba36e7989a37b7e
branch: drm-misc-next
Reviewed-by on v2 1/1
#1 lore raw
Quoted 13 lines · Javier Martinez Canillas

The kernel test robot reported that sparse gives the following warnings:

make C=2 M=drivers/gpu/drm/sitronix/
CC [M] st7571-i2c.o
CHECK st7571-i2c.c
st7571-i2c.c:1027:26: warning: symbol 'st7567_config' was not declared. Should it be static? st7571-i2c.c:1039:26: warning: symbol 'st7571_config' was not declared. Should it be static?
MODPOST Module.symvers
LD [M] st7571-i2c.ko

Quoted 8 lines

---

Changes in v2:
- Also make the st7571_panel_data variables to be const (Thomas Zimmermann).

 drivers/gpu/drm/sitronix/st7571-i2c.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
Signature · 2 lines
With best wishes
Dmitry
#2 lore raw
Quoted 16 lines · Dmitry Baryshkov
Quoted 15 lines · Javier Martinez Canillas

The kernel test robot reported that sparse gives the following warnings:

make C=2 M=drivers/gpu/drm/sitronix/
CC [M] st7571-i2c.o
CHECK st7571-i2c.c
st7571-i2c.c:1027:26: warning: symbol 'st7567_config' was not declared. Should it be static? st7571-i2c.c:1039:26: warning: symbol 'st7571_config' was not declared. Should it be static?
MODPOST Module.symvers
LD [M] st7571-i2c.ko

---

Quoted 9 lines
Quoted 6 lines

Changes in v2:
- Also make the st7571_panel_data variables to be const (Thomas Zimmermann).

 drivers/gpu/drm/sitronix/st7571-i2c.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

Pushed to drm-misc (drm-misc-next). Thanks!

Signature · 5 lines
Best regards,

Javier Martinez Canillas
Core Platforms
Red Hat