projects
/
linux.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
38bd13a
)
drm/i915/gvt: Constify vgpu_types
author
Rikard Falkeborn
<rikard.falkeborn@gmail.com>
Sat, 4 Dec 2021 10:55:27 +0000
(11:55 +0100)
committer
Zhi Wang
<zhi.a.wang@intel.com>
Wed, 12 Jan 2022 07:52:37 +0000
(
02:52
-0500)
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: 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-10-rikard.falkeborn@gmail.com
Reviewed-by: Zhi Wang <zhi.a.wang@intel.com>
drivers/gpu/drm/i915/gvt/vgpu.c
patch
|
blob
|
history
diff --git
a/drivers/gpu/drm/i915/gvt/vgpu.c
b/drivers/gpu/drm/i915/gvt/vgpu.c
index fa6b92615799a63fd2d3fe8ca78b07c85be4d72c..8dddd0a940a1b1172569555a0ed6297467e9f4fc 100644
(file)
--- a/
drivers/gpu/drm/i915/gvt/vgpu.c
+++ b/
drivers/gpu/drm/i915/gvt/vgpu.c
@@
-77,7
+77,7
@@
void populate_pvinfo_page(struct intel_vgpu *vgpu)
#define VGPU_WEIGHT(vgpu_num) \
(VGPU_MAX_WEIGHT / (vgpu_num))
-static struct {
+static
const
struct {
unsigned int low_mm;
unsigned int high_mm;
unsigned int fence;
@@
-88,7
+88,7
@@
static struct {
*/
unsigned int weight;
enum intel_vgpu_edid edid;
- char *name;
+ c
onst c
har *name;
} vgpu_types[] = {
/* Fixed vGPU type table */
{ MB_TO_BYTES(64), MB_TO_BYTES(384), 4, VGPU_WEIGHT(8), GVT_EDID_1024_768, "8" },