Re: [PATCH 1/1] Drivers: hv: Simplify data structures for VMBus channel close message

From: Tianyu Lan
Date: Sun Aug 31 2025 - 13:57:02 EST


On Mon, Sep 1, 2025 at 12:06 AM <mhkelley58@xxxxxxxxx> wrote:
>
> From: Michael Kelley <mhklinux@xxxxxxxxxxx>
>
> 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@xxxxxxxxxxx>
> ---

Reviewed-by: Tianyu Lan <tiala@xxxxxxxxxxxxx>




--
Thanks
Tianyu Lan