]> Gentwo Git Trees - linux/.git/commit
Drivers: hv: Simplify data structures for VMBus channel close message
authorMichael Kelley <mhklinux@outlook.com>
Sun, 31 Aug 2025 16:04:06 +0000 (09:04 -0700)
committerWei Liu <wei.liu@kernel.org>
Mon, 8 Sep 2025 22:11:03 +0000 (22:11 +0000)
commit2d0ddbb65cef99aab241378b0f4ff2d6ea8c3a5a
tree2ea2714bb7be03f3dd8b7b98ff467b807f3f1c42
parentac7b0a5cd331862c3d4d49eae71ed93f8f5082f3
Drivers: hv: Simplify data structures for VMBus channel close message

struct vmbus_close_msg is used for sending the VMBus channel close
message. It contains a struct vmbus_channel_msginfo, which has a
flex array member at the end. The latter's presence in the middle
of struct vmbus_close_msg causes warnings when built with
-Wflex-array-member-not-at-end.

But the struct vmbus_channel_msginfo is unused because the Hyper-V host
does not send a response to the channel close message. So remove the
struct vmbus_channel_msginfo. Then, since the only remaining field is
struct vmbus_channel_close_channel, also remove the containing struct
vmbus_close_msg and directly use struct vmbus_channel_close_channel.
Besides eliminating unnecessary complexity, these changes resolve the
-Wflex-array-member-not-at-end warnings.

Signed-off-by: Michael Kelley <mhklinux@outlook.com>
Reviewed-by: Tianyu Lan <tiala@microsoft.com>
Signed-off-by: Wei Liu <wei.liu@kernel.org>
drivers/hv/channel.c
include/linux/hyperv.h