diff options
author | Rikard Falkeborn <rikard.falkeborn@gmail.com> | 2021-12-04 11:55:22 +0100 |
---|---|---|
committer | Zhi Wang <zhi.a.wang@intel.com> | 2022-01-12 02:52:37 -0500 |
commit | 4642077775a65566c0d25e63bf918fb5e5235163 (patch) | |
tree | 7e7de71dfa40e9397b9ecf40c208e71b47561eef | |
parent | 1b277c892940af1d06c2433f3f3a39d4bd146c89 (diff) | |
download | linux-stable-4642077775a65566c0d25e63bf918fb5e5235163.tar.gz linux-stable-4642077775a65566c0d25e63bf918fb5e5235163.tar.bz2 linux-stable-4642077775a65566c0d25e63bf918fb5e5235163.zip |
drm/i915/gvt: Constify intel_gvt_sched_policy_ops
These are never modified, so make them const to allow the compiler to
put them in read-only memory.
Signed-off-by: Rikard Falkeborn <rikard.falkeborn@gmail.com>
Signed-off-by: Zhi Wang <zhi.a.wang@intel.com>
Link: http://patchwork.freedesktop.org/patch/msgid/20211204105527.15741-5-rikard.falkeborn@gmail.com
Reviewed-by: Zhi Wang <zhi.a.wang@intel.com>
-rw-r--r-- | drivers/gpu/drm/i915/gvt/sched_policy.c | 2 | ||||
-rw-r--r-- | drivers/gpu/drm/i915/gvt/scheduler.h | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/drivers/gpu/drm/i915/gvt/sched_policy.c b/drivers/gpu/drm/i915/gvt/sched_policy.c index 036b74fe9298..c077fb4674f0 100644 --- a/drivers/gpu/drm/i915/gvt/sched_policy.c +++ b/drivers/gpu/drm/i915/gvt/sched_policy.c @@ -368,7 +368,7 @@ static void tbs_sched_stop_schedule(struct intel_vgpu *vgpu) vgpu_data->active = false; } -static struct intel_gvt_sched_policy_ops tbs_schedule_ops = { +static const struct intel_gvt_sched_policy_ops tbs_schedule_ops = { .init = tbs_sched_init, .clean = tbs_sched_clean, .init_vgpu = tbs_sched_init_vgpu, diff --git a/drivers/gpu/drm/i915/gvt/scheduler.h b/drivers/gpu/drm/i915/gvt/scheduler.h index 7c86984a842f..1f391b3da2cc 100644 --- a/drivers/gpu/drm/i915/gvt/scheduler.h +++ b/drivers/gpu/drm/i915/gvt/scheduler.h @@ -56,7 +56,7 @@ struct intel_gvt_workload_scheduler { wait_queue_head_t waitq[I915_NUM_ENGINES]; void *sched_data; - struct intel_gvt_sched_policy_ops *sched_ops; + const struct intel_gvt_sched_policy_ops *sched_ops; }; #define INDIRECT_CTX_ADDR_MASK 0xffffffc0 |