We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents 62b6e89 + cb7ee52 commit f8665d7Copy full SHA for f8665d7
drivers/gpu/drm/i915/gvt/vgpu.c
@@ -124,7 +124,7 @@ int intel_gvt_init_vgpu_types(struct intel_gvt *gvt)
124
*/
125
low_avail = gvt_aperture_sz(gvt) - HOST_LOW_GM_SIZE;
126
high_avail = gvt_hidden_sz(gvt) - HOST_HIGH_GM_SIZE;
127
- num_types = sizeof(vgpu_types) / sizeof(vgpu_types[0]);
+ num_types = ARRAY_SIZE(vgpu_types);
128
129
gvt->types = kcalloc(num_types, sizeof(struct intel_vgpu_type),
130
GFP_KERNEL);
0 commit comments