public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] 1/4 staging: hv: fix oops in vmbus - udev events
@ 2009-10-28 22:23 Milan Dadok
  2009-10-28 22:48 ` Hank Janssen
  0 siblings, 1 reply; 3+ messages in thread
From: Milan Dadok @ 2009-10-28 22:23 UTC (permalink / raw)
  To: 'Greg Kroah-Hartman'
  Cc: linux-kernel, 'Hank Janssen', 'Haiyang Zhang'

Fix typos in udev event send and guid variables copy

Signed-off-by: Milan Dadok <milan@dadok.name>

---
diff -uprN -X /usr/src/linux/Documentation/dontdiff
/usr/src/linux-2.6.32-rc5/drivers/staging/hv/vmbus_drv.c
/usr/src/linux/drivers/staging/hv/vmbus_drv.c
--- /usr/src/linux-2.6.32-rc5/drivers/staging/hv/vmbus_drv.c    2009-10-28
18:13:04.000000000 +0100
+++ /usr/src/linux/drivers/staging/hv/vmbus_drv.c       2009-10-28
17:53:29.000000000 +0100
@@ -507,12 +507,12 @@ static struct hv_device *vmbus_child_dev

        child_device_obj = &child_device_ctx->device_obj;
        child_device_obj->context = context;
-       memcpy(&child_device_obj->deviceType, &type, sizeof(struct
hv_guid));
-       memcpy(&child_device_obj->deviceInstance, &instance,
+       memcpy(&child_device_obj->deviceType, type, sizeof(struct hv_guid));
+       memcpy(&child_device_obj->deviceInstance, instance,
               sizeof(struct hv_guid));

-       memcpy(&child_device_ctx->class_id, &type, sizeof(struct hv_guid));
-       memcpy(&child_device_ctx->device_id, &instance, sizeof(struct
hv_guid));
+       memcpy(&child_device_ctx->class_id, type, sizeof(struct hv_guid));
+       memcpy(&child_device_ctx->device_id, instance, sizeof(struct
hv_guid));

        DPRINT_EXIT(VMBUS_DRV);

@@ -623,8 +611,6 @@ static void vmbus_child_device_destroy(s
 static int vmbus_uevent(struct device *device, struct kobj_uevent_env *env)
 {
        struct device_context *device_ctx =
device_to_device_context(device);
-       int i = 0;
-       int len = 0;
        int ret;

        DPRINT_ENTER(VMBUS_DRV);
@@ -644,8 +630,6 @@ static int vmbus_uevent(struct device *d
                    device_ctx->class_id.data[14],
                    device_ctx->class_id.data[15]);

-       env->envp_idx = i;
-       env->buflen = len;
        ret = add_uevent_var(env, "VMBUS_DEVICE_CLASS_GUID={"
                             "%02x%02x%02x%02x-%02x%02x-%02x%02x-"
                             "%02x%02x%02x%02x%02x%02x%02x%02x}",
@@ -691,8 +675,6 @@ static int vmbus_uevent(struct device *d
        if (ret)
                return ret;

-       env->envp[env->envp_idx] = NULL;
-
        DPRINT_EXIT(VMBUS_DRV);

        return 0;
---



^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2009-10-28 23:01 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-10-28 22:23 [PATCH] 1/4 staging: hv: fix oops in vmbus - udev events Milan Dadok
2009-10-28 22:48 ` Hank Janssen
2009-10-28 22:58   ` Greg KH

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox