[PATCH] drm/etnaviv: etnaviv_sched: Staticize functions when possible

Fabio Estevam festevam at gmail.com
Tue Feb 13 18:36:49 UTC 2018


From: Fabio Estevam <fabio.estevam at nxp.com>

etnaviv_sched_dependency() and etnaviv_sched_run_job() are only
used in this file, so make them static.

This fixes the following sparse warnings:

drivers/gpu/drm/etnaviv/etnaviv_sched.c:30:18: warning: symbol 'etnaviv_sched_dependency' was not declared. Should it be static?
drivers/gpu/drm/etnaviv/etnaviv_sched.c:81:18: warning: symbol 'etnaviv_sched_run_job' was not declared. Should it be static?

Signed-off-by: Fabio Estevam <fabio.estevam at nxp.com>
---
 drivers/gpu/drm/etnaviv/etnaviv_sched.c | 7 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)

diff --git a/drivers/gpu/drm/etnaviv/etnaviv_sched.c b/drivers/gpu/drm/etnaviv/etnaviv_sched.c
index 3e33473..4b761b7 100644
--- a/drivers/gpu/drm/etnaviv/etnaviv_sched.c
+++ b/drivers/gpu/drm/etnaviv/etnaviv_sched.c
@@ -27,8 +27,9 @@ module_param_named(job_hang_limit, etnaviv_job_hang_limit, int , 0444);
 static int etnaviv_hw_jobs_limit = 2;
 module_param_named(hw_job_limit, etnaviv_hw_jobs_limit, int , 0444);
 
-struct dma_fence *etnaviv_sched_dependency(struct drm_sched_job *sched_job,
-					   struct drm_sched_entity *entity)
+static struct dma_fence *
+etnaviv_sched_dependency(struct drm_sched_job *sched_job,
+			 struct drm_sched_entity *entity)
 {
 	struct etnaviv_gem_submit *submit = to_etnaviv_submit(sched_job);
 	struct dma_fence *fence;
@@ -78,7 +79,7 @@ struct dma_fence *etnaviv_sched_dependency(struct drm_sched_job *sched_job,
 	return NULL;
 }
 
-struct dma_fence *etnaviv_sched_run_job(struct drm_sched_job *sched_job)
+static struct dma_fence *etnaviv_sched_run_job(struct drm_sched_job *sched_job)
 {
 	struct etnaviv_gem_submit *submit = to_etnaviv_submit(sched_job);
 	struct dma_fence *fence = NULL;
-- 
2.7.4



More information about the dri-devel mailing list