File tree Expand file tree Collapse file tree 1 file changed +4
-3
lines changed Expand file tree Collapse file tree 1 file changed +4
-3
lines changed Original file line number Diff line number Diff line change @@ -222,7 +222,6 @@ int intel_vgpu_init_opregion(struct intel_vgpu *vgpu)
222
222
u8 * buf ;
223
223
struct opregion_header * header ;
224
224
struct vbt v ;
225
- const char opregion_signature [16 ] = OPREGION_SIGNATURE ;
226
225
227
226
gvt_dbg_core ("init vgpu%d opregion\n" , vgpu -> id );
228
227
vgpu_opregion (vgpu )-> va = (void * )__get_free_pages (GFP_KERNEL |
@@ -236,8 +235,10 @@ int intel_vgpu_init_opregion(struct intel_vgpu *vgpu)
236
235
/* emulated opregion with VBT mailbox only */
237
236
buf = (u8 * )vgpu_opregion (vgpu )-> va ;
238
237
header = (struct opregion_header * )buf ;
239
- memcpy (header -> signature , opregion_signature ,
240
- sizeof (opregion_signature ));
238
+
239
+ static_assert (sizeof (header -> signature ) == sizeof (OPREGION_SIGNATURE ) - 1 );
240
+ memcpy (header -> signature , OPREGION_SIGNATURE , sizeof (header -> signature ));
241
+
241
242
header -> size = 0x8 ;
242
243
header -> opregion_ver = 0x02000000 ;
243
244
header -> mboxes = MBOX_VBT ;
You can’t perform that action at this time.
0 commit comments