RE: [RFC PATCH 06/15] virt: tdx-guest: Support TDI bind and unbind operations
From: Duan, Zhenzhong
Date: Tue Nov 03 2026 - 01:02:39 EST
>-----Original Message-----
>From: Edgecombe, Rick P <rick.p.edgecombe@xxxxxxxxx>
>Subject: Re: [RFC PATCH 06/15] virt: tdx-guest: Support TDI bind and unbind
>operations
>
>On Tue, 2026-10-27 at 10:14 +0000, Duan, Zhenzhong wrote:
>> > tdx_tdi_bind_dev(tdevsec);
>> >
>> > ... the __free(tdx_tdi_unbind_dev) are not easy to follow.
>> >
>> > I'm worried if it is OK to Dave given the previous discussion[1]
>> >
>> > [1] https://lore.kernel.org/all/70056924-1702-4020-b805-
>> > 014efb87afdd@xxxxxxxxx/
>>
>> I see in another comments Dave said "It depends", though I'm not clear
>> his choice on this error path. I think we can keep it as is and do the
>> change once he commented his preference here. Switching to goto is a
>> trivial work here.
>>
>> https://lore.kernel.org/all/e3830b06-dac8-4f22-bd07-
>98073886678a@xxxxxxxxx/
>
>I think you should justify why this way is better then. Dave did not mean:
>don't
>think about it and leave it for me to decide each case.
>
>In this case we know __free() and similar has been NAKed several times, and
>it
>the familiar patterns will be easier to read in general. So that should be
>the
>default unless there is some describable problem it solves. Please give it.
OK, I don't have a strong reason and will switch to "goto" style.
Thanks
Zhenzhong