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

Loading…
Cancel
Save