Skip to contentSkip to conversation

fix reversed memset arguments in hv_mouse

PATCH Dave Jones 2 participants 3 messages Mar 17, 2011 Staging

lore
Share & tools
lore

Dave Jones

author
#0 lore raw

size is 3rd arg, not the 2nd.

drivers/staging/hv/hv_mouse.c +2 -2
index 50147f8..cbe5686 100644
@@ -374,7 +374,7 @@ static void MousevscOnReceiveDeviceInfo(struct mousevsc_dev *InputDevice, struct
 	       desc->desc[0].wDescriptorLength);
 
 	/* Send the ack */
-	memset(&ack, sizeof(struct mousevsc_prt_msg), 0);
+	memset(&ack, 0, sizeof(struct mousevsc_prt_msg));
 
 	ack.type = PipeMessageData;
 	ack.size = sizeof(struct synthhid_device_info_ack);
@@ -595,7 +595,7 @@ static int MousevscConnectToVsp(struct hv_device *Device)
 	/*
 	 * Now, initiate the vsc/vsp initialization protocol on the open channel
 	 */
-	memset(request, sizeof(struct mousevsc_prt_msg), 0);
+	memset(request, 0, sizeof(struct mousevsc_prt_msg));
 
 	request->type = PipeMessageData;
 	request->size = sizeof(struct synthhid_protocol_request);
#1 lore raw
Quoted 1 line · Dave Jones

size is 3rd arg, not the 2nd.

Do you just have a script that checks lkml for this? :)

I thought checkpatch.pl caught these problems, I guess not. Thanks for the patch, I'll queue it up.

greg k-h

author
#2 lore raw
Quoted 4 lines · Greg KH
Quoted 1 line · Dave Jones

size is 3rd arg, not the 2nd.

Do you just have a script that checks lkml for this? :)

mutt hook.

Quoted 2 lines

I thought checkpatch.pl caught these problems, I guess not. Thanks for the patch, I'll queue it up.

I thought so too. I'm sure I sent one in. I'll resend it.

Dave