On Tue, Sep 09, 2025, Tony Lindgren wrote: > On Tue, Sep 09, 2025 at 10:55:18AM +0000, Huang, Kai wrote: > > How about we just initialize r to -EINVAL once before tdx_get_sysinfo() so > > that all 'r = -EINVAL;' can be removed? I think in this way the code > > would be simpler (see below diff [*])? > > > > The "Fixes" tag would be hard to identify, No, Fixes always points at the commit(s) that introduced buggy behavior. While one might argue that commit 61bb28279623 was set up to fail by earlier commits, that commit is unequivocally the one and only Fixes commit. > > though, because the diff > > touches the code introduced multiple commits. But I am not sure whether > > this is a true issue since AFAICT we can use multiple "Fixes" tags. > > Your diff looks fine to me, however my personal preference would be to do > the fix first then clean-up :) Eh, fixes can also harden against similar failures in the future. I don't see any reason to split this one up. The buggy commit was introduced in v6.16 and Kai's suggestion applies cleanly there, so the more aggressive fix won't lead to stable@ conflicts either. In short, let's go straight to Kai's version.