drm/xe: Make local functions static
authorLucas De Marchi <lucas.demarchi@intel.com>
Tue, 21 Feb 2023 23:33:43 +0000 (15:33 -0800)
committerRodrigo Vivi <rodrigo.vivi@intel.com>
Tue, 19 Dec 2023 23:29:06 +0000 (18:29 -0500)
A few static functions not being declared like that break the build with
W=1, like e.g.

cc1: all warnings being treated as errors
make[2]: *** [../scripts/Makefile.build:250: drivers/gpu/drm/xe/xe_gt.o] Error 1
../drivers/gpu/drm/xe/xe_guc.c:240:6: error: no previous prototype for ‘guc_write_params’ [-Werror=missing-prototypes]
  240 | void guc_write_params(struct xe_guc *guc)
      |      ^~~~~~~~~~~~~~~~

Make them static.

Signed-off-by: Lucas De Marchi <lucas.demarchi@intel.com>
Reviewed-by: Matthew Auld <matthew.auld@intel.com>
Signed-off-by: Rodrigo Vivi <rodrigo.vivi@intel.com>
drivers/gpu/drm/xe/xe_gt.c
drivers/gpu/drm/xe/xe_guc.c
drivers/gpu/drm/xe/xe_irq.c
drivers/gpu/drm/xe/xe_wait_user_fence.c

index c17279653561b2ba65e9ad04ac3984a514628793..809e9b14c314d6edb58d79f0354257df47ae63a9 100644 (file)
@@ -218,7 +218,7 @@ static void gt_fini(struct drm_device *drm, void *arg)
 
 static void gt_reset_worker(struct work_struct *w);
 
-int emit_nop_job(struct xe_gt *gt, struct xe_engine *e)
+static int emit_nop_job(struct xe_gt *gt, struct xe_engine *e)
 {
        struct xe_sched_job *job;
        struct xe_bb *bb;
@@ -252,7 +252,7 @@ int emit_nop_job(struct xe_gt *gt, struct xe_engine *e)
        return 0;
 }
 
-int emit_wa_job(struct xe_gt *gt, struct xe_engine *e)
+static int emit_wa_job(struct xe_gt *gt, struct xe_engine *e)
 {
        struct xe_reg_sr *sr = &e->hwe->reg_lrc;
        struct xe_reg_sr_entry *entry;
@@ -609,7 +609,7 @@ int xe_gt_init(struct xe_gt *gt)
        return 0;
 }
 
-int do_gt_reset(struct xe_gt *gt)
+static int do_gt_reset(struct xe_gt *gt)
 {
        struct xe_device *xe = gt_to_xe(gt);
        int err;
index 5cdfdfd0de40f3a45f8c67cf50961e334bc5dca5..32bcc40463e11ac9e77bb44112c3f73f52d641e1 100644 (file)
@@ -237,7 +237,7 @@ static void guc_init_params(struct xe_guc *guc)
  * transfer. These parameters are read by the firmware on startup
  * and cannot be changed thereafter.
  */
-void guc_write_params(struct xe_guc *guc)
+static void guc_write_params(struct xe_guc *guc)
 {
        struct xe_gt *gt = guc_to_gt(guc);
        int i;
@@ -560,7 +560,7 @@ static void guc_handle_mmio_msg(struct xe_guc *guc)
                        "Received early GuC exception notification!\n");
 }
 
-void guc_enable_irq(struct xe_guc *guc)
+static void guc_enable_irq(struct xe_guc *guc)
 {
        struct xe_gt *gt = guc_to_gt(guc);
        u32 events = xe_gt_is_media_type(gt) ?
index a2caa20f2fb343d041960bf166005cd58ec58617..ab703f1c8b583d3df942cdcd7620254d2b538541 100644 (file)
@@ -448,7 +448,7 @@ static void dg1_irq_reset(struct xe_gt *gt)
        GEN3_IRQ_RESET(gt, GEN8_PCU_);
 }
 
-void xe_irq_reset(struct xe_device *xe)
+static void xe_irq_reset(struct xe_device *xe)
 {
        struct xe_gt *gt;
        u8 id;
index 8a8d814a0e7aa328700c30e395d148ed7608e7fa..977c963a8cd0a7d1d1e60f69ea786c2d7f525a20 100644 (file)
@@ -56,9 +56,9 @@ static const enum xe_engine_class user_to_xe_engine_class[] = {
        [DRM_XE_ENGINE_CLASS_COMPUTE] = XE_ENGINE_CLASS_COMPUTE,
 };
 
-int check_hw_engines(struct xe_device *xe,
-                    struct drm_xe_engine_class_instance *eci,
-                    int num_engines)
+static int check_hw_engines(struct xe_device *xe,
+                           struct drm_xe_engine_class_instance *eci,
+                           int num_engines)
 {
        int i;