diff options
| author | Michael Kelley <mhklinux@outlook.com> | 2025-08-31 09:04:06 -0700 |
|---|---|---|
| committer | Wei Liu <wei.liu@kernel.org> | 2025-09-08 22:11:03 +0000 |
| commit | 2d0ddbb65cef99aab241378b0f4ff2d6ea8c3a5a (patch) | |
| tree | 2ea2714bb7be03f3dd8b7b98ff467b807f3f1c42 /drivers/hv | |
| parent | Drivers: hv: util: Cosmetic changes for hv_utils_transport.c (diff) | |
| download | linux-2d0ddbb65cef99aab241378b0f4ff2d6ea8c3a5a.tar.gz linux-2d0ddbb65cef99aab241378b0f4ff2d6ea8c3a5a.zip | |
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>
Diffstat (limited to 'drivers/hv')
| -rw-r--r-- | drivers/hv/channel.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/hv/channel.c b/drivers/hv/channel.c index 7c7c66e0dc3f..162d6aeece7b 100644 --- a/drivers/hv/channel.c +++ b/drivers/hv/channel.c @@ -925,7 +925,7 @@ static int vmbus_close_internal(struct vmbus_channel *channel) /* Send a closing message */ - msg = &channel->close_msg.msg; + msg = &channel->close_msg; msg->header.msgtype = CHANNELMSG_CLOSECHANNEL; msg->child_relid = channel->offermsg.child_relid; |
