Skip to content

Commit f8665d7

Browse files
Merge tag 'gvt-next-fixes-2020-05-28' of https://github.com/intel/gvt-linux into drm-intel-next-fixes
gvt-next-fixes-2020-05-28 - Fix one clang warning on debug only function (Nathan) - Use ARRAY_SIZE for coccicheck warn (Aishwarya) Signed-off-by: Joonas Lahtinen <[email protected]> From: Zhenyu Wang <[email protected]> Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
2 parents 62b6e89 + cb7ee52 commit f8665d7

File tree

1 file changed

+1
-1
lines changed
  • drivers/gpu/drm/i915/gvt

1 file changed

+1
-1
lines changed

drivers/gpu/drm/i915/gvt/vgpu.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -124,7 +124,7 @@ int intel_gvt_init_vgpu_types(struct intel_gvt *gvt)
124124
*/
125125
low_avail = gvt_aperture_sz(gvt) - HOST_LOW_GM_SIZE;
126126
high_avail = gvt_hidden_sz(gvt) - HOST_HIGH_GM_SIZE;
127-
num_types = sizeof(vgpu_types) / sizeof(vgpu_types[0]);
127+
num_types = ARRAY_SIZE(vgpu_types);
128128

129129
gvt->types = kcalloc(num_types, sizeof(struct intel_vgpu_type),
130130
GFP_KERNEL);

0 commit comments

Comments
 (0)