All of lore.kernel.org
 help / color / mirror / Atom feed
From: Greg KH <gregkh@linuxfoundation.org>
To: Andrea Calabrese <andrea.calabrese@amarulasolutions.com>
Cc: rafael@kernel.org, dri-devel@lists.freedesktop.org,
	l.stach@pengutronix.de, trivial@kernel.org,
	linux-amarula@amarulasolutions.com
Subject: Re: [RESEND PATCH v4] devres: Refactor using guards
Date: Wed, 11 Sep 2024 16:09:53 +0200	[thread overview]
Message-ID: <2024091122-batboy-grumpily-520f@gregkh> (raw)
In-Reply-To: <20240910131520.150610-2-andrea.calabrese@amarulasolutions.com>

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@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

  reply	other threads:[~2024-09-11 14:10 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-09-10 13:15 [RESEND PATCH v4] devres: Refactor using guards Andrea Calabrese
2024-09-11 14:09 ` Greg KH [this message]
2024-09-12  7:08   ` Andrea Calabrese

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=2024091122-batboy-grumpily-520f@gregkh \
    --to=gregkh@linuxfoundation.org \
    --cc=andrea.calabrese@amarulasolutions.com \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=l.stach@pengutronix.de \
    --cc=linux-amarula@amarulasolutions.com \
    --cc=rafael@kernel.org \
    --cc=trivial@kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.