On 24.02.2026 10:10, David Thomson ([email protected]) wrote: >> I understand you reflect original behavior in this regard, but why involve >> any >> ACPI function here at all when pblk is non-zero? I.e. why not swap the >> operands >> of && ? Object evaluation could have wanted side effects (in which case, >> however, some different change would be needed here), but checking for method >> presence surely hasn't. >> > You're right on both counts. The original evaluate_object() call at least had > the appearance of wanting the result (even though buf was undersized and the > result was never used). A pure presence check has no such pretense. Swapping > the operands is the obvious improvement. I think dropping the _CST check > entirely is also defensible since C-state support is confirmed when pblk is > set. But I'm not certain there's no edge case where pblk is non-zero and _CST > is also not present, so I'd defer to your judgement. > > Would you prefer: > a) if (pblk && acpi_has_method(handle, "_CST")) > b) just if (pblk)
I don't think b) is correct, so a) please (albeit suitably adjusted to really only flip the operands from what your original patch had). Jan
