Re: [v8 3/3] PCI: amd-mdb: Add AMD MDB Root Port driver
From: Krzysztof Kozlowski
Date: Wed Feb 12 2025 - 00:36:36 EST
On 12/02/2025 00:16, Bjorn Helgaas wrote:
> On Fri, Feb 07, 2025 at 07:39:03AM +0100, Markus Elfring wrote:
>>> I don't *really* like guard() anyway because it's kind of magic in
>>> that the unlock doesn't actually appear in the code, and it's kind of
>>> hard to unravel what guard() is and how it works. But I guess that's
>>> mostly because it's just a new idiom that takes time to internalize.
>>
>> How will the circumstances evolve further for growing applications of
>> scope-based resource management?
>
> I'm sure it will evolve to become the typical style. Right now, it's
> not quite there yet, as evidenced by the fact that the only reference
> to them in Documentation/ is this somewhat ambivalent note:
>
> https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/Documentation/process/maintainer-netdev.rst?id=v6.13#n380
>
> We do already have a few uses of guard() and scoped_guard() in
> drivers/pci, and I don't really object to more, including in this
> amd-mdb case. Whatever we do, I *would* want to do it consistently
> throughout the file.
Bjorn,
There is little point in discussing anything with Markus. It's a person
known to waste our time.
Best regards,
Krzysztof