hyper-v: make uuid_le const
authorstephen hemminger <stephen@networkplumber.org>
Tue, 3 Jun 2014 15:38:15 +0000 (08:38 -0700)
committerDavid S. Miller <davem@davemloft.net>
Wed, 4 Jun 2014 01:18:38 +0000 (18:18 -0700)
The uuid structure could be managed as a const in several places.

Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
Signed-off-by: K. Y. Srinivasan <kys@microsoft.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/hv/channel_mgmt.c
drivers/hv/hyperv_vmbus.h
drivers/hv/vmbus_drv.c

index fa920469bf104fda2e57d9c2bce2f15f90d5b2a4..90d6545564378c35d55fcb7f71a635ca5cfc32d5 100644 (file)
@@ -365,7 +365,7 @@ static u32  next_vp;
  * performance critical channels (IDE, SCSI and Network) will be uniformly
  * distributed across all available CPUs.
  */
-static u32 get_vp_index(uuid_le *type_guid)
+static u32 get_vp_index(const uuid_le *type_guid)
 {
        u32 cur_cpu;
        int i;
index 860134da80396c0013303eac1a37ae94f935e73e..f90621e858fa96b2fdf7a4823ef6933d0e4548ec 100644 (file)
@@ -644,9 +644,9 @@ extern struct vmbus_connection vmbus_connection;
 
 /* General vmbus interface */
 
-struct hv_device *vmbus_device_create(uuid_le *type,
-                                        uuid_le *instance,
-                                        struct vmbus_channel *channel);
+struct hv_device *vmbus_device_create(const uuid_le *type,
+                                     const uuid_le *instance,
+                                     struct vmbus_channel *channel);
 
 int vmbus_device_register(struct hv_device *child_device_obj);
 void vmbus_device_unregister(struct hv_device *device_obj);
index 8e53a3c2607e00c07e066b28f11c056aef4a6abd..4d6b26979fbd54e457dfbcea4bfc9a6a26ec846c 100644 (file)
@@ -435,7 +435,7 @@ static int vmbus_uevent(struct device *device, struct kobj_uevent_env *env)
        return ret;
 }
 
-static uuid_le null_guid;
+static const uuid_le null_guid;
 
 static inline bool is_null_guid(const __u8 *guid)
 {
@@ -450,7 +450,7 @@ static inline bool is_null_guid(const __u8 *guid)
  */
 static const struct hv_vmbus_device_id *hv_vmbus_get_id(
                                        const struct hv_vmbus_device_id *id,
-                                       __u8 *guid)
+                                       const __u8 *guid)
 {
        for (; !is_null_guid(id->guid); id++)
                if (!memcmp(&id->guid, guid, sizeof(uuid_le)))
@@ -779,9 +779,9 @@ EXPORT_SYMBOL_GPL(vmbus_driver_unregister);
  * vmbus_device_create - Creates and registers a new child device
  * on the vmbus.
  */
-struct hv_device *vmbus_device_create(uuid_le *type,
-                                           uuid_le *instance,
-                                           struct vmbus_channel *channel)
+struct hv_device *vmbus_device_create(const uuid_le *type,
+                                     const uuid_le *instance,
+                                     struct vmbus_channel *channel)
 {
        struct hv_device *child_device_obj;