]> git.ipfire.org Git - thirdparty/kernel/stable.git/commitdiff
Drivers: hv: vmbus: Removed an unnecessary cast from void *
authorDexuan Cui <decui@microsoft.com>
Tue, 15 May 2018 00:25:01 +0000 (00:25 +0000)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 15 May 2018 07:40:37 +0000 (09:40 +0200)
In C, we don't need such a cast.

Fixes: ae20b254306a ("Drivers: hv: vmbus: enable VMBus protocol version 5.0")
Reported-by: Stephen Hemminger <sthemmin@microsoft.com>
Signed-off-by: Dexuan Cui <decui@microsoft.com>
Cc: K. Y. Srinivasan <kys@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/hv/connection.c

index 19e046820fdaf0ae09193d5af404a29433f637b2..ced0418994568239494d1e6133665bd504a1299b 100644 (file)
@@ -409,7 +409,7 @@ int vmbus_post_msg(void *buffer, size_t buflen, bool can_sleep)
                         * HV_STATUS_INVALID_CONNECTION_ID and we should
                         * return an error immediately without retrying.
                         */
-                       hdr = (struct vmbus_channel_message_header *)buffer;
+                       hdr = buffer;
                        if (hdr->msgtype == CHANNELMSG_INITIATE_CONTACT)
                                return -EINVAL;
                        /*