]> git.karo-electronics.de Git - linux-beck.git/commitdiff
Drivers: hv: Get rid of an unnecessary check in vmbus_prep_negotiate_resp()
authorK. Y. Srinivasan <kys@microsoft.com>
Sat, 12 May 2012 20:44:57 +0000 (13:44 -0700)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 14 May 2012 15:59:31 +0000 (08:59 -0700)
The vmbus_prep_negotiate_resp() is only invoked when we are negotiating
the version; so the current check in vmbus_prep_negotiate_resp()
is unnecessary. Get rid of it.

Signed-off-by: K. Y. Srinivasan <kys@microsoft.com>
Reviewed-by: Haiyang Zhang <haiyangz@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/hv/channel_mgmt.c

index 9ffbfc575a0c1d14b451c9cc304d119dcd3c9069..6c8c4d34093064ac65cad16ea8cbfc191fde053e 100644 (file)
@@ -56,30 +56,29 @@ struct vmbus_channel_message_table_entry {
 void vmbus_prep_negotiate_resp(struct icmsg_hdr *icmsghdrp,
                               struct icmsg_negotiate *negop, u8 *buf)
 {
-       if (icmsghdrp->icmsgtype == ICMSGTYPE_NEGOTIATE) {
-               icmsghdrp->icmsgsize = 0x10;
-
-               negop = (struct icmsg_negotiate *)&buf[
-                       sizeof(struct vmbuspipe_hdr) +
-                       sizeof(struct icmsg_hdr)];
-
-               if (negop->icframe_vercnt == 2 &&
-                  negop->icversion_data[1].major == 3) {
-                       negop->icversion_data[0].major = 3;
-                       negop->icversion_data[0].minor = 0;
-                       negop->icversion_data[1].major = 3;
-                       negop->icversion_data[1].minor = 0;
-               } else {
-                       negop->icversion_data[0].major = 1;
-                       negop->icversion_data[0].minor = 0;
-                       negop->icversion_data[1].major = 1;
-                       negop->icversion_data[1].minor = 0;
-               }
-
-               negop->icframe_vercnt = 1;
-               negop->icmsg_vercnt = 1;
+       icmsghdrp->icmsgsize = 0x10;
+
+       negop = (struct icmsg_negotiate *)&buf[
+               sizeof(struct vmbuspipe_hdr) +
+               sizeof(struct icmsg_hdr)];
+
+       if (negop->icframe_vercnt == 2 &&
+          negop->icversion_data[1].major == 3) {
+               negop->icversion_data[0].major = 3;
+               negop->icversion_data[0].minor = 0;
+               negop->icversion_data[1].major = 3;
+               negop->icversion_data[1].minor = 0;
+       } else {
+               negop->icversion_data[0].major = 1;
+               negop->icversion_data[0].minor = 0;
+               negop->icversion_data[1].major = 1;
+               negop->icversion_data[1].minor = 0;
        }
+
+       negop->icframe_vercnt = 1;
+       negop->icmsg_vercnt = 1;
 }
+
 EXPORT_SYMBOL_GPL(vmbus_prep_negotiate_resp);
 
 /*