Browse Source

[hyperv] Remove redundant return status code from mapping functions

Signed-off-by: Michael Brown <mcb30@ipxe.org>
tags/v1.20.1
Michael Brown 7 years ago
parent
commit
276d618ca9
1 changed files with 4 additions and 14 deletions
  1. 4
    14
      src/arch/x86/drivers/hyperv/hyperv.c

+ 4
- 14
src/arch/x86/drivers/hyperv/hyperv.c View File

223
  * Map hypercall page
223
  * Map hypercall page
224
  *
224
  *
225
  * @v hv		Hyper-V hypervisor
225
  * @v hv		Hyper-V hypervisor
226
- * @ret rc		Return status code
227
  */
226
  */
228
-static int hv_map_hypercall ( struct hv_hypervisor *hv ) {
227
+static void hv_map_hypercall ( struct hv_hypervisor *hv ) {
229
 	union {
228
 	union {
230
 		struct {
229
 		struct {
231
 			uint32_t ebx;
230
 			uint32_t ebx;
267
 	hypercall |= ( virt_to_phys ( hv->hypercall ) | HV_HYPERCALL_ENABLE );
266
 	hypercall |= ( virt_to_phys ( hv->hypercall ) | HV_HYPERCALL_ENABLE );
268
 	DBGC2 ( hv, "HV %p hypercall MSR is %#08llx\n", hv, hypercall );
267
 	DBGC2 ( hv, "HV %p hypercall MSR is %#08llx\n", hv, hypercall );
269
 	wrmsr ( HV_X64_MSR_HYPERCALL, hypercall );
268
 	wrmsr ( HV_X64_MSR_HYPERCALL, hypercall );
270
-
271
-	return 0;
272
 }
269
 }
273
 
270
 
274
 /**
271
 /**
296
  * Map synthetic interrupt controller
293
  * Map synthetic interrupt controller
297
  *
294
  *
298
  * @v hv		Hyper-V hypervisor
295
  * @v hv		Hyper-V hypervisor
299
- * @ret rc		Return status code
300
  */
296
  */
301
-static int hv_map_synic ( struct hv_hypervisor *hv ) {
297
+static void hv_map_synic ( struct hv_hypervisor *hv ) {
302
 	uint64_t simp;
298
 	uint64_t simp;
303
 	uint64_t siefp;
299
 	uint64_t siefp;
304
 	uint64_t scontrol;
300
 	uint64_t scontrol;
322
 	scontrol |= HV_SCONTROL_ENABLE;
318
 	scontrol |= HV_SCONTROL_ENABLE;
323
 	DBGC2 ( hv, "HV %p SCONTROL MSR is %#08llx\n", hv, scontrol );
319
 	DBGC2 ( hv, "HV %p SCONTROL MSR is %#08llx\n", hv, scontrol );
324
 	wrmsr ( HV_X64_MSR_SCONTROL, scontrol );
320
 	wrmsr ( HV_X64_MSR_SCONTROL, scontrol );
325
-
326
-	return 0;
327
 }
321
 }
328
 
322
 
329
 /**
323
 /**
552
 		goto err_alloc_message;
546
 		goto err_alloc_message;
553
 
547
 
554
 	/* Map hypercall page */
548
 	/* Map hypercall page */
555
-	if ( ( rc = hv_map_hypercall ( hv ) ) != 0 )
556
-		goto err_map_hypercall;
549
+	hv_map_hypercall ( hv );
557
 
550
 
558
 	/* Map synthetic interrupt controller */
551
 	/* Map synthetic interrupt controller */
559
-	if ( ( rc = hv_map_synic ( hv ) ) != 0 )
560
-		goto err_map_synic;
552
+	hv_map_synic ( hv );
561
 
553
 
562
 	/* Probe Hyper-V devices */
554
 	/* Probe Hyper-V devices */
563
 	if ( ( rc = vmbus_probe ( hv, &rootdev->dev ) ) != 0 )
555
 	if ( ( rc = vmbus_probe ( hv, &rootdev->dev ) ) != 0 )
569
 	vmbus_remove ( hv, &rootdev->dev );
561
 	vmbus_remove ( hv, &rootdev->dev );
570
  err_vmbus_probe:
562
  err_vmbus_probe:
571
 	hv_unmap_synic ( hv );
563
 	hv_unmap_synic ( hv );
572
- err_map_synic:
573
 	hv_unmap_hypercall ( hv );
564
 	hv_unmap_hypercall ( hv );
574
- err_map_hypercall:
575
 	hv_free_message ( hv );
565
 	hv_free_message ( hv );
576
  err_alloc_message:
566
  err_alloc_message:
577
 	hv_free_pages ( hv, hv->hypercall, hv->synic.message, hv->synic.event,
567
 	hv_free_pages ( hv, hv->hypercall, hv->synic.message, hv->synic.event,

Loading…
Cancel
Save