Commit 3f8bd465 authored by Rikard Falkeborn's avatar Rikard Falkeborn Committed by Zhi Wang

drm/i915/gvt: Constify vgpu_types

It is never modified, so make it const to allow the compiler to put it
in read-only memory. While at it, make name a const char*.
Signed-off-by: default avatarRikard Falkeborn <rikard.falkeborn@gmail.com>
Signed-off-by: default avatarZhi Wang <zhi.a.wang@intel.com>
Link: http://patchwork.freedesktop.org/patch/msgid/20211204105527.15741-10-rikard.falkeborn@gmail.comReviewed-by: default avatarZhi Wang <zhi.a.wang@intel.com>
parent 38bd13a0
...@@ -77,7 +77,7 @@ void populate_pvinfo_page(struct intel_vgpu *vgpu) ...@@ -77,7 +77,7 @@ void populate_pvinfo_page(struct intel_vgpu *vgpu)
#define VGPU_WEIGHT(vgpu_num) \ #define VGPU_WEIGHT(vgpu_num) \
(VGPU_MAX_WEIGHT / (vgpu_num)) (VGPU_MAX_WEIGHT / (vgpu_num))
static struct { static const struct {
unsigned int low_mm; unsigned int low_mm;
unsigned int high_mm; unsigned int high_mm;
unsigned int fence; unsigned int fence;
...@@ -88,7 +88,7 @@ static struct { ...@@ -88,7 +88,7 @@ static struct {
*/ */
unsigned int weight; unsigned int weight;
enum intel_vgpu_edid edid; enum intel_vgpu_edid edid;
char *name; const char *name;
} vgpu_types[] = { } vgpu_types[] = {
/* Fixed vGPU type table */ /* Fixed vGPU type table */
{ MB_TO_BYTES(64), MB_TO_BYTES(384), 4, VGPU_WEIGHT(8), GVT_EDID_1024_768, "8" }, { MB_TO_BYTES(64), MB_TO_BYTES(384), 4, VGPU_WEIGHT(8), GVT_EDID_1024_768, "8" },
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment