diff options
author | K. Y. Srinivasan <kys@microsoft.com> | 2012-05-12 16:44:57 -0400 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2012-05-14 11:59:31 -0400 |
commit | a360530012766e5fd752bd6538c8cc6349846781 (patch) | |
tree | ac8f35476b06598fa313c71342b2a2a1e3c7a1d6 /drivers/hv | |
parent | 90394482b807cb0a474fb387ed020603df14cfd0 (diff) |
Drivers: hv: Get rid of an unnecessary check in vmbus_prep_negotiate_resp()
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>
Diffstat (limited to 'drivers/hv')
-rw-r--r-- | drivers/hv/channel_mgmt.c | 43 |
1 files changed, 21 insertions, 22 deletions
diff --git a/drivers/hv/channel_mgmt.c b/drivers/hv/channel_mgmt.c index 9ffbfc575a0c..6c8c4d340930 100644 --- a/drivers/hv/channel_mgmt.c +++ b/drivers/hv/channel_mgmt.c | |||
@@ -56,30 +56,29 @@ struct vmbus_channel_message_table_entry { | |||
56 | void vmbus_prep_negotiate_resp(struct icmsg_hdr *icmsghdrp, | 56 | void vmbus_prep_negotiate_resp(struct icmsg_hdr *icmsghdrp, |
57 | struct icmsg_negotiate *negop, u8 *buf) | 57 | struct icmsg_negotiate *negop, u8 *buf) |
58 | { | 58 | { |
59 | if (icmsghdrp->icmsgtype == ICMSGTYPE_NEGOTIATE) { | 59 | icmsghdrp->icmsgsize = 0x10; |
60 | icmsghdrp->icmsgsize = 0x10; | 60 | |
61 | 61 | negop = (struct icmsg_negotiate *)&buf[ | |
62 | negop = (struct icmsg_negotiate *)&buf[ | 62 | sizeof(struct vmbuspipe_hdr) + |
63 | sizeof(struct vmbuspipe_hdr) + | 63 | sizeof(struct icmsg_hdr)]; |
64 | sizeof(struct icmsg_hdr)]; | 64 | |
65 | 65 | if (negop->icframe_vercnt == 2 && | |
66 | if (negop->icframe_vercnt == 2 && | 66 | negop->icversion_data[1].major == 3) { |
67 | negop->icversion_data[1].major == 3) { | 67 | negop->icversion_data[0].major = 3; |
68 | negop->icversion_data[0].major = 3; | 68 | negop->icversion_data[0].minor = 0; |
69 | negop->icversion_data[0].minor = 0; | 69 | negop->icversion_data[1].major = 3; |
70 | negop->icversion_data[1].major = 3; | 70 | negop->icversion_data[1].minor = 0; |
71 | negop->icversion_data[1].minor = 0; | 71 | } else { |
72 | } else { | 72 | negop->icversion_data[0].major = 1; |
73 | negop->icversion_data[0].major = 1; | 73 | negop->icversion_data[0].minor = 0; |
74 | negop->icversion_data[0].minor = 0; | 74 | negop->icversion_data[1].major = 1; |
75 | negop->icversion_data[1].major = 1; | 75 | negop->icversion_data[1].minor = 0; |
76 | negop->icversion_data[1].minor = 0; | ||
77 | } | ||
78 | |||
79 | negop->icframe_vercnt = 1; | ||
80 | negop->icmsg_vercnt = 1; | ||
81 | } | 76 | } |
77 | |||
78 | negop->icframe_vercnt = 1; | ||
79 | negop->icmsg_vercnt = 1; | ||
82 | } | 80 | } |
81 | |||
83 | EXPORT_SYMBOL_GPL(vmbus_prep_negotiate_resp); | 82 | EXPORT_SYMBOL_GPL(vmbus_prep_negotiate_resp); |
84 | 83 | ||
85 | /* | 84 | /* |