Skip to contentSkip to conversation

drm/msm: change msm_sched_ops from global to static

PATCH In review Tom Rix 2 participants 2 messages Apr 21, 2022 – Apr 25, 2022

Subsystems (4)
lore
Share & tools
lore

Tom Rix

author
#0 lore raw

PATCH 1/1 drm/msm: change msm_sched_ops from global to static

Smatch reports this issue
msm_ringbuffer.c:43:36: warning: symbol 'msm_sched_ops' was not declared. Should it be static?

msm_sched_ops is only used in msm_ringbuffer.c so change its storage-class specifier to static.

---
 drivers/gpu/drm/msm/msm_ringbuffer.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/gpu/drm/msm/msm_ringbuffer.c +1 -1
index 367a6aaa3a20..66f4ec09ef67 100644
@@ -40,7 +40,7 @@ static void msm_job_free(struct drm_sched_job *job)
 	msm_gem_submit_put(submit);
 }
 
-const struct drm_sched_backend_ops msm_sched_ops = {
+static const struct drm_sched_backend_ops msm_sched_ops = {
 	.run_job = msm_job_run,
 	.free_job = msm_job_free
 };
Signature · 1 line
2.27.0
Reviewed-by on v1 1/1
#1 lore raw
Quoted 7 lines · Tom Rix

Smatch reports this issue
msm_ringbuffer.c:43:36: warning: symbol 'msm_sched_ops' was not declared. Should it be static?

msm_sched_ops is only used in msm_ringbuffer.c so change its storage-class specifier to static.

Quoted 17 lines
---
  drivers/gpu/drm/msm/msm_ringbuffer.c | 2 +-
  1 file changed, 1 insertion(+), 1 deletion(-)
drivers/gpu/drm/msm/msm_ringbuffer.c +1 -1
index 367a6aaa3a20..66f4ec09ef67 100644
@@ -40,7 +40,7 @@ static void msm_job_free(struct drm_sched_job *job)
  	msm_gem_submit_put(submit);
  }
 
-const struct drm_sched_backend_ops msm_sched_ops = {
+static const struct drm_sched_backend_ops msm_sched_ops = {
  	.run_job = msm_job_run,
  	.free_job = msm_job_free
  };
Signature · 2 lines
With best wishes
Dmitry