[RESEND PATCH v4] devres: Refactor using guards
Greg KH
gregkh at linuxfoundation.org
Wed Sep 11 14:09:53 UTC 2024
On Tue, Sep 10, 2024 at 03:15:21PM +0200, Andrea Calabrese wrote:
> Code refactoring using the recent guard and scoped_guard macros
> for automatic cleanup of the spinlocks. This does not change the
> effective behaviour of the kernel, but guarantees a cleaned-up exit from
> each lock, automatically avoiding potential deadlocks.
The "guarantee" is there today, right? So this isn't really anything
other than a "convert to use new apis", right?
If so, I need to see a LOT of verification that the output is the same,
and that it has been properly tested. Converting working code for no
real reason other than "let's change this!" isn't always a good idea.
For new code going forward, or if you are touching the same area, sure,
that makes sense, but be careful about stuff like this.
> Signed-off-by: Andrea Calabrese <andrea.calabrese at amarulasolutions.com>
>
> ---
> Diff from V3: as Greg KH and Lucas Stach noticed, there was a
> behavioural change between the two versions: I used guard(spinlock),
> while the expected behaviour should have come from a spinlock_irqsave
> guard. This has been fixed.
No diffstat?
thanks,
greg k-h
More information about the dri-devel
mailing list