Skip to contentSkip to conversation

drm/panel: samsung: make vint_table static

PATCH Superseded Jason Yan 2 participants 2 messages Sep 15, 2020

Subsystems (3)

v2 of 3 Superseded Latest is v3 →

lore
Share & tools
lore

Jason Yan

author
#0 lore raw

PATCH v2 1/1 drm/panel: samsung: make vint_table static

This eliminates the following sparse warning:

drivers/gpu/drm/panel/panel-samsung-s6e3ha2.c:217:15: warning: symbol 'vint_table' was not declared. Should it be static?

---
 drivers/gpu/drm/panel/panel-samsung-s6e3ha2.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/gpu/drm/panel/panel-samsung-s6e3ha2.c +1 -1
index 1d1c79a18613..0ab1b7ec84cd 100644
@@ -214,7 +214,7 @@ static const u8 gamma_tbl[S6E3HA2_NUM_GAMMA_STEPS][S6E3HA2_GAMMA_CMD_CNT] = {
 	  0x00, 0x00 }
 };
 
-unsigned char vint_table[S6E3HA2_VINT_STATUS_MAX] = {
+static const unsigned char vint_table[S6E3HA2_VINT_STATUS_MAX] = {
 	0x18, 0x19, 0x1a, 0x1b, 0x1c,
 	0x1d, 0x1e, 0x1f, 0x20, 0x21
 };
Signature · 6 lines
2.25.4

_______________________________________________
dri-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel
Reviewed-by on v2 1/1
#1 lore raw

Hi Jason,

Thank you for the patch.

Quoted 4 lines · Jason Yan

This eliminates the following sparse warning:

drivers/gpu/drm/panel/panel-samsung-s6e3ha2.c:217:15: warning: symbol 'vint_table' was not declared. Should it be static?

The commit message should mention that it also make the table const. I'd write "drm/panel: samsung: Make vint_table static const" in the subject line, and add here

"While at it, make the table const as it is never modified."

With those changes,

Quoted 19 lines
---
 drivers/gpu/drm/panel/panel-samsung-s6e3ha2.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/gpu/drm/panel/panel-samsung-s6e3ha2.c +1 -1
index 1d1c79a18613..0ab1b7ec84cd 100644
@@ -214,7 +214,7 @@ static const u8 gamma_tbl[S6E3HA2_NUM_GAMMA_STEPS][S6E3HA2_GAMMA_CMD_CNT] = {
 	  0x00, 0x00 }
 };
 
-unsigned char vint_table[S6E3HA2_VINT_STATUS_MAX] = {
+static const unsigned char vint_table[S6E3HA2_VINT_STATUS_MAX] = {
 	0x18, 0x19, 0x1a, 0x1b, 0x1c,
 	0x1d, 0x1e, 0x1f, 0x20, 0x21
 };
Signature · 7 lines
Regards,

Laurent Pinchart
_______________________________________________
dri-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel