Skip to content

Commit dc414a9

Browse files
committed
Silence compile warnings about unused functions
1 parent 21e5324 commit dc414a9

5 files changed

Lines changed: 10 additions & 6 deletions

File tree

amd/amdgpu/Makefile

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -491,6 +491,7 @@ CWARNFLAGS.amdgpu_dm_pp_smu.c= -Wno-missing-prototypes -Wno-enum-conversion
491491
CWARNFLAGS.amdgpu_dm_helpers.c= -Wno-missing-braces
492492
CWARNFLAGS.amdgpu_dm_services.c=-Wno-missing-prototypes
493493
CWARNFLAGS.amdgpu_display.c= -Wno-missing-prototypes
494+
CWARNFLAGS.amdgpu_drv.c= -Wno-unused-function
494495
CWARNFLAGS.amdgpu_gfx.c= -Wno-missing-prototypes
495496
CWARNFLAGS.amdgpu_gtt_mgr.c= -Wno-missing-prototypes
496497
CWARNFLAGS.amdgpu_job.c= -Wno-missing-prototypes

drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1169,6 +1169,7 @@ static const struct dev_pm_ops amdgpu_pm_ops = {
11691169
.runtime_idle = amdgpu_pmops_runtime_idle,
11701170
};
11711171

1172+
#ifdef __linux__ /* Mute unused function warning (see below). */
11721173
static int amdgpu_flush(struct file *f, fl_owner_t id)
11731174
{
11741175
struct drm_file *file_priv = f->private_data;
@@ -1178,7 +1179,7 @@ static int amdgpu_flush(struct file *f, fl_owner_t id)
11781179

11791180
return 0;
11801181
}
1181-
1182+
#endif
11821183

11831184
static const struct file_operations amdgpu_driver_kms_fops = {
11841185
.owner = THIS_MODULE,

drivers/gpu/drm/i915/i915_gem.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1846,6 +1846,7 @@ i915_gem_sw_finish_ioctl(struct drm_device *dev, void *data,
18461846
return 0;
18471847
}
18481848

1849+
#ifdef __linux__ /* Mute unused function warning. */
18491850
static inline bool
18501851
__vma_matches(struct vm_area_struct *vma, struct file *filp,
18511852
unsigned long addr, unsigned long size)
@@ -1855,6 +1856,7 @@ __vma_matches(struct vm_area_struct *vma, struct file *filp,
18551856

18561857
return vma->vm_start == addr && (vma->vm_end - vma->vm_start) == size;
18571858
}
1859+
#endif
18581860

18591861
/**
18601862
* i915_gem_mmap_ioctl - Maps the contents of an object, returning the address

i915/Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -208,7 +208,7 @@ CWARNFLAGS.intel_dsi_panel_vbt.c= -Wno-cast-qual
208208
CWARNFLAGS.intel_engine_cs.c= -Wno-cast-qual
209209
CWARNFLAGS.intel_fbdev.c= -Wno-initializer-overrides
210210
CWARNFLAGS.intel_guc_ct.c= -Wno-address-of-packed-member # probably false positive
211-
CWARNFLAGS.intel_guc_submission.c= -Wno-cast-qual
211+
CWARNFLAGS.intel_guc_submission.c= -Wno-cast-qual -Wno-unused-function
212212
CWARNFLAGS.intel_hdmi.c= -Wno-enum-conversion
213213
CWARNFLAGS.intel_hotplug.c= -Wno-missing-prototypes
214214
CWARNFLAGS.intel_lrc.c= -Wno-cast-qual -Wno-unused-variable

linuxkpi/gplv2/src/linux_genalloc.c

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -656,10 +656,10 @@ unsigned long gen_pool_best_fit(unsigned long *map, unsigned long size,
656656
}
657657
EXPORT_SYMBOL(gen_pool_best_fit);
658658

659-
static void devm_gen_pool_release(struct device *dev, void *res)
660-
{
661-
gen_pool_destroy(*(struct gen_pool **)res);
662-
}
659+
/* static void devm_gen_pool_release(struct device *dev, void *res) */
660+
/* { */
661+
/* gen_pool_destroy(*(struct gen_pool **)res); */
662+
/* } */
663663

664664
/* static int devm_gen_pool_match(struct device *dev, void *res, void *data) */
665665
/* { */

0 commit comments

Comments
 (0)