RE: [PATCH] hyperv: Remove unused union and structs
From: Michael Kelley
Date: Mon Mar 10 2025 - 16:53:43 EST
From: Thorsten Blum <thorsten.blum@xxxxxxxxx> Sent: Monday, March 10, 2025 1:41 PM
>
> On 10. Mar 2025, at 21:21, Michael Kelley wrote:
> >
> > It appears to me that struct vmdata_gpa_direct and struct
> > vmadditional_data are also unused. Did you keep them for
> > some reason? Or could they also be deleted in this patch?
>
> I kept vmdata_gpa_direct because it is referenced in multiple comments
> of other structs, for example:
>
> /* The format must be the same as struct vmdata_gpa_direct */
> struct vmbus_channel_packet_page_buffer {
> ...
> }
Ah, OK. Thanks. There's marginal value in keeping
struct vmdata_gpa_direct so the three comments provide a
text-only reference for keeping these three struct's in sync:
1) vmbus_channel_packet_page_buffer
2) vmbus_channel_packet_multipage_buffer
3) vmbus_packet_mpb_array
I don't know why an actual structure isn't used as the first
part of these three that must be the same. But changing that
is bigger lift because of the field references that would need to
be updated. So I'm good with leaving struct vmdata_gpa_direct,
even though it isn't directly used in C code.
Michael
>
> I only checked the structs used in the union and didn't check
> vmadditional_data or any others, but I'll submit a v2 and remove it.
>
> Thanks,
> Thorsten