Skip to contentSkip to conversation

drm/panel: khadas-ts050: make ts050[v2]_panel_data static

PATCH Applied Min-Hua Chen 2 participants 3 messages Sep 8, 2024 – Sep 13, 2024

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

PATCH 1/1 drm/panel: khadas-ts050: make ts050[v2]_panel_data static

make ts050_panel_data and ts050v2_panel_data static because they are only used in drivers/gpu/drm/panel/panel-khadas-ts050.c, and fix the following sparse warnings:

drivers/gpu/drm/panel/panel-khadas-ts050.c:620:32:
sparse: warning: symbol 'ts050_panel_data' was not declared. Should it be static? drivers/gpu/drm/panel/panel-khadas-ts050.c:625:32:
sparse: warning: symbol 'ts050v2_panel_data' was not declared. Should it be static?

No functional changes intended.

---
 drivers/gpu/drm/panel/panel-khadas-ts050.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/gpu/drm/panel/panel-khadas-ts050.c +2 -2
index 14932cb3defc..0e5e8e57bd1e 100644
@@ -617,12 +617,12 @@ static const struct khadas_ts050_panel_cmd ts050_init_code[] = {
 	{0xd4, {0x04}, 0x01}, /* RGBMIPICTRL: VSYNC front porch = 4 */
 };
 
-struct khadas_ts050_panel_data ts050_panel_data = {
+static struct khadas_ts050_panel_data ts050_panel_data = {
 	.init_code = (struct khadas_ts050_panel_cmd *)ts050_init_code,
 	.len = ARRAY_SIZE(ts050_init_code)
 };
 
-struct khadas_ts050_panel_data ts050v2_panel_data = {
+static struct khadas_ts050_panel_data ts050v2_panel_data = {
 	.init_code = (struct khadas_ts050_panel_cmd *)ts050v2_init_code,
 	.len = ARRAY_SIZE(ts050v2_init_code)
 };
Signature · 1 line
2.43.0
maintainer Reviewed-by on v1 1/1
#1 lore raw
Quoted 25 lines · Min-Hua Chen

make ts050_panel_data and ts050v2_panel_data static because they are only used in drivers/gpu/drm/panel/panel-khadas-ts050.c, and fix the following sparse warnings:

drivers/gpu/drm/panel/panel-khadas-ts050.c:620:32:
sparse: warning: symbol 'ts050_panel_data' was not declared. Should it be static? drivers/gpu/drm/panel/panel-khadas-ts050.c:625:32:
sparse: warning: symbol 'ts050v2_panel_data' was not declared. Should it be static?

No functional changes intended.

---
  drivers/gpu/drm/panel/panel-khadas-ts050.c | 4 ++--
  1 file changed, 2 insertions(+), 2 deletions(-)
drivers/gpu/drm/panel/panel-khadas-ts050.c +0 -1
index 14932cb3defc..0e5e8e57bd1e 100644
@@ -617,12 +617,12 @@ static const struct khadas_ts050_panel_cmd ts050_init_code[] = {
  	{0xd4, {0x04}, 0x01}, /* RGBMIPICTRL: VSYNC front porch = 4 */
  };
 
-struct khadas_ts050_panel_data ts050_panel_data = {

drivers/gpu/drm/panel/panel-khadas-ts050.c static const struct khadas_ts050_panel_cmd ts050_init_code[] = { · line 628

Quoted 10 lines
drivers/gpu/drm/panel/panel-khadas-ts050.c +2 -1
+static struct khadas_ts050_panel_data ts050_panel_data = {
  	.init_code = (struct khadas_ts050_panel_cmd *)ts050_init_code,
  	.len = ARRAY_SIZE(ts050_init_code)
  };
 
-struct khadas_ts050_panel_data ts050v2_panel_data = {
+static struct khadas_ts050_panel_data ts050v2_panel_data = {
  	.init_code = (struct khadas_ts050_panel_cmd *)ts050v2_init_code,
  	.len = ARRAY_SIZE(ts050v2_init_code)
  };
maintainer Applied
#2 lore raw
In reply to Min-Hua Chen

Hi,

Quoted 10 lines · Min-Hua Chen

make ts050_panel_data and ts050v2_panel_data static because they are only used in drivers/gpu/drm/panel/panel-khadas-ts050.c, and fix the following sparse warnings:

drivers/gpu/drm/panel/panel-khadas-ts050.c:620:32:
sparse: warning: symbol 'ts050_panel_data' was not declared. Should it be static? drivers/gpu/drm/panel/panel-khadas-ts050.c:625:32:
sparse: warning: symbol 'ts050v2_panel_data' was not declared. Should it be static?

[...]

Thanks, Applied to https://gitlab.freedesktop.org/drm/misc/kernel.git (drm-misc-next)

[1/1] drm/panel: khadas-ts050: make ts050[v2]_panel_data static

      https://gitlab.freedesktop.org/drm/misc/kernel/-/commit/d5acba46ebf5a4fd9ea9ae5121dd381ce85e94ff
Signature · 1 line
Neil