From bf98f0aaee369156e740d1e08a9f95c329479e69 Mon Sep 17 00:00:00 2001 From: mikeb Date: Thu, 18 Aug 2016 09:20:01 +0000 Subject: [PATCH] Clean up style and replace a magic value with a magic define --- sys/dev/pv/hyperv.c | 2 +- sys/dev/pv/hypervreg.h | 25 ++++++++++++++----------- 2 files changed, 15 insertions(+), 12 deletions(-) diff --git a/sys/dev/pv/hyperv.c b/sys/dev/pv/hyperv.c index 2ebdfe83897..a34ca0fb50c 100644 --- a/sys/dev/pv/hyperv.c +++ b/sys/dev/pv/hyperv.c @@ -738,7 +738,7 @@ hv_vmbus_connect(struct hv_softc *sc) if (rsp.chm_done) { sc->sc_flags |= HSF_CONNECTED; sc->sc_proto = versions[i]; - sc->sc_handle = 0xe1e10 - 1; /* magic! */ + sc->sc_handle = VMBUS_GPADL_START; DPRINTF("%s: protocol version %#x\n", sc->sc_dev.dv_xname, versions[i]); break; diff --git a/sys/dev/pv/hypervreg.h b/sys/dev/pv/hypervreg.h index 70f1db5a17c..4a358418da7 100644 --- a/sys/dev/pv/hypervreg.h +++ b/sys/dev/pv/hypervreg.h @@ -37,9 +37,12 @@ struct hv_guid { #define VMBUS_CONNID_EVENT 2 #define VMBUS_SINT_MESSAGE 2 -/* ============================================================================= +#define VMBUS_GPADL_START 0xffff /* 0x10000 effectively */ + +/* + * ============================================================================ * hyperv_reg.h - * ============================================================================= + * ============================================================================ */ /* @@ -199,9 +202,9 @@ struct hypercall_postmsg_in { } __packed; /* - * ============================================================================= + * ============================================================================ * vmbus.h - * ============================================================================= + * ============================================================================ */ /* @@ -275,9 +278,9 @@ struct vmbus_chanpkt_rxbuf { } __packed; /* - * ============================================================================= + * ============================================================================ * vmbus_reg.h - * ============================================================================= + * ============================================================================ */ /* @@ -559,9 +562,9 @@ struct vmbus_chanmsg_choffer { #define VMBUS_CHOFFER_FLAG1_HASMNF 0x01 /* - * ============================================================================= - * Temporary - * ============================================================================= + * ============================================================================ + * Integrated services + * ============================================================================ */ /* @@ -632,9 +635,9 @@ struct hv_heartbeat_msg { } __packed; /* - * ============================================================================= + * ============================================================================ * Helper macros - * ============================================================================= + * ============================================================================ */ /* How many PFNs can be referenced by the header */ -- 2.20.1